SUBSCRIPTION Callback for Charge Approval
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/subscriptionChargebackApprovalHeader
Section titled “Header”| Field | Type | Description |
|---|---|---|
| Content-Type | String | For JSON: application/json |
Parameter
Section titled “Parameter”| Field | Type | Description |
|---|---|---|
| subscription_id | Number | Airpay Subscription Id (required) |
| sb_amount | Number | Subscription charge amount (required) |
| sb_date | Date | Subscription charge date (required) (Ex : DD-MM-YYYY) |
| order_id | Alphanumeric | Order ID (length 1-25) (required) |
| checksum | Alphanumeric | Checksum (length 10-200) (required) privatekey = hash(‘sha256’, secret.’@’.username.’: |
Request-Example:
Section titled “Request-Example:”{ "subscription_id": "1000001", "order_id": "32434235435365", "sb_amount": "2000.00", "sb_date": "12-12-2020", "checksum": "2e6cf436576f49276315b02c9fb02e75"}Success 200
Section titled “Success 200”| Field | Type | Description |
|---|---|---|
| status | Number | Status Code 200 : Approve, 400 : Reject |
| message | String | Status Message for 200 : Approve, 400 : Reject |
For charge response as:
Section titled “For charge response as:” HTTP/1.1 200 OK { "status" : "200", "message" : "Approve", }For do not charge response as:
Section titled “For do not charge response as:” HTTP/1.1 200 OK { "status" : "400", "message" : "Reject", }