Palbase Payments · API
POST
/payments/invoices/{invoice_id}/payPay an invoice again
Charges an open or uncollectible invoice with the card named, or the one it was made with, or the payer's default, with the payer away. Answers the invoice paid; 402 with the card's decline code and the invoice beside the error; 409 invoice_not_payable for one paid, void or refused; 402 method_gone for a card removed at the provider, 409 provider_customer_gone for a payer whose record was deleted there. 409 invoice_permission_required when the channel may not write invoices.
Called by your server, with the project's secret key.
Path
invoice_idstring · requiredThe invoice's id, as Palbase gave it.Request body
method_idstring · optionalThe saved card to charge: the invoice's own card, or the payer's default, when left out.curl
curl -X POST "https://<your-ref>.palbase.studio/payments/invoices/<invoice_id>/pay" \
-H "apikey: $PALBASE_SECRET_KEY" \
-H "content-type: application/json" \
-d '{"method_id":"string"}'Responses
200OK
defaultStandard Palbase JSON error envelope (`error` and `error_description`).
Operation PayInvoice of payments's contract.