Billing Checkout (POST)
Create a unified checkout transaction that generates billing schedules, an invoice, and an optional payment in a single request.
Use this API to process a checkout transaction for invoicing and payment. Specify account or customer details, line items, billing information, and payment details. You can also preview the invoice without committing the checkout transaction.
You need the Billing Checkout access permission to use this API.
68.0
POST
JSON Example
JSON Example — Using an Existing Payment Record
This example passes paymentId directly for an existing payment record, instead of paymentDetails.
Properties
| Name | Type | Description | Required or Optional | Available Version |
|---|---|---|---|---|
accountId | String | ID of the account placing the order. Use this or customerDetails. | Optional | 68.0 |
amount | Double | Total amount to charge for this checkout transaction. | Required | 68.0 |
billingAddress | Address Input | Customer’s billing address. Use this or billingProfileId. | Optional | 68.0 |
billingContact | Billing Contact Input | Billing customer details when billingProfileId isn’t provided. Creates the contact if it doesn’t exist. | Optional | 68.0 |
billingProfileId | String | ID of an existing billing profile. Use this or billingAddress. | Optional | 68.0 |
currencyIsoCode | String | The currency code of the transaction amount if your Salesforce org has multi-currency enabled. | Required | 68.0 |
customerDetails | Billing Checkout Customer Details Input | Customer details used to create a customer when accountId isn’t provided. | Optional | 68.0 |
invoiceDate | String | Date that appears on the generated invoice (YYYY-MM-DD). Defaults to the transaction date. | Optional | 68.0 |
invoiceTargetDate | String | End date for the billing period to include on this invoice (YYYY-MM-DD). Creates a targeted invoice. | Optional | 68.0 |
isPartialPaymentAllowed | Boolean | Indicates whether partial payment is allowed for this payment context (true) or not (false). The default value is false. | Optional | 68.0 |
lineItems | Billing Checkout Line Item Input[] | Array of products being purchased. | Required | 68.0 |
paymentDetails | Billing Checkout Payment Details Input | Raw payment details used to tokenize a new card or bank account. Use this or paymentMethodId. | Optional | 68.0 |
paymentId | String | ID of an existing payment record to associate with this checkout transaction. Not allowed when shouldCapturePayment is true, and not allowed together with amount. | Optional | 68.0 |
paymentMethodId | String | ID of a saved payment method. Use this or paymentDetails. | Optional | 68.0 |
previewInvoice | Boolean | If true, returns a preview of the invoice without committing the checkout transaction. | Optional | 68.0 |
shippingAddress | Address Input | Customer’s shipping address. | Optional | 68.0 |
shouldCapturePayment | Boolean | If true, captures the payment as part of the checkout transaction. | Optional | 68.0 |