Get payment details
curl --request GET \
--url http://localhost:3001/api/v1/business/payment/{paymentId} \
--header 'x-api-key: <x-api-key>'import requests
url = "http://localhost:3001/api/v1/business/payment/{paymentId}"
headers = {"x-api-key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
fetch('http://localhost:3001/api/v1/business/payment/{paymentId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3001",
CURLOPT_URL => "http://localhost:3001/api/v1/business/payment/{paymentId}",
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-api-key: <x-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 := "http://localhost:3001/api/v1/business/payment/{paymentId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<x-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("http://localhost:3001/api/v1/business/payment/{paymentId}")
.header("x-api-key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3001/api/v1/business/payment/{paymentId}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "<string>",
"amount": "10",
"chargedAmount": "10.16",
"serviceFee": "0.16",
"currency": "usd",
"status": "PENDING",
"type": "PAYMENT",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"idempotencyKey": "<string>",
"card": {
"last4": "7039",
"brand": "MASTERCARD",
"expiryMonth": 3,
"expiryYear": 2029,
"fundingType": "CREDIT",
"issuerCountry": "US"
},
"customer": {
"name": "Ada Obi",
"email": "ada@example.com",
"phone": "<string>"
},
"failure": {
"code": "51",
"message": "Insufficient funds",
"at": "<string>"
},
"authorization": {
"authorizationCode": "54370C",
"receiptNumber": "623617168693",
"receiptUrl": "<string>"
},
"settlementStatus": "<string>",
"estimatedSettleAt": "2023-11-07T05:31:56Z",
"settledAt": "2023-11-07T05:31:56Z",
"fee": "<string>",
"paymentUrl": "<string>",
"metadata": {}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "email must be an email",
"statusCode": 400,
"errors": {}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "email must be an email",
"statusCode": 400,
"errors": {}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "email must be an email",
"statusCode": 400,
"errors": {}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "email must be an email",
"statusCode": 400,
"errors": {}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "email must be an email",
"statusCode": 400,
"errors": {}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "email must be an email",
"statusCode": 400,
"errors": {}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "email must be an email",
"statusCode": 400,
"errors": {}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "email must be an email",
"statusCode": 400,
"errors": {}
}
}Payments
Get payment details
Retrieves one payment by its Axra payment id, with card, customer, failure and authorisation detail normalised so the shape does not change with the rail that collected it. The projection is an allow-list: upstream identifiers and our own costs are never returned.
GET
/
api
/
v1
/
business
/
payment
/
{paymentId}
Get payment details
curl --request GET \
--url http://localhost:3001/api/v1/business/payment/{paymentId} \
--header 'x-api-key: <x-api-key>'import requests
url = "http://localhost:3001/api/v1/business/payment/{paymentId}"
headers = {"x-api-key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
fetch('http://localhost:3001/api/v1/business/payment/{paymentId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3001",
CURLOPT_URL => "http://localhost:3001/api/v1/business/payment/{paymentId}",
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-api-key: <x-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 := "http://localhost:3001/api/v1/business/payment/{paymentId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<x-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("http://localhost:3001/api/v1/business/payment/{paymentId}")
.header("x-api-key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3001/api/v1/business/payment/{paymentId}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "<string>",
"amount": "10",
"chargedAmount": "10.16",
"serviceFee": "0.16",
"currency": "usd",
"status": "PENDING",
"type": "PAYMENT",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"idempotencyKey": "<string>",
"card": {
"last4": "7039",
"brand": "MASTERCARD",
"expiryMonth": 3,
"expiryYear": 2029,
"fundingType": "CREDIT",
"issuerCountry": "US"
},
"customer": {
"name": "Ada Obi",
"email": "ada@example.com",
"phone": "<string>"
},
"failure": {
"code": "51",
"message": "Insufficient funds",
"at": "<string>"
},
"authorization": {
"authorizationCode": "54370C",
"receiptNumber": "623617168693",
"receiptUrl": "<string>"
},
"settlementStatus": "<string>",
"estimatedSettleAt": "2023-11-07T05:31:56Z",
"settledAt": "2023-11-07T05:31:56Z",
"fee": "<string>",
"paymentUrl": "<string>",
"metadata": {}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "email must be an email",
"statusCode": 400,
"errors": {}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "email must be an email",
"statusCode": 400,
"errors": {}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "email must be an email",
"statusCode": 400,
"errors": {}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "email must be an email",
"statusCode": 400,
"errors": {}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "email must be an email",
"statusCode": 400,
"errors": {}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "email must be an email",
"statusCode": 400,
"errors": {}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "email must be an email",
"statusCode": 400,
"errors": {}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "email must be an email",
"statusCode": 400,
"errors": {}
}
}