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.
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.
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:
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"
}'Maximum number of requests available at one time for this rate limit. For more information, see Rate limits.
Number of requests still available for this rate limit. For more information, see Rate limits.
{ "invoiceId": "in_0YVF9605RKC62BP14NE2R7V2XT", "currency": "USD", "appliedCreditMemos": [ { … } ], "remainingInvoiceAmount": 0.1 }