API reference
Invoices
Create, share, pay and void invoices.
POST
/v1/invoicesSession or account keyCreate an invoice.
Body
{ "amount": "120.00", "memo": "Design work", "customer": "Northwind" }Response
{ "invoice": { "id": "inv_…", "amount": "120000000", "status": "open", "url": "/pay/inv_…", … } }curl
curl -X POST https://dapp.railpay.app/v1/invoices \
-H "Authorization: Bearer $RAILPAY_KEY" \
-H "Content-Type: application/json" \
-d '{ "amount": "120.00", "memo": "Design work", "customer": "Northwind" }'GET
/v1/invoicesSession or account keyYour invoices.
curl
curl https://dapp.railpay.app/v1/invoices \
-H "Authorization: Bearer $RAILPAY_KEY"GET
/v1/invoices/:idNonePublic: amount, memo, merchant name and handle, status.
curl
curl https://dapp.railpay.app/v1/invoices/<id>POST
/v1/invoices/:id/paySession or account keyPay an invoice as the signed-in account. Sets status paid, paid_by, paid_at and runs the merchant's rules.
curl
curl -X POST https://dapp.railpay.app/v1/invoices/<id>/pay \
-H "Authorization: Bearer $RAILPAY_KEY"POST
/v1/invoices/:id/voidSession or account keyVoid an open invoice (merchant only).
curl
curl -X POST https://dapp.railpay.app/v1/invoices/<id>/void \
-H "Authorization: Bearer $RAILPAY_KEY"