Create a Standard Payment Link

Post  https://api.aopay.co.in/api/AOP/V4/StandardPaymentLink


In this API, you will pass the RegistrationID, Name, EmailID, MobileNo, and amount as request parameters to initiate the transaction process. The response will include the necessary details related to the payment request, allowing you to proceed with the next steps in the integration workflow.

Body Parameters
{
  "RegistrationID": "AOP-554",
  "Name": "Jon Doe",
  "EmailID": "example@gmail.com",
  "MobileNo": "9999999999",
  "amount": "10"
}
Request Parameters
Name Type Description
RegistrationID String Unique registration identifier, often tied to the user.
Name String Full name of the user or payer.
EmailID String Email address of the user, used for communication, receipts, or verification .
MobileNo String Mobile number of the user, often used for verification or notifications .
amount String The amount being paid by the customer in this transaction.
Responses

200

200

Response

200

RESPONSE BODY

object

status    string

subCode    string

message    string

qrCode    string

virtualVPA    string

400

400

Response

400

RESPONSE BODY

Object

status string

subCode string

message string


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/V4/StandardPaymentLink' \
--header 'Content-Type: application/json' \
--data  '{
  "RegistrationID": "AOP-554",
  "Name": "Jon Doe",
  "EmailID": "example@gmail.com",
  "MobileNo": "9999999999",
  "amount": "10"
}'
                                
import requests
import json

url = 'https://api.aopay.co.in/api/AOP/V4/StandardPaymentLink'
payload = json.dumps({
  "RegistrationID": "AOP-554",
  "Name": "Jon Doe",
  "EmailID": "example@gmail.com",
  "MobileNo": "9999999999",
  "amount": "10"
}) 

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/V4/StandardPaymentLink',
  "headers" : {
    "Content-Type" : 'application/json'
  },
  body: JSON.stringify({
    "RegistrationID": "AOP-554",
    "Name": "Jon Doe",
    "EmailID": "example@gmail.com",
    "MobileNo": "9999999999",
    "amount": "10"
  }) 
}; 
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/V4/StandardPaymentLink')
var content = new StringContent(
  "{
    "RegistrationID": "AOP-554",
    "Name": "Jon Doe",
    "EmailID": "example@gmail.com",
    "MobileNo": "9999999999",
    "amount": "10"
  }",
  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/V4/StandardPaymentLink',
  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-554",
    "Name": "Jon Doe",
    "EmailID": "example@gmail.com",
    "MobileNo": "9999999999",
    "amount": "10"
  }',
  CURLOPT_HTTPHEADER =>  array(
    'Content-Type: application/json'
  ),
));
$response =  curl_exec($curl);
curl_close($curl);
echo $response;
                                

RESPONSE

200

400

-Result

Example

 
{
    "id": "plink_Okga9Z3ZabMXVk",
    "txnRefranceID": "BOS554V221224",
    "Amount": 10.0,
    "CreatedDateTime": "0001-01-01T00:00:00",
    "Url": "https://rzp.io/i/YsYhDTFnF",
    "status": "created",
    "CreateDatetime": "2024-08-14T12:18:03+05:30",
    "Status": "True",
    "message": "Payment Link Generated",
    "Value": ""
}
                                
{
  "status": "ERROR",
  "subCode": "400",
  "message": "VPA does not exist for the account provided"
}