Create Redeem

Post  https://api.bospay.co.in/api/v1/Aopay/Enach/Redeem


The Redemption API is used to debit the payment from the user’s bank account as part of a recurring payment. By calling this API, the merchant requests the system to initiate the payment transfer to process the required amount from the user’s account. The targetDate must be set for a minimum of tomorrow and up to three days following the day the merchant requests redemption. For example, if the request is made on April 22nd, the target date can be the 23rd, 24th, or 25th, but not the 26th or a previous date

Body Parameters
{                    
  "registrationID": "AOP-XXX",
  "amount": 200,
  "merchantSubscriptionId": "AOPXXXSUBXXXXXX",
  "targetDate": "2026-08-30"                          
}                
Request Parameters
Name Type Description
RegistrationId String Registration ID provided during partner onboarding.
Amount Number Amount to be debited
MerchantSubscriptionId String The ID of the Active mandate to be debited
TargetDate String Scheduled date for the debit (YYYY-MM-DD)
Request Headers
Key Value
Content-Type application/json
X-API-TOKEN AOP_XXXXXXXXXXXX286XXXXX
X-REGISTRATION-ID AOP-XXX
Responses

200

200

401

401


Did this page help you?     Yes    No

Language
shell Shell
python Python
node Node
c# C#
php PHP

cURL

curl --location 'https://api.bospay.co.in/api/v1/Aopay/Enach/Redeem' \
--header 'Content-Type: application/json' \
--header 'X-API-TOKEN: AOP_XXXXXXXXXXXX286XXXXX' \
--header 'X-REGISTRATION-ID: AOP-XXX' \
--data  '{
    "registrationID": "AOP-XXX",
    "amount": 200,
    "merchantSubscriptionId": "AOPXXXSUBXXXXXX",
    "targetDate": "2026-08-30"
}'
                                
import requests
import json

url = 'https://api.bospay.co.in/api/v1/Aopay/Enach/Redeem'
payload = json.dumps({
    "registrationID": "AOP-XXX",
    "amount": 200,
    "merchantSubscriptionId": "AOPXXXSUBXXXXXX",
    "targetDate": "2026-08-30"
}) 
headers = {
  "Content-type" : "application/json"
  "X-API-TOKEN" : "AOP_XXXXXXXXXXXX286XXXXX",
  "X-REGISTRATION-ID" : "AOP-XXX"
}

response = requests.request("POST", url, headers=headers, data=payload)

print (response.text)
                                
var requests = require("request");
var options = { 
  "method" : "POST",
  "url" : 'https://api.bospay.co.in/api/v1/Aopay/Enach/Redeem',
  "headers" : {
    "Content-Type" : 'application/json'
    "X-API-TOKEN" : "AOP_XXXXXXXXXXXX286XXXXX",
    "X-REGISTRATION-ID" : "AOP-XXX"
  },
  body: JSON.stringify({
    "registrationID": "AOP-XXX",
    "amount": 200,
    "merchantSubscriptionId": "AOPXXXSUBXXXXXX",
    "targetDate": "2026-08-30"
  }) 
}; 
request(options, function(error, response){
   if(error) throw new Error(error);
   console.log(response.body); 
}); 
                                
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post,'https://api.bospay.co.in/api/v1/Aopay/Enach/Redeem')

request.Headers.Add("Content-type", "application/json");
request.Headers.Add("X-API-TOKEN", "AOP_XXXXXXXXXXXX286XXXXX");
request.Headers.Add("X-REGISTRATION-ID", "AOP-XXX");

var content = new StringContent(
  "{
    "registrationID": "AOP-XXX",
    "amount": 200,
    "merchantSubscriptionId": "AOPXXXSUBXXXXXX",
    "targetDate": "2026-08-30"
  }",
  null,"application/json"
); 

request.Content = content;
var response =  await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
                                
<?php
$curl =  curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL =>  'https://api.bospay.co.in/api/v1/Aopay/Enach/Redeem',
  CURLOPT_RETURNTRANSFER =>  true,
  CURLOPT_ENCODING =>  '',
  CURLOPT_MAXREDIRS =>  10,
  CURLOPT_TIMEOUT =>  0,
  CURLOPT_FOLLOWLOCATION =>  true,
  CURLOPT_HTTP_VERSION =>  CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST =>  'POST',
  CURLOPT_POSTFIELDS =>  '{
    "registrationID": "AOP-XXX",
    "amount": 200,
    "merchantSubscriptionId": "AOPXXXSUBXXXXXX",
    "targetDate": "2026-08-30"
  }',
  CURLOPT_HTTPHEADER =>  array(
    'Content-Type: application/json',
    'X-API-TOKEN: AOP_XXXXXXXXXXXX286XXXXX',
    'X-REGISTRATION-ID: AOP-XXX'
  ),
));
$response =  curl_exec($curl);
curl_close($curl);
echo $response;
                                

RESPONSE

200

401

-Result

Example

{   
    "transactionId": "AOPXXXREDXXXXXXXX_txn",
    "state": "PENDING",
    "success": true,
    "code": "",
    "message": "",
}
                                
{
    "Status": false,
    "Message": "Invalid API token or RegistrationID.",
    "ErrorCode": "INVALID_API_TOKEN",
    "StatusCode": 401,
    "RequestId": "55160861-9ccd-482b-85f4-c9521fd4d1ed",
}