Skip to main content

Process Payment Action — App Routine

How app routines work when called from the Process Payment action

Updated over a week ago

When using the Process Payment action, Charge and Pre-Authorization have a dropdown to specify an App Routine:

This App Routine has some special circumstances for executing:

  • The App Routine is not triggered immediately. It only runs after the gateway returns the result of the payment processing.

  • The App Routine does not run if the payment fails or is cancelled. It only runs if the payment gateway returns a value of APPROVED or PENDING.

  • Since the App Routine is not run immediately, there is no point adding any outputs.


Using Session Values from the Process Payment Widget

When you select an app routine, the App Routine Inputs will display below it. Your app routine should have at least three inputs to receive results from the payment gateway, as shown below:

When you populate your inputs, you will find the following Values from Session at the bottom of the dropdown.

Name

Description

Gateway Response

A successful response is either APPROVED or PENDING. Any other response means the payment has failed.

Is Process Successfully?

This value is either True or False,

Reference Number

The unique identifier for your processed payment provided by the gateway.

You will use these Values from Session to populate your App Routine's Inputs:


Store merchant response in Action Results

At the bottom of the Process Payment action, you will find options to store three responses from the Payment gateway in action results:

What's the difference between merchant response values and the ones provided in Session Values?

  • Merchant response values are provided immediately. You may use the response to display a success message with the Reference Number within the current action set (not the App Routine).

  • The Session Values can only be used within the App Routine.

  • The Merchant response values are not a guarantee the payment has been processed. You should not create a Receive Payment transaction based on the Merchant response. Instead, use the App Routine to handle the creation of a Receive Payment transaction. It is a more preferable and reliable way to ensure a payment has been approved.

Did this answer your question?