---
title: Subscription Callback
description: Confirm whether to charge a recurring amount from a customer before the scheduled date.
---

The Recurring Payment Confirmation API is used to call the merchant's URL to confirm whether to charge a recurring amount from a customer, with the call initiated one or two days before the scheduled recurring payment date. The request must include the subscription ID, subscription amount, subscription date, and order ID. Upon receiving valid request details, the API returns a success response indicating whether the charge should proceed or not. If no response is received on the first callback attempt, the system will retry the following day before the recurring date. If no callback API is available, the recurring transaction is automatically considered approved for charging.

#### POST

```
https://examplemerchantwebsite.eg/subscriptionChargebackApproval
```

## Header

| Parameter | Type Value | Description | Value Like |
| --- | --- | --- | --- |
| Content-Type  required | String | The Content-Type header specifies the media type of the request or response body, allowing the receiver to correctly interpret the data. For XML data, use application/xml. | `For JSON: application/json,For XML: application/xml` |

## Request Body

| Parameter | Type Value | Description | Value Like |
| --- | --- | --- | --- |
| subscription_id  required | Number | airpay Subscription Id | `1000001` |
| sb_amount  required | Number | Subscription charge amount | `2000.00` |
| sb_date  required | Date | Subscription charge date<br>(Ex : DD-MM-YYYY) | `12-12-2020` |
| order_id  required | Alphanumeric  <br>(1-25) | Order ID | `32434235435365` |
| checksum  required | Alphanumeric  <br>(10-200) | Checksum<br>privatekey = hash('sha256', secret.'@'.username.':|:'.password)<br>Hash generated by: hash_hmac('sha256', subscription_id+private_key+ merchant_id+sb_amount, <secret_key>)<br>Note: Use the same secret key, username and password provided on payment kit to generate private key | `2e6cf436576f49276315b02c9fb02e75` |

## Success 200

| Parameter | Type Value | Description | Value Like |
| --- | --- | --- | --- |
| status  required | Number | Status Code<br>200 : Approve, 400 : Reject | `200,400` |
| message  required | String | Status Message<br>200 : Approve, 400 : Reject | `Approve,Reject` |

## Request Example

```json
{
    "subscription_id" : "1000001",
    "order_id": "32434235435365",
    "sb_amount" : "2000.00",
    "sb_date" : "12-12-2020",
    "checksum" : "2e6cf436576f49276315b02c9fb02e75"
}
```

### Success Response (Approve)

```json
HTTP/1.1 200 OK
 {
        "status" : "200",
        "message" : "Approve",
 }
```

### Success Response (Reject)

```json
HTTP/1.1 200 OK
 {
        "status" : "400",
        "message" : "Reject",
 }
```