Skip to main content

Handling Postback Requests

Swagger

Request Body Interface

{
"publicKey": "string",
"hash": "string",

"id": 0,
"status": "string",
"failedCode": "string" || null,
"paymentMethodId": "string",
"amount": 0,
"currency": "string",
"clientFieldsValues": [
{
"key": "string",
"value": "string"
}
],
"merchantPaymentId": "string",
"merchantUserId": "string",

"createdAt": "2023-11-13T20:20:15.221Z",

"payments": [
{
"id": 0,
"status": "string",
"failedCode": "string" || null,
"paymentMethodId": "string",
"amount": 0,
"currency": "string",
"clientFieldsValues": [
{
"key": "string",
"value": "string"
}
],
"merchantPaymentId": "string",
"merchantUserId": "string",

"createdAt": "2023-11-13T20:20:15.221Z"
}
]
}

Table Describing All Fields in the Request Body

FieldTypeRequiredDescription
publicKeyStringYesFirstPay public key required for validating the request body.
hashStringYesThe encoded string of the request body. For information on how to validate it, see the "Authorization" section.
idNumberYesPayment ID in the FirstPay system.
statusEnumYesPayment status in the FirstPay system. The response will always be either SUCCESS or FAILED.
failedCodeEnumYesThis field characterizes the error when making a payment. If status=`SUCCESS`, then `null` will be returned in this field. If status=`FAILED`, then failedCode will contain one of the values: `INCORRECT_AMOUNT` (incorrect amount of funds transferred), `NO_AMOUNT` (funds were not transferred), `INCORRECT_FIELDS` (fields in the form were filled in incorrectly), `ANOTHER_REASON` (another error not related to the above).
paymentMethodIdStringYesPayment method ID.
amountNumberYesPayment amount.
currencyEnumYesISO currency code: USD, INR, BDT, PKR, etc.
clientFieldsValuesArrayYesArray of fields filled by the user. All these fields are sent when the merchant creates a payment.
keyStringYesField identifier / ID.
valueStringYesValue entered by the user.
merchantPaymentIdStringNoOptional field. Payment ID in the merchant’s system. Provided if specified during payment creation.
merchantUserIdStringNoOptional field. User ID in the merchant’s system. Provided if specified during payment creation.
createdAtStringYesUTC timestamp of payment creation.
payments (deprecated)ArrayYesArray of user payments.
idNumberYesPayment ID in the FirstPay system.
statusEnumYesPayment status in the FirstPay system. The response will always be either SUCCESS or FAILED.
failedCodeEnumYesThis field characterizes the error when making a payment. If status=`SUCCESS`, then `null` will be returned in this field. If status=`FAILED`, then failedCode will contain one of the values: `INCORRECT_AMOUNT` (incorrect amount of funds transferred), `NO_AMOUNT` (funds were not transferred), `INCORRECT_FIELDS` (fields in the form were filled in incorrectly), `ANOTHER_REASON` (another error not related to the above).
paymentMethodIdStringYesPayment method ID.
amountNumberYesPayment amount.
currencyEnumYesISO currency code: USD, INR, BDT, PKR, etc.
clientFieldsValuesArrayYesArray of fields filled by the user. All these fields are sent when the merchant creates a payment.
keyStringYesField identifier / ID.
valueStringYesValue entered by the user.
merchantPaymentIdStringNoOptional field. Payment ID in the merchant’s system. Provided if specified during payment creation.
merchantUserIdStringNoOptional field. User ID in the merchant’s system. Provided if specified during payment creation.
createdAtStringYesUTC timestamp of payment creation.