Global API
...
Invoice
Invoice - Stripe

Create and Charge

1min

To Create and Charge an Invoice in Stripe, use the action "CreateInvoice," collectionMethod as "charge_automatically," invoiceStatus as "CHARGE_CUSTOMER" and pass the Invoice data in the RequestJSON under "invoices."

Note: You can only create one record at a time.

The following is an example of Create and Charge an Invoice, where we are setting every possible field (See Invoice - Stripe for the available fields). The response will return the response from Stripe, which includes the new Stripe Invoice ID (internalId), plus the newly created Salesforce Invoice ID (salesforceId).

Apex
JSON