GET /payments/{id}

Use this operation to query the status of a particular payment. It is typically used when the user is redirected back to your redirectUrl, so that you can decide how to handle the payment status during your check out process.

See Payment Status Codes to determine the status of the payment.

Request

Ensure the bearer token is included in the Header of the GET operation:

Header
Mandatory
Description

Authorization

Yes

Bearer token from /authentication/getToken

Parameter
Mandatory
Description

id

Yes

The 6DOT50 unique Payment ID (paymentId) to query.

Response

If successful, the operation will return with a standard Payment model:

{
  "id": "string($guid)",
  "reference": "string",
  "amount": "string",
  "accountId": "string($guid)",
  "currencyCode": "string",
  "statusCode": int,
  "statusMessage": "string",
  "errorCode": int,
  "errorMessage": "string",
  "createdAt": "string($date-time)",
  "completedAt": " string($date-time)",
  "countryCode": "string",
  "returnUrl": "string"
}
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

Status code for the transaction. See Payment Status Codes for more information.

statusMessage

string

A display message for the status code. See Payment Status Codes for messages.

errorCode

int

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

errorMessage

string

A display message for the error code. See Payment Error Codes for messages.

createdAt

string($date-time)

Time in UTC when the payment was created.

completedAt

string($date-time)

Time in UTC when the payment was completed (final state).

Sample Response
{
  "id": "009c3481-a65c-4afa-a950-1f5bce710493",
  "reference": "ref12345678",
  "amount": "10000",
  "accountId": "00000000-0000-0000-0000-00000000000",
  "currencyCode": "DZAR",
  "statusCode": 0,
  "statusMessage": "Payment is in progress",
  "errorCode": 0,
  "createdAt": "2022-09-26T11:40:47.33",
  "countryCode": "ZA",
  "returnUrl": "https://redirect.merchant.com"
}

Last updated