Pay an invoice
curl --request POST \
--url https://my.server.express/api/v1/client/invoices/{id}/pay \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"toCurrency": "<string>",
"network": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({toCurrency: '<string>', network: '<string>'})
};
fetch('https://my.server.express/api/v1/client/invoices/{id}/pay', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://my.server.express/api/v1/client/invoices/{id}/pay"
payload = {
"toCurrency": "<string>",
"network": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"method": "credit",
"paid": true,
"deductedGbp": 123
}
}{
"success": false,
"error": "<string>",
"data": {
"availableMethods": [
"credit"
]
}
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>",
"data": {
"payInsteadInvoiceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payInsteadInvoiceNumber": "<string>"
}
}{
"success": false,
"error": "<string>",
"data": {
"billingDetailsRequired": true,
"missing": [
"addressLine1"
]
}
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}Invoices
Pay an invoice
Starts or completes payment, depending on method:
credit— converts the total to GBP at the current rate, deducts it from the credit balance, records the payment and settles the invoice immediately. 400 if the balance is short; 503 if no exchange rate is available.stripe(default when cards are on) — creates a Stripe Checkout session and a pending payment; redirect tourl. 409 when card payments are switched off.crypto(nowpayments,heleket,paykillaaccepted as aliases) — creates an inline payment on the active gateway for the coin intoCurrencyand a pending payment row. 400 if no gateway is configured ortoCurrencyis missing.
With cards off and no method, returns 400 listing availableMethods. Paid → 400; cancelled/refunded or inside an open
combined invoice → 409. Drafts return 404. Requires a complete billing address (428). An invalid JSON body is treated as
empty. Unexpected failures return 500 with the underlying error message.
POST
/
v1
/
client
/
invoices
/
{id}
/
pay
Pay an invoice
curl --request POST \
--url https://my.server.express/api/v1/client/invoices/{id}/pay \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"toCurrency": "<string>",
"network": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({toCurrency: '<string>', network: '<string>'})
};
fetch('https://my.server.express/api/v1/client/invoices/{id}/pay', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://my.server.express/api/v1/client/invoices/{id}/pay"
payload = {
"toCurrency": "<string>",
"network": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"method": "credit",
"paid": true,
"deductedGbp": 123
}
}{
"success": false,
"error": "<string>",
"data": {
"availableMethods": [
"credit"
]
}
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>",
"data": {
"payInsteadInvoiceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payInsteadInvoiceNumber": "<string>"
}
}{
"success": false,
"error": "<string>",
"data": {
"billingDetailsRequired": true,
"missing": [
"addressLine1"
]
}
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}Authorizations
bearerAuthapiToken
Session access token (JWT) from POST /v1/auth/login or /v1/auth/refresh. A session satisfies every API scope.
Path Parameters
Body
application/json