Create a UPI Payment Link

Post  https://api.bos.center/api/BOS/V4/UPIPaymentLink


Use this endpoint to create a UPI Payment Link using basic details such as amount, expiry date, reference id, description, customer details and so on.

Click to view the steps to generate a public key and the signature.

Body Parameters
{
  "RegistrationID": "BOS-554",
  "Name": "Jon Doe",
  "EmailID": "example@gmail.com",
  "MobileNo": "9999999999",
  "amount": "10"
}
                        
HEADERS

Content-Type string

application/json

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

url = 'https://api.bos.center/api/BOS/V4/UPIPaymentLink'
payload = json.dumps({
  "RegistrationID": "BOS-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.bos.center/api/BOS/V4/UPIPaymentLink',
  "headers" : {
    "Content-Type" : 'application/json'
  },
  body: JSON.stringify({
    "RegistrationID": "BOS-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.bos.center/api/BOS/V4/UPIPaymentLink')
var content = new StringContent(
  "{
    "RegistrationID": "BOS-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.bos.center/api/BOS/V4/UPIPaymentLink',
  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": "BOS-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"
}