Complete Order
Intent
Runs the complete order action.
When to call it
Call this when your workflow reaches the point where it must complete order.
Access boundary
Authorize the request with a token that carries orders:write.
Successful result
A successful request returns 200. The response schema below defines the body your integration receives.
Operational notes
Finalize a draft order and synchronously attempt an off-session charge.
On success, the order transitions to paid and benefit grants fire
before the response returns. On failure (decline, missing payment method,
SCA challenge), the order stays in draft and a 4xx error is returned.
The request fails with 412 if the order is not in draft status.
Scopes: orders:write
Authorizations
Path Parameters
The order ID.
Body
Schema to finalize a draft order and trigger an off-session charge.
ID of the payment method to charge. Must belong to the order's customer. Falls back to the customer's default payment method when unset.
Response
Successful Response
The stable identifier for this record.
The time Ruba created this record.
The time this record last changed.
draft, pending, paid, refunded, partially_refunded, void "paid"
Whether the order has been paid for.
true
Amount in cents, before discounts and taxes.
10000
Discount amount in cents.
1000
Amount in cents, after discounts but before taxes.
9000
Sales tax amount in cents.
720
Amount in cents, after discounts and taxes.
9720
Customer's balance amount applied to this invoice. Can increase the total amount paid, if the customer has a negative balance, or decrease it, if the customer has a positive balance.Amount in cents.
0
Amount in cents that is due for this order.
0
Amount refunded in cents.
0
Sales tax refunded in cents.
0
"usd"
purchase, subscription_create, subscription_cycle, subscription_update The name of the customer that should appear on the invoice.
The invoice number associated with this order. null while the order is in draft status; assigned at finalize.
Whether an invoice has been generated for this order.
The receipt number for this order. Set once the order is paid for organizations with receipts enabled. When set, a downloadable receipt PDF can be obtained via the receipt endpoint.
Platform fee amount in cents.
500
Currency of the platform fee.
"usd"
- DiscountFixedOnceForeverDurationBase
- DiscountFixedRepeatDurationBase
- DiscountPercentageOnceForeverDurationBase
- DiscountPercentageRepeatDurationBase
Line items composing the order.
A summary description of the order.
"Pro Plan"
Amount in cents that can still be refunded (net, before taxes). Accounts for any applied customer balance and previous refunds.
9000
Sales tax in cents that would be refunded if the full refundable amount is refunded.
720
Number of seats purchased (for seat-based one-time orders).
When the next automatic payment retry is scheduled. null if the order is not in dunning or all retries have been exhausted.
Key-value object storing custom field values.