Use this API if you need to query the status of a payment
Optionally used in Gateway Integration
Overview
This API is used when there is a use case to query the payment status in addition to the callback URLs that we redirect to in our payment gateway.
In order to use this API effectively, the original externalReference
that was provided in the Pay1st Payment link should be used.
API Description
List of Statuses
Status | Description |
---|---|
NEW | Transaction created, but payment has not been processed. |
PENDING | Payment is processing. |
SUCCESSFUL | Payment has been completed successfully. |
FAILED | Payment has failed. |
CANCELLED | Payment has been cancelled by the customer. |
ABANDONED | Payment was not completed, and session has expired. |
HTTP Headers
Header | Description/Value |
---|---|
Content-Type | application/json |
Authorization | Basic <token> |
Note: The basic auth credentials will need to be provided by the Pay1st representative before using this API.
URL Format
GET: /api/fulfilments/status?externalReference=<reference>
Success Response
Valid HTTP Status Codes
- 200 - Success
HTTP Response Body
{
"reference": "C-12345679887665-P",
"externalReference": "EXT_REF",
"playerId": "12345",
"productBundleId": 1,
"amount": 1000,
"currency": "ZAR",
"paymentMethod": "Kuda Bank",
"tokensPurchased": 11,
"digitalCurrency": {
"name": "Credits",
"code": "CRE"
},
"status": "SUCCESSFUL"
}
Failure Response
Valid
- 400 - Bad Request
- 404 - Not Found