orders
public

Finalize Order

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

post/v1/orders/{id}/finalize

Path parameters

idstring uuid4 required

The order ID.

The order ID.

Request body

payment_method_idstring uuid4 nullable

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

Order required— unresolved $ref

Changes

Changed in 3 of the 11 revisions of this API.15

    • added the new subscription_meter_cycle enum value to the billing_reason response property for the response status 200

      response-property-enum-value-added

    • added the required property customer/first_user_event_at to the response with the 200 status

      response-required-property-added

    • added the required property discount/anyOf[subschema #1: OrderDiscount]/oneOf[subschema #1: DiscountFixedOnceForeverDurationBase]/max_redemptions_per_customer to the response with the 200 status

      response-required-property-added

    • added the required property discount/anyOf[subschema #1: OrderDiscount]/oneOf[subschema #2: DiscountFixedRepeatDurationBase]/max_redemptions_per_customer to the response with the 200 status

      response-required-property-added

    • added the required property discount/anyOf[subschema #1: OrderDiscount]/oneOf[subschema #3: DiscountPercentageOnceForeverDurationBase]/max_redemptions_per_customer to the response with the 200 status

      response-required-property-added

    • added the required property discount/anyOf[subschema #1: OrderDiscount]/oneOf[subschema #4: DiscountPercentageRepeatDurationBase]/max_redemptions_per_customer to the response with the 200 status

      response-required-property-added