Raise a credit top-up invoice
curl --request POST \
--url https://my.server.express/api/v1/client/credits/topup \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 500250,
"currency": "GBP"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({amount: 500250, currency: 'GBP'})
};
fetch('https://my.server.express/api/v1/client/credits/topup', 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/credits/topup"
payload = {
"amount": 500250,
"currency": "GBP"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"invoiceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoiceNumber": "<string>",
"amount": 123,
"currency": "<string>"
}
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}Credits
Raise a credit top-up invoice
Creates an UNPAID invoice (due in 7 days) for the requested amount plus tax at the customer’s billing-entity rate. The balance only grows once that invoice is paid. Writes a CREDIT_TOPUP_INVOICE audit log entry. Bounds are checked on the raw number regardless of currency (500–1,000,000 minor units).
POST
/
v1
/
client
/
credits
/
topup
Raise a credit top-up invoice
curl --request POST \
--url https://my.server.express/api/v1/client/credits/topup \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 500250,
"currency": "GBP"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({amount: 500250, currency: 'GBP'})
};
fetch('https://my.server.express/api/v1/client/credits/topup', 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/credits/topup"
payload = {
"amount": 500250,
"currency": "GBP"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"invoiceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoiceNumber": "<string>",
"amount": 123,
"currency": "<string>"
}
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}Authorizations
Session access token (JWT) from POST /v1/auth/login or /v1/auth/refresh. A session satisfies every API scope.
Body
application/json