Payment Gateway Order Status

Post  https://api.bospay.co.in/api/v1/Aopay/PaymentGateway


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
{                    
  "registrationID": "AOP-XXX",
  "orderId": "AOPXXXPGXXXXXXXXX"
}                
Request Parameters
Name Type Description
RegistrationID String Registration ID provided during partner onboarding.
OrderID String Order id generated from payment gateway.
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/PaymentGateway' \
--header 'Content-Type: application/json' \
--header 'X-API-TOKEN: AOP_XXXXXXXXXXXX286XXXXX' \
--header 'X-REGISTRATION-ID: AOP-XXX' \
--data  '{
    "registrationID": "AOP-XXX",
    "orderId": "AOPXXXPGXXXXXXXXX"
}'
                                
import requests
import json

url = 'https://api.bospay.co.in/api/v1/Aopay/PaymentGateway'
payload = json.dumps({
    "registrationID": "AOP-XXX",
    "orderId": "AOPXXXPGXXXXXXXXX"
}) 
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/PaymentGateway',
  "headers" : {
    "Content-Type" : 'application/json'
    "X-API-TOKEN" : "AOP_XXXXXXXXXXXX286XXXXX",
    "X-REGISTRATION-ID" : "AOP-XXX"
  },
  body: JSON.stringify({
    "registrationID": "AOP-XXX",
    "orderId": "AOPXXXPGXXXXXXXXX"
  }) 
}; 
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/PaymentGateway')

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",
    "orderId": "AOPXXXPGXXXXXXXXX"
  }",
  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/PaymentGateway',
  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",
    "orderId": "AOPXXXPGXXXXXXXXX"
  }',
  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

{   
    "merchantOrderId": "AOPXXXPGXXXXXXXXX",
    "orderId": "OMXXXXXXXXXXXXXXXXXXXX",
    "state": "FAILED",
    "amount": 10,
    "currency": "INR",
    "expireAt": 1788609214479,
    "metaInfo": {
         "udf1": "AOP-554",
         "udf2": null,
         "udf3": null,
         "udf4": null,
         "udf5": null,
         "udf6": null,
         "udf7": null,
         "udf8": null,
         "udf9": null,
         "udf10": null,
         "udf11": null,
         "udf12": null,
         "udf13": null,
         "udf14": null,
         "udf15": null,
    },
    "paymentDetails": []
}
                                
{
    "Status": false,
    "Message": "Invalid API token or RegistrationID.",
    "ErrorCode": "INVALID_API_TOKEN",
    "StatusCode": 401,
    "RequestId": "55160861-9ccd-482b-85f4-c9521fd4d1ed",
}