Skip to main content
GET
/
payment
/
status
Get status
curl --request GET \
  --url https://api.onswitch.xyz/payment/status \
  --header 'x-service-key: <api-key>'
import requests

url = "https://api.onswitch.xyz/payment/status"

headers = {"x-service-key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'x-service-key': '<api-key>'}};

fetch('https://api.onswitch.xyz/payment/status', 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.onswitch.xyz/payment/status",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "x-service-key: <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"
	"net/http"
	"io"
)

func main() {

	url := "https://api.onswitch.xyz/payment/status"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-service-key", "<api-key>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.onswitch.xyz/payment/status")
  .header("x-service-key", "<api-key>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.onswitch.xyz/payment/status")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-service-key"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "success": true,
  "status": 200,
  "message": "Payment status fetched successfully",
  "timestamp": "2026-04-18T13:12:44.055Z",
  "data": {
    "status": "COMPLETED",
    "type": "OFFRAMP",
    "reference": "9fa5699e-bd99-442f-9185-7f51e606a39d",
    "beneficiary": "69d8d8f1ad6205a9a0e89302",
    "rate": 1381.842,
    "source": {
      "amount": 15.02,
      "amount_usd": 15.02,
      "network": "BSC",
      "currency": "USDT"
    },
    "destination": {
      "amount": 20755.26684,
      "amount_usd": 15.02,
      "network": "FIAT",
      "currency": "NGN"
    },
    "deposit": {
      "amount": 15.02,
      "address": "0x0957cc85231324A7D98d0c7703dca5685eE44F8A",
      "asset": "bsc:usdt",
      "note": [
        "Kindly send the exact amount to the wallet address to complete the transaction.",
        "This wallet address is for one-time use only and has a 30 minutes expiry window."
      ]
    },
    "meta": {
      "sender": {
        "wallet_address": "0x8e9C6ea3C9928910572b73019D319C40Fc6045F1"
      },
      "session_id": "184729305611082934715600428391",
      "hash": "0x4a2f8e9c1d7b5630fe2a894bc31d0567e8c924fa11de45b3290fc1821ead3f6b",
      "explorer_url": "https://bscscan.com/tx/0x4a2f8e9c1d7b5630fe2a894bc31d0567e8c924fa11de45b3290fc1821ead3f6b"
    },
    "created_at": "2026-04-18T07:12:17.887Z",
    "updated_at": "2026-04-18T07:12:34.705Z"
  }
}
{
  "success": false,
  "message": "amount must be greater than 0 for the selected corridor",
  "timestamp": "2026-04-18T14:22:08.631Z",
  "data": null
}

Authorizations

x-service-key
string
header
required

Service key for API authentication

Query Parameters

reference
string<uuid>

The unique transaction reference identifier

address
string

Payment deposit wallet address

Response

Successfully retrieved transaction status

success
boolean
required
status
integer
required
message
string
required
timestamp
string<date-time>
required
data
object | null
required