This API will provide the current status of a specific payment.

Through this API, a payment's status can be identified. After calling the Create Charge API, an invoice_id will generate and UddoktaPay will send that invoice_id with redirect_url in API V2. Using this invoice_id, the Verify Payment API can be called at anytime.

Request URL: {base_URL}/api/verify-payment
**base_URL is UddoktaPay installation location (eg: pay.your-domain.com)

Request Headers

Header NameValue
Content-Type"application/json"
Accept"application/json"
RT-UDDOKTAPAY-API-KEYCollect API KEY From Dashboard

Request Parameters

PropertyPresenceTypeDescription
invoice_idMandatorystringUddoktaPay generated invoice_id for this payment creation request.

Success Response Parameters

PropertyTypeDescription
full_namestringFull Name value which was passed along with the payment request.
emailstringEmail value which was passed along with the payment request.
amountstringAmount value which was passed along with the payment request.
feestringFee of the payment transaction.
charged_amountstringAmount of the payment transaction.
invoice_idstringUddoktaPay generated invoice_id for this payment creation request.
metadatajson objectAny related json object which was passed along with the payment request.
payment_methodstringPayment Method of the payment transaction. (bKash/Rocket/Nagad/Upay or Bank)
sender_numberstringSender Number of the payment transaction.
transaction_idstringTransaction ID of the payment transaction.
datestringDate of the payment transaction.
statusstringCOMPLETED or PENDING or ERROR

Status of the payment.

Error Response Parameters

PropertyTypeDescription
statusstringERROR
messagestringMessage associated with the status, explaining the status.

Sample Request

<?php

$baseURL = 'https://sandbox.uddoktapay.com/';
$apiKEY = '982d381360a69d419689740d9f2e26ce36fb7a50';

$fields = [
    'invoice_id'     => 'Erm9wzjM0FBwjSYT0QVb'
];


$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => $baseURL . "api/verify-payment",
  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($fields),
  CURLOPT_HTTPHEADER => [
    "RT-UDDOKTAPAY-API-KEY: " . $apiKEY,
    "accept: application/json",
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
curl --request POST \
     --url https://sandbox.uddoktapay.com/api/verify-payment \
     --header 'RT-UDDOKTAPAY-API-KEY: 982d381360a69d419689740d9f2e26ce36fb7a50' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
     "invoice_id": "Erm9wzjM0FBwjSYT0QVb"
}
'
const axios = require('axios');

const options = {
  method: 'POST',
  url: 'https://sandbox.uddoktapay.com/api/verify-payment',
  headers: {
    accept: 'application/json',
    'RT-UDDOKTAPAY-API-KEY': '982d381360a69d419689740d9f2e26ce36fb7a50',
    'content-type': 'application/json'
  },
  data: {invoice_id: 'Erm9wzjM0FBwjSYT0QVb'}
};

axios
  .request(options)
  .then(function (response) {
    console.log(response.data);
  })
  .catch(function (error) {
    console.error(error);
  });
import requests

url = "https://sandbox.uddoktapay.com/api/verify-payment"

payload = {"invoice_id": "Erm9wzjM0FBwjSYT0QVb"}
headers = {
    "accept": "application/json",
    "RT-UDDOKTAPAY-API-KEY": "982d381360a69d419689740d9f2e26ce36fb7a50",
    "content-type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)

Sample Response

{
  "full_name": "John Doe",
  "email": "[email protected]",
  "amount": "100.00",
  "fee": "0.00",
  "charged_amount": "100.00",
  "invoice_id": "Erm9wzjM0FBwjSYT0QVb",
  "metadata": {
    "user_id": "10",
    "order_id": "50"
  },
  "payment_method": "bkash",
  "sender_number": "01311111111",
  "transaction_id": "TESTTRANS1",
  "date": "2023-01-07 14:00:50",
  "status": "COMPLETED"
}