Retrieve a payment link
curl --request GET \
--url https://i-pay.money/api/v1/external_payments/{reference}const options = {method: 'GET'};
fetch('https://i-pay.money/api/v1/external_payments/{reference}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://i-pay.money/api/v1/external_payments/{reference}"
response = requests.get(url)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://i-pay.money/api/v1/external_payments/{reference}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("https://i-pay.money/api/v1/external_payments/{reference}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyHttpResponse<String> response = Unirest.get("https://i-pay.money/api/v1/external_payments/{reference}")
.asString();{
"reference": "<string>",
"amount": 123,
"country": "<string>",
"currency": "<string>",
"transaction_id": "<string>",
"msisdn": "<string>",
"customer_name": "<string>",
"status": "succeeded",
"created_at": "2023-11-07T05:31:56Z"
}{
"message": "<string>",
"status": "failed"
}Retrieve a payment link
Read the state of a payment link from its reference. No key is required.
GET
/
external_payments
/
{reference}
Retrieve a payment link
curl --request GET \
--url https://i-pay.money/api/v1/external_payments/{reference}const options = {method: 'GET'};
fetch('https://i-pay.money/api/v1/external_payments/{reference}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://i-pay.money/api/v1/external_payments/{reference}"
response = requests.get(url)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://i-pay.money/api/v1/external_payments/{reference}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("https://i-pay.money/api/v1/external_payments/{reference}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyHttpResponse<String> response = Unirest.get("https://i-pay.money/api/v1/external_payments/{reference}")
.asString();{
"reference": "<string>",
"amount": 123,
"country": "<string>",
"currency": "<string>",
"transaction_id": "<string>",
"msisdn": "<string>",
"customer_name": "<string>",
"status": "succeeded",
"created_at": "2023-11-07T05:31:56Z"
}{
"message": "<string>",
"status": "failed"
}This operation requires no key. Anyone who knows the reference can check the state of the link and, once a payment has been completed, the payer information it contains. Always generate this reference randomly and with high entropy (see Create a hosted payment link), and never log it or display it in a context accessible to a third party not involved in this payment.
- Response shape. It depends on the actual state of the link: a payment carried through to completion, a link still waiting for a first payment attempt, or a link that expired without a completed payment. A refund made afterwards does not change this shape: this operation is not a reliable indicator for detecting a refund.
- Expired link. After thirty minutes without a completed payment, the lookup still responds
200, withhas_expireset totrueandstatusset tocancelled. Treat this shape as a permanently unusable link, not as a transient error to retry. - Unknown reference. A reference that does not match any link returns
404. Since the operation is public, brute-force enumeration is possible if the reference is not random enough: this is the reason for the warning above.
Path Parameters
High-entropy private reference, not published on the client side.
Minimum string length:
32Response
State of the link or of the associated payment
- Option 1
- Option 2
- Option 3
Shape returned when a payment has been carried through to completion for this link. status can then only be succeeded or failed: on this operation, never initiated, pending or refunded. Edge case: a payment refunded afterwards is no longer attached to the link, and the operation then returns the shape of a link still waiting (status: initiated) instead of exposing the refund — do not use this operation as a reliable refund indicator.
