Payment Collection

Once you’ve verified your merchant account you will have access to a Merchant Portal where you will see records of transactions made for your goods and services sold via ARAKA and the ability to create and manage payment pages. Go to https://merchant.arakapay.com/ and login with your account’s credentials.

With an ARAKA Merchant account, you can accept payments for your goods and services in the following ways:

1. One-time Payment Page

A one-time payment page is the easiest way to collect payments without performing any code related integrations on your website. The one-time payment page can be accessed by a link which you can share with your customers via email, WhatsApp, Twitter or any medium of your choice. This link is also unique to your business, and all your customer has to do is open it and pay you. Take the following steps to create a one-time payment page:

  • Login to the ARAKA Merchant Portal with the account you created
  • Navigate to Payment Pages located on the sidebar to the left of the screen
  • Click on “New Page”
  • From the option modal that appears, select “One-time Payment”
  • Fill in the details that are required and click “Create Page”
  • On the “Payment Page” screen (see Figure 4) you will see the page you just created.
  • Click on “View” to see the details of the payment page you just created.
  • Copy the Payment Page URL and share to your customers.

2. API Integration

For Merchants who prefer to use plain old API requests, there is the possibility of using our API.

The API requires a bearer token that can be obtained by using our login endpoint. Subsequent requests should always include this bearer token in the Authorization header of the request.

A swagger page containing postman collections can always be obtained here:

https://araka-api-uat.azurewebsites.net/swagger/index.html
2.2 Payment Request
POST /api/pay/paymentrequest

This endpoint allows the caller to request payments from a payee.

Access to this endpoint requires setup changes on your account. Contact the technical team for this configuration to be completed.

Payment Request Flow:

payment-request-flow

The table below provides information about the properties expected in the payload to be sent to this request:

PropertyDataType (maxSize)RequiredDescription
OrderObjectYesInformation about the operation to be performed
Order.PaymentpageidString(20)YesIdentifier for payment page. Refer to the section marked 2.1 (One Time Payment Page) the ID is the last part of your payment page URL eg: https://merchant.arakapay.com/payment/xxxx. Where xxxx is the paymentpageid
Order.customerFullNameString(180)NoFull Name for customer
Order.customerPhoneNumberString(180)NoPhone Number of the customer
Order.transactionReferenceString(20)YesReference transaction ID from source request to be used in reconciliations
Order.customerEmailAddressString(180)NoEmail address of the customer
Order.currencyString(3)YesChar 3 ISO currency code
Order.amountDecimal(8,2)YesAmount involved in the transaction
Order.redirectURLString(400)URL where result of the transaction is to be sent after completion of the operation. This endpoint should support POST and redirect.
PaymentChannelObjectYesInformation about the payment channel the client should use in completing the transaction
PaymentChannel.channelString(30)YesThe channel to be used for payments. Eg (MOBILEWALLET)
PaymentChannel.providerObjectYesThe Provider to be used to process the payment (MPESA,AIRTEL,ORANGE,AFRIMONEY)
PaymentChannel.walletidString(14)Yesphone number in international format (+243XXXX…)
Request Formats
Sample Request
{
  "order": {
    "paymentPageId": "string",
    "customerFullName": "string",
    "customerPhoneNumber": "string",
    "customerEmailAddress": "string",
    "transactionReference": "string",
    "amount": 0,
    "currency": "string",//USD,CDF
    "redirectURL": "string"
  },
  "paymentChannel": {
    "channel": "string", //MOBILEMONEY,CARD
    "provider": "string", //MPESA,AIRTEL,ORANGE, AFRIMONEY
    "walletID": "string" //MSISDN
  }
}
Response Information
Sample Response
{
  "transactionId": "string",
  "originatingTransactionId": "string",
  "statusCode": "202",
  "statusDescription": "ACCEPTED"
}

NB: To guarantee callback payload integrity, this flow supports HMAC encryption. To enable this, the user must pass the following in the header of the original payment request:

KeyValue
X-API-CALLBACK-MODE2

A private key shall be shared with the integrator on request to use in the decryption of the callback message. The signature of the payload shall be passed in the header of the response with the Key: X-APP-SIGNATURE. The following is an example of how to verify the payload with the signature in C#:

public static bool VerifyCallback(string receivedPayload, string receivedSignature, string sharedSecretKey)
{
    byte[] keyBytes = Encoding.UTF8.GetBytes(sharedSecretKey);
    byte[] payloadBytes = Encoding.UTF8.GetBytes(receivedPayload);
    byte[] signatureBytes = Convert.FromBase64String(receivedSignature);

    using (var hmac = new HMACSHA256(keyBytes))
    {
        byte[] calculatedHash = hmac.ComputeHash(payloadBytes);

        // Compare the calculated hash with the received signature
        return CryptographicOperations.FixedTimeEquals(calculatedHash, signatureBytes);
    }
}
Callback Response Information
KeyValue
X-APP-SIGNATURExxxxxxxxxxxx
Sample Response
{
  "transactionId": "string",
  "originatingTransactionId": "string”,
  “statusCode”:”200”,
  “statusDescription”:”string”, //APPROVED,DECLINED,PENDING
}
2.3 Status Inquiry
GET api/reporting/transactionstatus/{transactionid}

Access to this endpoint requires setup changes on your account. Contact the technical team for this configuration to be completed.

Request Formats
api/reporting/transactionstatus/xxxx

Where xxxx is the transactionId received in the transaction request

Response Information
Sample Response
{
  "transactionId": "string",
  "originatingTransactionId": "string”,
  “statusDescription”:”string”, //APPROVED,DECLINED,PENDING
  “statusCode”:”200”
}
GET api/reporting/transactionstatusbyreference/{ transactionReference }

Access to this endpoint requires setup changes on your account. Contact the technical team for this configuration to be completed.

Request Formats
api/reporting/transactionstatusbyreference/xxxx

Where xxxx is the transactionReference sent in the original transaction request

Response Information
Sample Response
{
  "transactionId": "string",
  "originatingTransactionId": "string”,
  “status”:”string”, //APPROVED,DECLINED,PENDING
  “statusCode”:”200”,
  “transactionDate”:”string”

}