Card Payments

ALATpay allows merchants to accept payments from both local and international cards.

Prerequisites

  • Head over to our ALATpay portal to create an account if you don’t already have one.

  • Add your business under the settings tab on the merchant portal.

  • Select Debit Card as a payment option.

  • Provide your callback URL – it is important for your business to be duly notified of card transaction statuses.

  • Take note of the assigned business ID to your newly created business.

Step 1: Initialize Card

This is a first background call to validate card and initialize payment transactionId. The transactionId is required to authenticate the card when payment instructions are sent using the Authenticate Card endpoint

It is recommended to call the endpoint below on the background when customer completes inputting card details.

Request Payload

{baseurl}/api/v1/paymentCard/mc/initialize

{

"cardNumber": "5123450000000008",

"currency":"USD",

"businessId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"

}

In the response of this endpoint, look out for the parameter "gatewayRecommendation". It's possible values include:

  • "gatewayRecommendation": "PROCEED", - This means the card meets the required security validation to proceed.

  • "gatewayRecommendation": "DO NOT PROCEED", - This means the card does not meet the required security validations, and so customer’s card cannot not be used to perform online transactions at this time.

Response Payload

{

"status": true,

"message": "Success",

"data":

{

"gatewayRecommendation": "PROCEED",

"transactionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",

"orderId": "ala12324nu8238"

}

}

Step 2: Authenticate Card

Using the transactionId generated from the Initialize Card endpoint, input card details in full and initial transactionId to initiate a 3DSecure dialog for authentication.

Call this endpoint when user clicks on the Pay Button.

NOTE:

  • A callback would be made to the URL provided for this business using the merchant portal. Details of the callback model follow the response model of the Get Single Transaction.

  • Details of the transaction can be retrieved using the Get Single Transaction of the Transaction API.

{baseurl}/api/v1/paymentCard/mc/authenticate

{
  "cardNumber": "5123450000000008",
  "cardMonth": "1",
  "cardYear": "39",
  "securityCode": "100",
  "businessId": "9245fe4a-d402-451c-b9ed-9c1a04247482",
  "businessName": "string",
  "amount": 1000.0,
  "currency": "USD",
  "orderId": "string",
  "description": "ALATPay Checkout Payment",
  "channel": "string",
  "customer":
    {
      "email": "jane.joe@email.com",
      "phone": "+23480000000001",
      "firstName": "Jane",
      "lastName": "+23480000000001",
      "metadata": "string"
    },
  "transactionId": "9245fe4a-d402-451c-b9ed-9c1a04247482"
}

In the response of this endpoint, look out for the parameter "gatewayRecommendation". It's possible values include:

  • "gatewayRecommendation": "PROCEED", - This means the card meets the required security validation to proceed.

  • "gatewayRecommendation": "DO NOT PROCEED", - This means the card does not meet the required security validations, and so customer’s card cannot not be used to perform online transactions at this time.

  • "redirectHtml": This the checkout page returned from MasterCard to enable end-user payout out.

  • "transactionId": This is for warehousing purpose this it is an identity for a particular transaction performed per time by end-users.

  • "orderId": This identifier signifies a unique generate transactional ids for each card payment. It has a prefix of each merchant's name appended to it followed by unique values. This is for warehousing purpose this it is an identity for a particular transaction performed per time by end-users

Card Authenticate Response

{

"status": true,

"message": "Success",

"data": {

"redirectHtml": "string",

"gatewayRecommendation": "string",

"transactionId": "string",

"orderId": "string"

}

}

Next Step:

Setup Transaction Monitoring.