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

NameTypeDescriptionOptional Mandatory
referenceStringUnique Transaction Reference Numberfalse
userIdStringCustomer Referencefalse
StringStringThe Transaction Amountfalse
amountStringThe Transaction Currencyfalse
currencyStringCallback URL on transaction completedtrue
callbackUrlBooleanThe version of the API calltrue

Request Body Example

{
  "reference": "143379339129",
  "userId": "ga",
  "amount": "51",
  "currency": "USD",
  "callbackUrl": "http://pgs.com",
  "isV2": false
}

Response Parameters

NameTypeDescription
referenceStringUnique Transaction Reference Number
clientIdStringApplication Name
paymentURLStringPayment provider payment URL
statusStringPayment Status
paymentChannelStringPayment Channel
paymentUrlReferenceStringPayment Unique Reference
externalPaymentReferenceStringExternal 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 CodeResponse MessageDescription
BAD_MESSAGE_ERRORUnexpected value sent for field paymentChannelMust be USSD, CARD, ACCOUNT OR DEFAULT
VALIDATION_ERRORpayment reference is requiredEnter Reference
VALIDATION_ERRORcustomer reference is requiredEnter Customer ID
BAD_MESSAGE_ERRORUnexpected value sent for field currencyMust be either USD for dollar transactions, NGN for Naira transactions, GHS for Cedis transactions
BAD_MESSAGE_ERRORRequest sent cannot be convertedAmount must be numerical format

Did you find this page helpful?