Payment Gateway V2

Post  https://api.bos.center/api/BOS/BOSPaymentGateway3


Before performing the BOS Payment Gateway API integration with the various products, you need to pass the Request Parameter given below like amount, currency, receipt, notes, registration ID, Company Name, Product Description, Buyer Name, Buyer Contact No and you will get the Order Id in response to that. This Order ID is a unique identifier that authenticates payment requests you make with BOS Centre.

Body Parameters
{                    
  "payerName": "john",
  "payerMobile": "9999999999",
  "amount": "10",
  "callbackUrl": "example@example.com",
  "RegistrationID": "BOS-554"
}                
Responses

200

200

403

403


Did this page help you?     Yes    No

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

cURL

curl --location 'https://api.bos.center/api/BOS/BOSPaymentGateway3' \
--header 'Content-Type: application/json' \
--data  '{
    "payerName": "john",
    "payerMobile": "9999999999",
    "amount": "10",
    "callbackUrl": "example@example.com",
    "RegistrationID": "BOS-554"
}'
                                
import requests
import json

url = 'https://api.bos.center/api/BOS/BOSPaymentGateway3'
payload = json.dumps({
    "payerName": "john",
    "payerMobile": "9999999999",
    "amount": "10",
    "callbackUrl": "example@example.com",
    "RegistrationID": "BOS-554"
}) 
headers = {
  "Content-type" : "application/json"
}

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

print (response.text)
                                
var requests = require("request");
var options = { 
  "method" : "POST",
  "url" : 'https://api.bos.center/api/BOS/BOSPaymentGateway3',
  "headers" : {
    "Content-Type" : 'application/json'
  },
  body: JSON.stringify({
    "payerName": "john",
    "payerMobile": "9999999999",
    "amount": "10",
    "callbackUrl": "example@example.com",
    "RegistrationID": "BOS-554"
  }) 
}; 
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.bos.center/api/BOS/BOSPaymentGateway3')
var content = new StringContent(
  "{
    "payerName": "john",
    "payerMobile": "9999999999",
    "amount": "10",
    "callbackUrl": "example@example.com",
    "RegistrationID": "BOS-554"
  }",
  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.bos.center/api/BOS/BOSPaymentGateway3',
  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 =>  '{
    "payerName": "john",
    "payerMobile": "9999999999",
    "amount": "10",
    "callbackUrl": "example@example.com",
    "RegistrationID": "BOS-554"
  }',
  CURLOPT_HTTPHEADER =>  array(
    'Content-Type: application/json'
  ),
));
$response =  curl_exec($curl);
curl_close($curl);
echo $response;
                                

RESPONSE

200

403

-Result

Example

{   
    "Status": "true",
    "code": "200",
    "Message": "Success",
    "PGOrderID": "CMP1045_WA_BOS-554_TERF112764",
    "PreparePOSTForm": "< id='PostForm' name='PostForm' action='https://securepay.sabpaisa.in/SabPaisa/sabPaisaInit?v=1' method='POST'> "
}
                                
{
    "Status": "403",
    "code": null,
    "Message": "Pay Customer Name is Required",
    "PGOrderID": null,
    "PreparePOSTForm": null
}