Last updated 2 years ago

Order Response

If you'll recall from the Core Concepts the order's lifecycle goes from pending to active.

This order is pending currently. You can see that within the response "status": "pending".

Since we expanded the response with expand=recentInvoice (remember, it is case-sensitive), the response includes an _embedded section with the recentInvoice key and an Invoice object as its value.

Inspect that to find the total amount, and the id of the invoice.

An excerpt from my example:

"_embedded": {
"recentInvoice": {
    "id": "ben-1706-1",
    "currency": "USD",
    "invoiceNumber": 1,
    "customerId": "ben-1706",
    "websiteId": "",
    "organizationId": "redocly-llc",
    "subscriptionId": "ben-1706-123",
    "amount": 675,

If you wish, you can present a total inclusive of taxes, shipping and discounts, or the full breakdown to the customer to confirm their purchase prior to submitting the next API request. Or, you can proceed immediately and submit the request depending on the user experience you desire.

What You'll Need

  • recentInvoiceId
  • _embedded.recentInvoice.amount

Next, we'll pay the invoice.