Skip to navigation

Preview the invoices of a checkout session

The first invoices the session would create if it completed now, as the checkout page shows them. Only for a portal url of type CHECKOUT_SESSION while the session is OPEN. Requires the PORTAL_URL.VIEW permission.

Authentication

X-API-KEYstring
API Key authentication via header
OR
AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

versionstringRequiredDefaults to 1
version
resourceIdstringRequiredDefaults to
The ID of the resource for which the action is posted.

Headers

x-platform-idstringOptional
Platform ID.

Response

OK
invoiceslist of objects or nullOptional

The first invoices the session would create, one per invoice the subscriptions share. Absent while a field in checkout_session.missing_fields keeps the invoice from being worked out.

totalobjectOptional

The sum of invoices. Absent when the invoices are in different currencies.

per_subscriptionlist of objects or nullOptional
Per subscription, the invoices of each of its schedules as the invoice preview returns them.
checkout_sessionobjectOptional
The session the preview was worked out from.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
500
Internal Server Error