Update invoice by ID
PATCH {{baseUrl}}/{{version}}/invoice/:invoiceId
Patch a single invoice. If the invoice has not yet been paid, you can adjust parameters such as the requested amount, the due datetime and the expiration.
Parameters | Value Type | Description |
---|---|---|
id | REQUIRED | Id of the invoice entity |
amount | OPTIONAL | New amount that should be charged on payment. Example: 200 (R$2.00) |
due | OPTIONAL | New due datetime. Example: 2020-11-26T17:59:26.000000+00:00 |
expiration | OPTIONAL | New expiration. Example: 3600 (1 hour) |
status | OPTIONAL | This can be used to cancel the invoice by passing canceledas the status patch. |
Request Body
{"amount"=>4100, "due"=>"2020-11-25T00:00:00.000000+00:00", "expiration"=>3600}
RESPONSES
status: OK
{"invoice":{"status":"created","updated":"2020-11-23T23:43:14.188336+00:00","fee":0,"taxId":"20.018.183/0001-80","interest":1.3,"tags":[],"interestAmount":0,"created":"2020-11-23T23:42:32.761804+00:00","due":"2020-11-25T00:00:00+00:00","descriptions":[{"key":"Product A","value":"R$10,00"},{"key":"Taxes","value":"R$100,00"}],"nominalAmount":4100,"discounts":[{"percentage":10.5,"due":"2020-11-25T20:59:26+00:00"},{"percentage":5,"due":"2020-11-29T20:59:26+00:00"}],"amount":4100,"brcode":"00020101021226890014br.gov.bcb.pix2567invoice-h.sandbox.starkbank.com/v2/85c6732687a8476785c9e77faac8875c52040000530398654040.005802BR5915Stark Bank S.A.6009Sao Paulo62070503***630474A0","expiration":3600,"fineAmount":0,"pdf":"https://invoice-h.sandbox.starkbank.com/pdf/85c6732687a8476785c9e77faac8875c","discountAmount":0,"fine":2.5,"id":"6404287257116672","name":"Iron Bank S.A."}}