Create Payment V2
Endpoint
{{URL}}/api/pgs/payment/v2/createPayment
This is the first endpoint that is called regardless of payment method to be used.
AUTHORIZATION
Basic Auth
DESCRIPTION
This endpoint allows you to initiate a payment transaction…
Request Parameters
| Name | Type | Description | Optional Mandatory |
| reference | String | Unique Transaction Reference Number | false |
| userId | String | Customer Reference | false |
| String | String | The Transaction Amount | false |
| amount | String | The Transaction Currency | false |
| currency | String | Callback URL on transaction completed | true |
| callbackUrl | Boolean | The version of the API call | true |
Request Body Example
{
"reference": "143379339129",
"userId": "ga",
"amount": "51",
"currency": "USD",
"callbackUrl": "http://pgs.com",
"isV2": false
}Response Parameters
| Name | Type | Description |
| reference | String | Unique Transaction Reference Number |
| clientId | String | Application Name |
| paymentURL | String | Payment provider payment URL |
| status | String | Payment Status |
| paymentChannel | String | Payment Channel |
| paymentUrlReference | String | Payment Unique Reference |
| externalPaymentReference | String | External Payment Unique Reference |
Response Body Example
{
"reference": "143379339129",
"clientId": "admintest7",
"paymentUrl": "https://sandbox.globalaccelerex.com:6038/pay/16661108ZjGG7aY39B",
"status": "CREATED",
"paymentChannel": "DEFAULT",
"paymentUrlReference": "16661108ZjGG7aY39B",
"externalPaymentReference": "16661108ZjGG7aY39B"
}Error Responses
| Response Code | Response Message | Description |
| BAD_MESSAGE_ERROR | Unexpected value sent for field paymentChannel | Must be USSD, CARD, ACCOUNT OR DEFAULT |
| VALIDATION_ERROR | payment reference is required | Enter Reference |
| VALIDATION_ERROR | customer reference is required | Enter Customer ID |
| BAD_MESSAGE_ERROR | Unexpected value sent for field currency | Must be either USD for dollar transactions, NGN for Naira transactions, GHS for Cedis transactions |
| BAD_MESSAGE_ERROR | Request sent cannot be converted | Amount must be numerical format |
Did you find this page helpful?