Verify a PAN and record consent
curl --request POST \
--url https://api-pacb-uat.eximpe.com/pg/pan/consent/ \
--header 'Content-Type: application/json' \
--header 'X-Client-ID: <api-key>' \
--header 'X-Client-Secret: <api-key>' \
--header 'X-Merchant-ID: <api-key>' \
--data '
{
"pan": "ABCPK1234F",
"buyer_pan_consent": true
}
'import requests
url = "https://api-pacb-uat.eximpe.com/pg/pan/consent/"
payload = {
"pan": "ABCPK1234F",
"buyer_pan_consent": True
}
headers = {
"X-Client-ID": "<api-key>",
"X-Client-Secret": "<api-key>",
"X-Merchant-ID": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Client-ID': '<api-key>',
'X-Client-Secret': '<api-key>',
'X-Merchant-ID': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({pan: 'ABCPK1234F', buyer_pan_consent: true})
};
fetch('https://api-pacb-uat.eximpe.com/pg/pan/consent/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-pacb-uat.eximpe.com/pg/pan/consent/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'pan' => 'ABCPK1234F',
'buyer_pan_consent' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Client-ID: <api-key>",
"X-Client-Secret: <api-key>",
"X-Merchant-ID: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-pacb-uat.eximpe.com/pg/pan/consent/"
payload := strings.NewReader("{\n \"pan\": \"ABCPK1234F\",\n \"buyer_pan_consent\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Client-ID", "<api-key>")
req.Header.Add("X-Client-Secret", "<api-key>")
req.Header.Add("X-Merchant-ID", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-pacb-uat.eximpe.com/pg/pan/consent/")
.header("X-Client-ID", "<api-key>")
.header("X-Client-Secret", "<api-key>")
.header("X-Merchant-ID", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"pan\": \"ABCPK1234F\",\n \"buyer_pan_consent\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-pacb-uat.eximpe.com/pg/pan/consent/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Client-ID"] = '<api-key>'
request["X-Client-Secret"] = '<api-key>'
request["X-Merchant-ID"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"pan\": \"ABCPK1234F\",\n \"buyer_pan_consent\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "PAN verified.",
"data": {
"verified": true,
"reason": null
}
}LRS
Verify a PAN and Record Consent
Verify a buyer’s PAN and record their consent before you create a Hosted Checkout order, so the buyer skips the PAN page.
POST
/
pg
/
pan
/
consent
/
Verify a PAN and record consent
curl --request POST \
--url https://api-pacb-uat.eximpe.com/pg/pan/consent/ \
--header 'Content-Type: application/json' \
--header 'X-Client-ID: <api-key>' \
--header 'X-Client-Secret: <api-key>' \
--header 'X-Merchant-ID: <api-key>' \
--data '
{
"pan": "ABCPK1234F",
"buyer_pan_consent": true
}
'import requests
url = "https://api-pacb-uat.eximpe.com/pg/pan/consent/"
payload = {
"pan": "ABCPK1234F",
"buyer_pan_consent": True
}
headers = {
"X-Client-ID": "<api-key>",
"X-Client-Secret": "<api-key>",
"X-Merchant-ID": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Client-ID': '<api-key>',
'X-Client-Secret': '<api-key>',
'X-Merchant-ID': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({pan: 'ABCPK1234F', buyer_pan_consent: true})
};
fetch('https://api-pacb-uat.eximpe.com/pg/pan/consent/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-pacb-uat.eximpe.com/pg/pan/consent/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'pan' => 'ABCPK1234F',
'buyer_pan_consent' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Client-ID: <api-key>",
"X-Client-Secret: <api-key>",
"X-Merchant-ID: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-pacb-uat.eximpe.com/pg/pan/consent/"
payload := strings.NewReader("{\n \"pan\": \"ABCPK1234F\",\n \"buyer_pan_consent\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Client-ID", "<api-key>")
req.Header.Add("X-Client-Secret", "<api-key>")
req.Header.Add("X-Merchant-ID", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-pacb-uat.eximpe.com/pg/pan/consent/")
.header("X-Client-ID", "<api-key>")
.header("X-Client-Secret", "<api-key>")
.header("X-Merchant-ID", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"pan\": \"ABCPK1234F\",\n \"buyer_pan_consent\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-pacb-uat.eximpe.com/pg/pan/consent/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Client-ID"] = '<api-key>'
request["X-Client-Secret"] = '<api-key>'
request["X-Merchant-ID"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"pan\": \"ABCPK1234F\",\n \"buyer_pan_consent\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "PAN verified.",
"data": {
"verified": true,
"reason": null
}
}How it works
- Show the buyer the consent statement below and get their agreement.
- Call this endpoint with the buyer’s
panandbuyer_pan_consent: true. - If
verifiedistrue, create the order within 24 hours on Create Order. Send the same PAN asbuyer.pan_number, withbusiness_modelandpurpose_code.
verified is false, no consent is recorded. The buyer enters their PAN on the PAN page in Hosted Checkout.
Consent
Sendbuyer_pan_consent: true only after the buyer has agreed to the statement Hosted Checkout shows on its PAN page.
- LRS payments: “By continuing, I confirm that the PAN I entered belongs to the person paying for this purchase, that I have permission to share it, and that this payment is within their LRS limit for this financial year, and I agree to the Terms & Conditions and Privacy Policy.”
- Other consumer payments: “By continuing, I confirm that the PAN I entered belongs to the person paying for this purchase, that I have permission to share it, and I agree to the Terms & Conditions and Privacy Policy.”
Reasons
reason | Meaning |
|---|---|
INVALID_PAN | The PAN does not exist. |
NON_INDIVIDUAL_PAN | The PAN belongs to a company, firm or other non-individual. |
INOPERATIVE_PAN | The PAN is inoperative. |
AADHAAR_NOT_LINKED | The PAN is active but not linked to Aadhaar. |
Errors
| Status | error.code | When |
|---|---|---|
400 | 40357 | buyer_pan_consent is missing or not true, or pan is missing or badly formed. details is keyed by the field. |
503 | 40356 | Verification is temporarily unavailable. No consent was recorded. Retry after the Retry-After header (60 seconds). |
500 | 40356 | Anything unexpected. No consent was recorded. |
Consent missing
{
"success": false,
"error": {
"code": 40357,
"message": "Invalid PAN verification request.",
"details": {
"buyer_pan_consent": ["This field is required."]
}
}
}
Authorizations
Body
application/json