Setting up the callback pages

To integrate AltaPay's payment solution using the Merchant API, you need to set up the following pages for use with the createPaymentRequest method. For more information, see createPaymentRequest.

If you want to redirect the customer to some other page after they have seen the OK page or the fail page, you can do this using either of the following methods:

  • Meta-refresh
  • Responding to the callback with a server side redirect (HTTP 30X).
Callback page createPaymentRequest parameter Description
Payment page config[callback_form]

This is the callback form, or the payment page, and corresponds to the Callback url (form) setting in the Terminal settings.

For information about custom styling for the payment page, see Styling the payment page (callback_form).
OK page config[callback_ok]

This url is called when a payment succeeds, and corresponds to the Callback url (Ok) setting in Terminal settings. For more information, see Settings for the Payment OK page (callback_ok).

Fail page config[callback_fail]

This url is called when a payment fails, and corresponds to the Callback url (Fail) setting in Terminal settings. For more information, see Settings for the fail page (callback_fail).

Redirect page config[callback_redirect]

This url is called whenever the customer is redirected to a third party, and corresponds to the Callback url (redirect) setting in Terminal settings. For more information, see Settings for the redirect page (callback_redirect).

Open page config[callback_open]

This url is called when a payment returns with status Open, and corresponds to the Callback url (open) setting in Terminal settings. For more information, see Settings for the open page (callback_open).

Notification page config[callback_notification]

This url is called when a notification is returned after the customer has left the payment flow, and corresponds to the Callback url (notification) setting in Terminal settings. For more information, see Payment Notification (callback_notification)

Verify order page config[callback_verify_order]

This URL is called just before the payment is processed.

  • To return a value that is not part of the normal POST parameters, you can prepend GET parameters to the URL.
  • To allow the payment to proceed, you must return a HTTP response with code 200, and a HTML/TEXT response with the value "OKAY". Anything else results in an error message, and an aborted/declined transaction.

If the payment fails, the first 255 characters of your response is shown as an error message to the customer.