Retrieve a transaction
curl --request GET \
--url https://i-pay.money/api/v1/payments/{reference} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: <content-type>' \
--header 'Ipay-Payment-Type: <ipay-payment-type>' \
--header 'Ipay-Target-Environment: <ipay-target-environment>'const options = {
method: 'GET',
headers: {
'Content-Type': '<content-type>',
'Ipay-Target-Environment': '<ipay-target-environment>',
'Ipay-Payment-Type': '<ipay-payment-type>',
Authorization: 'Bearer <token>'
}
};
fetch('https://i-pay.money/api/v1/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/payments/{reference}"
headers = {
"Content-Type": "<content-type>",
"Ipay-Target-Environment": "<ipay-target-environment>",
"Ipay-Payment-Type": "<ipay-payment-type>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://i-pay.money/api/v1/payments/{reference}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: <content-type>",
"Ipay-Payment-Type: <ipay-payment-type>",
"Ipay-Target-Environment: <ipay-target-environment>"
],
]);
$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/payments/{reference}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Content-Type"] = '<content-type>'
request["Ipay-Target-Environment"] = '<ipay-target-environment>'
request["Ipay-Payment-Type"] = '<ipay-payment-type>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyHttpResponse<String> response = Unirest.get("https://i-pay.money/api/v1/payments/{reference}")
.header("Content-Type", "<content-type>")
.header("Ipay-Target-Environment", "<ipay-target-environment>")
.header("Ipay-Payment-Type", "<ipay-payment-type>")
.header("Authorization", "Bearer <token>")
.asString();{
"public_reference": "<string>",
"external_reference": "<string>",
"reference": "<string>",
"status": "initiated",
"msisdn": "<string>",
"amount": 123,
"validated_at": "2023-11-07T05:31:56Z"
}
Retrieve a transaction
Check the actual status of a transaction with its iMoney Encaissement reference or your transaction_id.
GET
/
payments
/
{reference}
Retrieve a transaction
curl --request GET \
--url https://i-pay.money/api/v1/payments/{reference} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: <content-type>' \
--header 'Ipay-Payment-Type: <ipay-payment-type>' \
--header 'Ipay-Target-Environment: <ipay-target-environment>'const options = {
method: 'GET',
headers: {
'Content-Type': '<content-type>',
'Ipay-Target-Environment': '<ipay-target-environment>',
'Ipay-Payment-Type': '<ipay-payment-type>',
Authorization: 'Bearer <token>'
}
};
fetch('https://i-pay.money/api/v1/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/payments/{reference}"
headers = {
"Content-Type": "<content-type>",
"Ipay-Target-Environment": "<ipay-target-environment>",
"Ipay-Payment-Type": "<ipay-payment-type>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://i-pay.money/api/v1/payments/{reference}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: <content-type>",
"Ipay-Payment-Type: <ipay-payment-type>",
"Ipay-Target-Environment: <ipay-target-environment>"
],
]);
$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/payments/{reference}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Content-Type"] = '<content-type>'
request["Ipay-Target-Environment"] = '<ipay-target-environment>'
request["Ipay-Payment-Type"] = '<ipay-payment-type>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyHttpResponse<String> response = Unirest.get("https://i-pay.money/api/v1/payments/{reference}")
.header("Content-Type", "<content-type>")
.header("Ipay-Target-Environment", "<ipay-target-environment>")
.header("Ipay-Payment-Type", "<ipay-payment-type>")
.header("Authorization", "Bearer <token>")
.asString();{
"public_reference": "<string>",
"external_reference": "<string>",
"reference": "<string>",
"status": "initiated",
"msisdn": "<string>",
"amount": 123,
"validated_at": "2023-11-07T05:31:56Z"
}
Use this operation to get the actual status of a transaction, rather than relying on the status returned at creation. This operation (or a webhook) is what must trigger the delivery of an order, never the response of Create a transaction.
- Reference. It accepts two interchangeable values: the internal reference returned at creation, or your own
transaction_id(found under the nameexternal_reference). There is no need to store both if you only keeptransaction_idon the merchant side. - Status. A
pendingtransaction can still becomesucceeded,failedorrefunded. Wait for a final status (or a webhook) before considering the check complete. - Unknown reference. A reference that does not match any transaction of the authenticated account returns
404, even if it exists for another account or another environment (Sandbox/Live).
Authorizations
Secret key of the Sandbox or Live account
Headers
Required by the API authentication, including on GET requests, even though they have no body.
Allowed value:
"application/json"Available options:
sandbox, live Payment method. POST /payments only supports mobile (mobile money). Other payment methods (bank card and other channels) are not used here: they are available through payment links (POST /external_payments). Full list: payment methods.
Allowed value:
"mobile"Example:
"mobile"
Path Parameters
Response
Transaction found for the authenticated account
