Retrieve a Receipt
curl --request GET \
--url https://api.example.com/receipts/{id}import requests
url = "https://api.example.com/receipts/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/receipts/{id}', 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.example.com/receipts/{id}",
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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/receipts/{id}"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/receipts/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/receipts/{id}")
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_body{
"id": "rc_z1urYtVFgEebtcj8fxp4v",
"date": "2020-10-15T12:16:26.128Z",
"description": "<string>",
"transactionId": "<string>",
"operatorReference": "<string>",
"reference": "<string>",
"customerNumber": "<string>",
"amount": 100,
"currency": "XOF",
"method": "mobile_money",
"country": "CI",
"provider": "orange",
"mode": "live"
}{
"httpStatus": 404,
"message": "X not found",
"error": "Not found"
}{
"httpStatus": 409,
"type": "invalid_request",
"code": "unsupported_action",
"message": "This action is not supported"
}{
"type": "internal_error",
"code": [
"internal_error",
"wrong_credentials",
"not_granted",
"live_mode_not_granted",
"merchant_inactive"
],
"message": "An error occurred on our system. Please try again later."
}Receipt
Retrieve a Receipt
Retrieve a sucessful or failed transfer or payment receipt
GET
/
receipts
/
{id}
Retrieve a Receipt
curl --request GET \
--url https://api.example.com/receipts/{id}import requests
url = "https://api.example.com/receipts/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/receipts/{id}', 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.example.com/receipts/{id}",
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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/receipts/{id}"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/receipts/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/receipts/{id}")
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_body{
"id": "rc_z1urYtVFgEebtcj8fxp4v",
"date": "2020-10-15T12:16:26.128Z",
"description": "<string>",
"transactionId": "<string>",
"operatorReference": "<string>",
"reference": "<string>",
"customerNumber": "<string>",
"amount": 100,
"currency": "XOF",
"method": "mobile_money",
"country": "CI",
"provider": "orange",
"mode": "live"
}{
"httpStatus": 404,
"message": "X not found",
"error": "Not found"
}{
"httpStatus": 409,
"type": "invalid_request",
"code": "unsupported_action",
"message": "This action is not supported"
}{
"type": "internal_error",
"code": [
"internal_error",
"wrong_credentials",
"not_granted",
"live_mode_not_granted",
"merchant_inactive"
],
"message": "An error occurred on our system. Please try again later."
}Query Parameters
Response
Datetime in UTC timezone at which the associated transaction was successful. Follows the Datetime ISO.
Example:
"2020-10-15T12:16:26.128Z"
Three-letter ISO currency code.
Example:
"XOF"
Two-letter ISO country code. Represents the country where the provider selected by the customer is localized.
Example:
"CI"
The name of the provider selected by the customer, in lowercase. The list of supported providers can be found at /data/providers
Example:
"orange"
Mode in which this PaymentIntent exists. The sandbox mode can be used during the integration phase and is available as soon as the merchant account is created. No real transactions are made in this mode. The live mode has to be used to make real transactions.
Available options:
live, sandbox Example:
"live"
