Payment Gateway

Post  https://api.aopay.co.in/api/AOP/BOSPaymentGateway3


Before integrating the AOP Payment Gateway API with your products, you need to send a request with the required parameters, including payer name, payer mobile number, amount, callback URL, and registration ID. In response, you will receive a unique PGOrderID, which acts as an identifier for the transaction and must be used in all subsequent payment-related requests made through AOPay.

Body Parameters
{                    
  "payerName": "john",
  "payerMobile": "9999999999",
  "amount": "10",
  "callbackUrl": "https://ExamplePaymentGateway_Callback",
  "RegistrationID": "AOP-554"
}                
Request Parameters
Name Type Description
PayerName String Name of the person making the payment.
PayerMobile String Mobile number of the payer, typically used for notifications or verification.
Amount String The amount being paid by the customer in this transaction.
CallbackUrl String The URL address where the payment response or status should be sent.
RegistrationID String Unique registration identifier, often tied to the user.
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.aopay.co.in/api/AOP/BOSPaymentGateway3' \
--header 'Content-Type: application/json' \
--data  '{
    "payerName": "john",
    "payerMobile": "9999999999",
    "amount": "10",
    "callbackUrl": "https://ExamplePaymentGateway_Callback",
    "RegistrationID": "AOP-554"
}'
                                
import requests
import json

url = 'https://api.aopay.co.in/api/AOP/BOSPaymentGateway3'
payload = json.dumps({
    "payerName": "john",
    "payerMobile": "9999999999",
    "amount": "10",
    "callbackUrl": "https://ExamplePaymentGateway_Callback",
    "RegistrationID": "AOP-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.aopay.co.in/api/AOP/BOSPaymentGateway3',
  "headers" : {
    "Content-Type" : 'application/json'
  },
  body: JSON.stringify({
    "payerName": "john",
    "payerMobile": "9999999999",
    "amount": "10",
    "callbackUrl": "https://ExamplePaymentGateway_Callback",
    "RegistrationID": "AOP-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.aopay.co.in/api/AOP/BOSPaymentGateway3')
var content = new StringContent(
  "{
    "payerName": "john",
    "payerMobile": "9999999999",
    "amount": "10",
    "callbackUrl": "https://ExamplePaymentGateway_Callback",
    "RegistrationID": "AOP-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.aopay.co.in/api/AOP/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": "https://ExamplePaymentGateway_Callback",
    "RegistrationID": "AOP-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_AOP-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
}