- Allocate customer credit balance to an invoice
Allocates existing allocatable credit memos related to the invoice customer. Specific credit memos cannot be provided in the request and are selected automatically. Allocation can be capped with amount. Credit memos are applied automatically in the specified allocation order. If no order is specified, oldest-first is used.
Invoice credit memo automatic allocation settings.
Optional maximum amount to allocate from customer credit memos to the invoice. If provided, allocation is capped at this value. If omitted, the allocated amount is the lesser of:
- Invoice unpaid amount.
- Available allocatable credit memo balance.
- Mock serverhttps://www.rebilly.com/_mock/catalog/all/invoices/{id}/allocate-credit-balance
- Sandbox serverhttps://api-sandbox.rebilly.com/organizations/{organizationId}/invoices/{id}/allocate-credit-balance
- Live serverhttps://api.rebilly.com/organizations/{organizationId}/invoices/{id}/allocate-credit-balance
- SecretApiKey
- JWT
curl -i -X POST \
'https://www.rebilly.com/_mock/catalog/all/invoices/{id}/allocate-credit-balance' \
-H 'Content-Type: application/json' \
-H 'REB-APIKEY: YOUR_API_KEY_HERE' \
-d '{
"amount": 1,
"allocationOrder": "oldest-first"
}'Credit memos allocated to invoice.
Total number of rate limit tokens for this request within a rate limit period. For more information, see Rate limits.
ID of the invoice.
Currency code in ISO 4217 format.
List of credit memos applied to the invoice and the amount allocated from each.
{ "invoiceId": "in_0YVF9605RKC62BP14NE2R7V2XT", "currency": "USD", "appliedCreditMemos": [ { … } ], "remainingInvoiceAmount": 0.1 }