Skip to main content

Add a payment

POST 

/documents/:id/payment

Add a payment on an invoice.

A payment is firstly added on a customer, then the payment is used on the invoice. If the payment amount is higher of the invoice amount, the payment can be used on multiple invoices.

This endpoint mark the invoice as "PAID" if the payment can completely paid the invoice.

If no amount is provided on this endpoint, the created payment will have the invoice rest amount.

Use this endpoint with no "payment" parameter create a CREDIT_CARD payment with the amount of the invoice.

Request

Responses

Success, created transaction is returned