Skip to content

SUBSCRIPTION Callback for Charge Approval

| View as Markdown

SUBSCRIPTION - Callback for Charge Approval

Section titled “SUBSCRIPTION - Callback for Charge Approval”

This API will call the merchant url to take a confirmation from merchant whether to charge the recurring amount from customer or not. It will call before 2 or 1 days from the recurring date. We must pass subscription id, sb amount, sb date and order id in request. If the request has valid details, we will get a success response if we charge or do not charge.

If doesn’t get the response in first callback than will try next data before recurring.

If no callback api present than its automatic consider as approve to charge the recurring transaction.

https://examplemerchantwebsite.eg/subscriptionChargebackApproval
FieldTypeDescription
Content-TypeStringFor JSON: application/json
FieldTypeDescription
subscription_idNumberAirpay Subscription Id (required)
sb_amountNumberSubscription charge amount (required)
sb_dateDateSubscription charge date (required)
(Ex : DD-MM-YYYY)
order_idAlphanumericOrder ID (length 1-25) (required)
checksumAlphanumericChecksum (length 10-200) (required)
privatekey = hash(‘sha256’, secret.’@’.username.’:
{
"subscription_id": "1000001",
"order_id": "32434235435365",
"sb_amount": "2000.00",
"sb_date": "12-12-2020",
"checksum": "2e6cf436576f49276315b02c9fb02e75"
}
FieldTypeDescription
statusNumberStatus Code
200 : Approve, 400 : Reject
messageStringStatus Message for
200 : Approve, 400 : Reject
HTTP/1.1 200 OK
{
"status" : "200",
"message" : "Approve",
}
HTTP/1.1 200 OK
{
"status" : "400",
"message" : "Reject",
}