Checkout Intents

Purchase product

Create a checkout intent and immediately trigger the purchase workflow.

This is a "fire-and-forget" endpoint that combines create + confirm in one step. The workflow handles offer retrieval, payment authorization, and order placement asynchronously. Poll the GET endpoint to check status.

post/api/v1/checkout-intents/purchase

Request body

referenceIdstring
discoverPromoCodesboolean
promoCodesPromoCode[]
quantityinteger required
productUrlstring required

Example request

{
  "referenceId": "order-1234",
  "constraints": {
    "maxShippingPrice": 500,
    "maxTotalPrice": 100000
  },
  "promoCodes": [
    "SAVE20"
  ],
  "variantSelections": [
    {
      "label": "Size, Color, etc."
    }
  ],
  "buyer": {
    "postalCode": "10001",
    "country": "US",
    "province": "NY",
    "city": "New York",
    "address2": "Apt 1",
    "address1": "123 Main St",
    "phone": "1234567890",
    "email": "john.doe@example.com",
    "lastName": "Doe",
    "firstName": "John"
  },
  "quantity": 1,
  "productUrl": "https://www.amazon.com/dp/B0DFC9MT8Q",
  "paymentMethod": {
    "stripeToken": "tok_1RkrWWHGDlstla3f1Fc7ZrhH",
    "type": "stripe_token"
  }
}

Response

Created

OR
OR
OR
OR
OR

Example response

{
  "referenceId": "order-1234",
  "constraints": {
    "maxShippingPrice": 500,
    "maxTotalPrice": 100000
  },
  "promoCodes": [
    "SAVE20"
  ],
  "variantSelections": [
    {
      "label": "Size, Color, etc."
    }
  ],
  "buyer": {
    "postalCode": "10001",
    "country": "US",
    "province": "NY",
    "city": "New York",
    "address2": "Apt 1",
    "address1": "123 Main St",
    "phone": "1234567890",
    "email": "john.doe@example.com",
    "lastName": "Doe",
    "firstName": "John"
  }
}

Changes

Changed in 11 of the 48 revisions of this API.1826

    • removed NekudaPaymentMethod PravaPaymentMethod from the allOf[CheckoutIntentConfirmParams]/paymentMethod request property anyOf list

      request-property-any-of-removed

    • removed NekudaPaymentMethod PravaPaymentMethod from the anyOf[subschema #2: Awaiting Confirmation]/allOf[subschema #2]/paymentMethod response property anyOf list for the response status 201

      response-property-any-of-removed

    • removed NekudaPaymentMethod PravaPaymentMethod from the anyOf[subschema #3: Requires Action]/allOf[subschema #2]/paymentMethod response property anyOf list for the response status 201

      response-property-any-of-removed

    • removed NekudaPaymentMethod PravaPaymentMethod from the anyOf[subschema #4: Placing Order]/allOf[subschema #2]/paymentMethod response property anyOf list for the response status 201

      response-property-any-of-removed

    • removed NekudaPaymentMethod PravaPaymentMethod from the anyOf[subschema #5: Completed]/allOf[subschema #2]/paymentMethod response property anyOf list for the response status 201

      response-property-any-of-removed

    • removed NekudaPaymentMethod PravaPaymentMethod from the anyOf[subschema #6: Failed]/allOf[subschema #2]/paymentMethod response property anyOf list for the response status 201

      response-property-any-of-removed

    This revision also has 3 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • added the new optional request property allOf[CheckoutIntentPostParams]/referenceId

      new-optional-request-property

    • added the optional property anyOf[subschema #1: Retrieving Offer]/allOf[BaseCheckoutIntent]/referenceId to the response with the 201 status

      response-optional-property-added

    • added the optional property anyOf[subschema #2: Awaiting Confirmation]/allOf[BaseCheckoutIntent]/referenceId to the response with the 201 status

      response-optional-property-added

    • added the optional property anyOf[subschema #3: Requires Action]/allOf[BaseCheckoutIntent]/referenceId to the response with the 201 status

      response-optional-property-added

    • added the optional property anyOf[subschema #4: Placing Order]/allOf[BaseCheckoutIntent]/referenceId to the response with the 201 status

      response-optional-property-added

    • added the optional property anyOf[subschema #5: Completed]/allOf[BaseCheckoutIntent]/referenceId to the response with the 201 status

      response-optional-property-added

    • added the optional property anyOf[subschema #6: Failed]/allOf[BaseCheckoutIntent]/referenceId to the response with the 201 status

      response-optional-property-added

    • the security scope checkout_intents:write was added to the endpoint's security scheme bearerAuth

      api-security-scope-added

    • added the non-success response with the status 503

      response-non-success-status-added

  • 62bb6bbe00e855See the full diff
    • removed the optional property anyOf[subschema #2: Awaiting Confirmation]/allOf[subschema #2]/offer/developerCommission from the response with the 201 status

      response-optional-property-removed

    • removed the optional property anyOf[subschema #3: Requires Action]/allOf[subschema #2]/offer/developerCommission from the response with the 201 status

      response-optional-property-removed

    • removed the optional property anyOf[subschema #4: Placing Order]/allOf[subschema #2]/offer/developerCommission from the response with the 201 status

      response-optional-property-removed

    • removed the optional property anyOf[subschema #5: Completed]/allOf[subschema #2]/offer/developerCommission from the response with the 201 status

      response-optional-property-removed

    • removed the optional property anyOf[subschema #6: Failed]/allOf[subschema #2]/offer/developerCommission from the response with the 201 status

      response-optional-property-removed

    • added the optional property anyOf[subschema #2: Awaiting Confirmation]/allOf[subschema #2]/offer/commission to the response with the 201 status

      response-optional-property-added

    • added the optional property anyOf[subschema #3: Requires Action]/allOf[subschema #2]/offer/commission to the response with the 201 status

      response-optional-property-added

    • added the optional property anyOf[subschema #4: Placing Order]/allOf[subschema #2]/offer/commission to the response with the 201 status

      response-optional-property-added

    • added the optional property anyOf[subschema #5: Completed]/allOf[subschema #2]/offer/commission to the response with the 201 status

      response-optional-property-added

    • added the optional property anyOf[subschema #6: Failed]/allOf[subschema #2]/offer/commission to the response with the 201 status

      response-optional-property-added

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • added the optional property anyOf[subschema #2: Awaiting Confirmation]/allOf[subschema #2]/offer/developerCommission to the response with the 201 status

      response-optional-property-added

    • added the optional property anyOf[subschema #3: Requires Action]/allOf[subschema #2]/offer/developerCommission to the response with the 201 status

      response-optional-property-added

    • added the optional property anyOf[subschema #4: Placing Order]/allOf[subschema #2]/offer/developerCommission to the response with the 201 status

      response-optional-property-added

    • added the optional property anyOf[subschema #5: Completed]/allOf[subschema #2]/offer/developerCommission to the response with the 201 status

      response-optional-property-added

    • added the optional property anyOf[subschema #6: Failed]/allOf[subschema #2]/offer/developerCommission to the response with the 201 status

      response-optional-property-added

    • removed the optional property anyOf[subschema #5: Completed]/allOf[subschema #2]/commissions from the response with the 201 status

      response-optional-property-removed

    This revision also has 2 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • added the new payment_cvc_expired enum value to the anyOf[subschema #6: Failed]/allOf[subschema #2]/failureReason/code response property for the response status 201

      response-property-enum-value-added

    • added the optional property anyOf[subschema #5: Completed]/allOf[subschema #2]/commissions to the response with the 201 status

      response-optional-property-added

    • removed the payment_cvc_expired enum value from the anyOf[subschema #6: Failed]/allOf[subschema #2]/failureReason/code response property for the response status 201

      response-property-enum-value-removed