Retrieve Invoice List
GET /invoice/
Returns a complete list of available invoices.
Headers
Name
Value
Content-Type
application/json
X-API-KEY
<token>
Response
[
{
"id": 0,
"uuid": "string",
"currency": "string",
"tx_hash": "string",
"address": "string",
"amount": 0,
"amount_usd": 0,
"received_amount": 0,
"received_amount_usd": 0,
"label": "string",
"postback_url": "https://example.com/postback",
"success_url": "https://example.com/success",
"fail_url": "https://example.com/fail",
"created_at": "2019-08-24T14:15:22Z",
"expires_at": "2019-08-24T14:15:22Z",
"status": "paid"
}
]{
"detail": [
{
"loc": [],
"msg": "string",
"type": "string"
}
]
}Example
curl -X GET "https://api.nord-pay.com/invoice/" \
-H "Content-Type: application/json" \
-H "X-API-KEY: YOUR_API_KEY"import requests
def get_invoices():
response = requests.get(
"https://api.nord-pay.com/invoice/",
headers={
"Content-Type": "application/json",
"X-API-KEY": "YOUR_API_KEY"
}
)
response.raise_for_status()
return response.json()
# usage:
invoices = get_invoices()<?php
function getInvoices(): array {
$ch = curl_init("https://api.nord-pay.com/invoice/");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: YOUR_API_KEY"
],
]);
$response = curl_exec($ch);
curl_close($ch);
return json_decode($response, true);
}
// usage:
$invoices = getInvoices();async function loadInvoices() {
const response = await fetch("https://api.nord-pay.com/invoice/", {
method: "GET",
headers: {
"Content-Type": "application/json",
"X-API-KEY": "YOUR_API_KEY"
}
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const invoices = await response.json();
return invoices;
}
// usage:
loadInvoices().then(invoices => {
// work with invoices
});const axios = require('axios');
async function getInvoices() {
const response = await axios.get('https://api.nord-pay.com/invoice/', {
headers: {
'Content-Type': 'application/json',
'X-API-KEY': 'YOUR_API_KEY'
}
});
const invoices = response.data;
return invoices;
}
// usage:
getInvoices().then(invoices => {
// work with invoices
});Last updated