---
title: SUBSCRIPTION Callback for Charge Approval
description: This API will call the merchant url to take a confirmation from merchant whether to charge the recurring amount from customer or not.
---

# 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.

## POST

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

## Header

| Field | Type | Description |
| --- | --- | --- |
| Content-Type | String | For JSON: application/json |

## 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)<br>(Ex : DD-MM-YYYY) |
| order_id | Alphanumeric | Order ID (length 1-25) (required) |
| checksum | Alphanumeric | Checksum (length 10-200) (required)<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 |

## Request-Example:

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

## Success 200

| Field | Type | Description |
| --- | --- | --- |
| status | Number | Status Code<br>200 : Approve, 400 : Reject |
| message | String | Status Message for<br>200 : Approve, 400 : Reject |
## For charge response as:

```
    HTTP/1.1 200 OK
     {
	        "status" : "200",
	        "message" : "Approve",
     }
```
## For do not charge response as:
```
    HTTP/1.1 200 OK
     {
	        "status" : "400",
	        "message" : "Reject",
     }
```