Global API
...
Invoice
Invoice - Stripe
Change Status
2min
the following is an example of a request to change the status of an invoice the invoice id , invoicestatus , and processorid are required to update the invoice status field name data type description invoice id string id of the invoice in your connected processor invoicestatus string you can change the status of an open invoice to paid, void, or uncollectible by sending values of invoicestatus as pay, void, or mark uncollectible, respectively processorid string account id of the connected processor note you can only update one record at a time the response returns the invoice information, which we see in our example request // initializing the requestjson data to be passed map\<string, object> requestjsonmap = new map\<string, object>(); requestjsonmap put('invoice id', 'invoice id'); // invoicestatus = mark uncollectible or void or pay requestjsonmap put('invoicestatus', 'invoicestatus'); string reqjson = json serialize(requestjsonmap); map\<string, object> reqobj = new map\<string, object>(); reqobj put('version','1 0'); reqobj put('action','changeinvoicestatus'); reqobj put('processorid', 'processorid'); reqobj put('requestjson',reqjson); // placing a request to breadwinner global api map\<string,object> resp = bw payments breadwinnerpaymentsapi call(reqobj); system debug(resp); response //few properties are omitted to concise the response { "id" "in 1nderobl59w6bp4kf125khn1", "object" "invoice", "account country" "us", "account name" "demo account", "account tax ids" null, "amount due" 400, "status" "paid", "status transitions" { "finalized at" 1691597053, "marked uncollectible at" 1699378236, "paid at" 1699378330, "voided at" null }, "subtotal" 400, "subtotal excluding tax" 400, "tax" null, "tax percent" null, "test clock" null, "total" 400, "total discount amounts" \[ ], "total excluding tax" 400, "total tax amounts" \[ ], "transfer data" null, "webhooks delivered at" 1691597052 }