Start paying an invoice from a public link
curl --request POST \
--url https://my.server.express/api/v1/public/invoices/{token}/pay \
--header 'Content-Type: application/json' \
--data '{}'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://my.server.express/api/v1/public/invoices/{token}/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/public/invoices/{token}/pay"
payload = {}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"url": "<string>"
}
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}Public Invoices
Start paying an invoice from a public link
Creates a hosted checkout (Stripe or the active crypto gateway) for the invoice’s full total, records a pending payment against the invoice owner, and returns the checkout URL. Success and cancel both land back on the public invoice page. One checkout per method per invoice per minute (429 otherwise). 409 when card payments are switched off. 400 when the invoice is already paid, cancelled or refunded, or when no crypto gateway is active. Uncertain: unlike the signed-in pay route, this doesn’t appear to refuse an invoice that’s been folded into a consolidation invoice.
POST
/
v1
/
public
/
invoices
/
{token}
/
pay
Start paying an invoice from a public link
curl --request POST \
--url https://my.server.express/api/v1/public/invoices/{token}/pay \
--header 'Content-Type: application/json' \
--data '{}'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://my.server.express/api/v1/public/invoices/{token}/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/public/invoices/{token}/pay"
payload = {}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"url": "<string>"
}
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}Path Parameters
The invoice's public token from its shareable link. At least 16 characters.
Minimum string length:
16Body
application/json
nowpayments is a legacy alias for crypto.
Available options:
stripe, crypto, nowpayments