Payments API

Overview

AceHub Payments API provides support for all payment services, including payment authorization, capture, credit and refund. It also allows access to information from previous payment operations.

Both Synchronous and Asynchronous payment flows are supported by the AceHub platform. Depending on the payment brand chosen to process the payment the appropriate flow will be triggered by the Payments API.

Synchronous Payment Flow

The figure below shows a synchronous payment (or direct payment) flow that performs a server-to-server call in AceHub:

AceHub - Synchronous Payment Flow

AceHub - Synchronous Payment Flow

Steps

  1. Consumer starts the payment process on the Merchant's website.
  2. Merchant sends a payment request to AceHub.
  3. Merchant receives the payment result from AceHub.
  4. Consumer receives the payment result from the Merchant.

Asynchronous Payment Flow

The figure below shows an asynchronous payment (or redirect payment) flow where an action is performed by the Consumer before the payment transaction is finished. This action is required by the payment brand (a third party) to further authorize the Consumer to perform the payment.

AceHub - Asynchronous Payment Flow

AceHub - Asynchronous Payment Flow

Steps

  1. Consumer starts the payment process on the Merchant's website.
  2. Merchant sends a payment request to AceHub.
  3. Merchant receives a payment response from AceHub.
  4. Consumer receives a redirection URL to the payment provider page, through the browser.
  5. Consumer is redirected to the payment provider page.
  6. Consumer fills in sensitive data to be validated on the payment provider page. The payment is then performed.
  7. The Payment provider performs a call back to AceHub to confirm that the payment has been performed.
  8. Consumer is then redirected to the final page of the payment flow which contains the result of the transaction.

Get Payment

Merchants can ask AceHub for the status of a payment at any time. The figure below shows the Get payment flow in AceHub:

AceHub - Get Payment Flow

AceHub - Get Payment Flow

Steps

  1. Merchant requests the payment status from AceHub (either by payment id or by tracking code).
  2. AceHub returns the payment status to the Merchant.

Redirect a Consumer

There are two ways to redirect a Consumer - with GET and with POST as explained below:

Redirect with GET

If the {body.redirect.method} is GET, the Consumer can simply be redirected by using the {body.redirect.url} from the response to the payment or authorize call. The fields in {body.redirect.fields} need to be included as query string parameters in that URL.

Redirect with POST

If the {body.redirect.method} is POST, an HTML form should be created with the key-value pairs in the {body.redirect.fields} as hidden form fields. This form should be sent to the Consumer's browser to be automatically submitted and redirected to the URL in {body.redirect.url}.

Payments API


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.


Top