6DOT50 APIs
  • Redemptions API
    • Overview
    • Process Flow
    • Requests
    • Response Models
    • Payment Codes
    • Authentication
      • POST /authentication/getToken
  • Accounts
    • GET /accounts
    • GET /accounts/{id}/transactions
  • Initiate Payment
    • POST /payments
  • User Payment Pages
    • Authentication
    • Payment Confirmation
    • Payment Status
  • Payment Status
    • GET /payments/{id}
  • List Payments
    • GET /payments
  • Support
  • PAY API
    • Overview
    • API Keys
    • Endpoints
    • Process Flow
    • Requests
    • Response Models
    • Authentication
      • POST /authentication/getToken
    • Accounts
      • GET /accounts
    • Batches
      • POST /batches
      • GET /batches
      • GET /batches/{id}
      • PUT /batches/{id}
      • GET /batches/statusCodes
      • POST /batches/{id}/payments
      • GET /batches/{id}/payments
      • POST /batches/{id}/submit
      • POST /batches/{id}/cancel
    • Members
      • GET /members/{msisdn}/exists
    • Payments
      • GET /payments/{id}
      • DELETE /payments/{id}
      • GET /payments/statusCodes
  • Support
Powered by GitBook
On this page
  • Request
  • Response
  1. Initiate Payment

POST /payments

This operation will initiate a new payment for a user and the response will include a unique PaymentID to track the status of the transaction.

Request

Initiating a payment is performed by posting to /payments with the following body:

{
  "amount": "string",
  "currencyCode": "string",
  "accountId": "string($guid)",
  "reference": "string",
  "returnUrl": "string",
  "countryCode": "string"
}
Header
Mandatory
Description

Authorization

Yes

Body Field
Mandatory
Description

amount

Yes

The amount to request from the user in cents.

currencyCode

Yes

The payment currency to request from the user, e.g. DZAR

accountId

Yes

The unique ID of the merchant’s account to which to transfer the user’s payment to (if successful).

reference

Yes

A unique reference generated and supplied by your system. This reference will be displayed to the user should they have any queries for the payment.

returnUrl

No

The URL to redirect the user to once payment has been completed.

An id parameter will be appended to the returnUrl which can be used by the Merchant’s system to query the status of the Payment.

countryCode

Yes

Sample Request
{
  "amount": "10000",
  "currencyCode": "DZAR",
  "accountId": "00000000-0000-0000-0000-000000000000",
  "reference": "ref12345678",
  "returnUrl": "https://redirect.merchant.com",
  "countryCode": "ZA"
}

Response

If successful, the operation will return a payment initiation response:

{
  "id": "string($guid)",
  "reference": "string",
  "amount": "string",
  "accountId": "string($guid)",
  "currencyCode": "string",
  "statusCode": int,
  "statusMessage": "string",
  "errorCode": int,
  "errorMessage": "string",
  "createdAt": "string($date-time)"
}
Field
Response Type
Description

id

string($guid)

The unique Payment ID generated by 6DOT50 to be used in subsequent user redirects and method calls.

reference

string

Same value from Request.

amount

string

Same value from Request.

accountId

string($guid)

Same value from Request.

currencyCode

string

Same value from Request.

statusCode

int

statusMessage

string

errorCode

int

errorMessage

string

createdAt

string($date-time)

Time in UTC when the payment was created.

Sample Response
{
  "id": "009c3481-a65c-4afa-a950-1f5bce710493",
  "reference": "ref12345678",
  "amount": "10000",
  "accountId": "00000000-0000-0000-0000-000000000000",
  "currencyCode": "DZAR",
  "statusCode": 0,
  "statusMessage": "Payment is in progress",
  "errorCode": 0,
  "createdAt": "2022-09-26T11:40:47.33"
}

PreviousInitiate PaymentNextUser Payment Pages

Last updated 2 years ago

Bearer token from

See for obtaining the correct accountId.

The country code of the user who is requesting the payment. This is the Alpha-2 country code as defined by

Status code for the transaction. See for more information.

A display message for the status code. See for messages.

Error code for the transaction if it failed to create. See for more information

A display message for the error code. See for messages.

/authentication/getToken
Accounts
https://www.iban.com/country-codes
Payment Status Codes
Payment Status Codes
Payment Error Codes
Payment Error Codes