Skip to main content
Version: Lastest

Process payment result

After the customer completes the payment process, the AppotaPay system notifies the partner system of the transaction result via IPN.

Note
  • Carefully verify the status, amount, and signature parameters before confirming a successful transaction.
  • It is recommended to call the transaction status check API to ensure the result is updated accurately.
  • Use the signature parameter to verify data integrity. The partner system must generate a signature from the received data and compare it with the signature provided by AppotaPay.
  • IPN is sent only when the transaction reaches a final status: success, void, or error.

EndPoint

POST URL-IPN-PARTNER

Header Params

ParameterRequirementData typesDescription
Content-TyperequiredStringValue: application/json
{
"Content-Type": "application/json"
}

Request Params

ParameterRequirementData typesDescription
datarequiredStringTransaction information is encoded in Base64 and JSON format
signaturerequiredStringHMAC_SECRETSHA256(data,SECRET_KEY)

Data decoding

  1. The partner uses the Base64Decode function to decode the data in string format.
  2. The JSON_Decode function is used to decode the data a second time into JSON format.
ParameterData typesDescriptionNotes
transactionObjectTransaction information
transaction.transaction_idStringTransaction ID
transaction.order_idStringOrder ID
transaction.partner_ref_idStringPartner reference transaction ID
transaction.order_infoStringOrder information
transaction.statusStringTransaction status

pending = The transaction is pending.

processing = The transaction is being processed.

success = The transaction is successful.

error = The transaction has failed.

void = The transaction has been refunded.

transaction.amountIntegerPayment amount
transaction.bank_codeStringBank codes *APPOTA: payment method = QR
transaction.bank_typeString*EWALLET: payment method = QR
transaction.error_codeIntegerTransaction error code (Note: returned only if status != success)
transaction.error_messageStringTransaction status details (Note: returned only if status != success)
transaction.payment_methodStringPayment methods
transaction.created_atStringTransaction creation time (ISO 8601 format)
transaction.paid_atStringTransaction payment time (ISO 8601 format)
versionStringVersion IPN
TimestringTransaction confirm time (ISO 8601 format)

Success

HTTP Code: 200

Body: {"status": "ok"}

Failure

HTTP Status Code != 200

ParameterData typesDescription
error_codeStringError code
error_messageStringError code description