> ## Documentation Index
> Fetch the complete documentation index at: https://docs.henrylabs.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Cart Purchase Input

> Answer an input request: something a store asked the buyer for while the purchase was running, most often a code it sent them. Open requests are listed in `inputRequests` on Cart Purchase Status, each with an `expiresAt`. The purchase goes on with the answer, and the order is returned. A request takes one answer: if the store refuses it, a new request follows with `lastAnswerRejected: true`.



## OpenAPI

````yaml /v1/api-reference/openapi.documented.json post /cart/purchase/input
openapi: 3.1.0
info:
  title: Henry Labs API
  version: 1.18.0
  description: Playground for Henry Labs API endpoints
  contact:
    name: Henry Labs API Support
    email: support@henrylabs.ai
servers:
  - url: https://api.henrylabs.ai/v1
    description: Production server
security:
  - ApiKeyAuth: []
tags:
  - name: Product
    description: Product search, details, and data enrichment
  - name: Cart
    description: Universal user shopping cart management
  - name: Orders
    description: Order management post purchase
  - name: Merchants
    description: Merchant information and status
  - name: Card
    description: Card tokenization and management
  - name: Account
    description: Buyers' own logins at stores that check out on customers' own accounts
paths:
  /cart/purchase/input:
    post:
      tags:
        - Cart
      summary: Cart Purchase Input
      description: >-
        Answer an input request: something a store asked the buyer for while the
        purchase was running, most often a code it sent them. Open requests are
        listed in `inputRequests` on Cart Purchase Status, each with an
        `expiresAt`. The purchase goes on with the answer, and the order is
        returned. A request takes one answer: if the store refuses it, a new
        request follows with `lastAnswerRejected: true`.
      operationId: cartPurchaseInput
      requestBody:
        content:
          application/json:
            example:
              requestId: inp-ref_3fa85f64-5717-4562-b3fc
              value: '482913'
            schema:
              $ref: '#/components/schemas/cartPurchaseAnswerInput'
      responses:
        '200':
          description: >-
            The answer was accepted and the purchase goes on with it. The order,
            still `processing`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/cartPurchaseStatusResponse'
        '400':
          description: >-
            Bad request: the value does not fit the request, or the request
            takes no answer
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  status:
                    type: string
                  message:
                    type: string
                required:
                  - success
                  - status
                  - message
                additionalProperties: false
        '401':
          description: Unauthorized - Invalid API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  status:
                    type: string
                  message:
                    type: string
                required:
                  - success
                  - status
                  - message
                additionalProperties: false
        '404':
          description: Input request not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  status:
                    type: string
                  message:
                    type: string
                required:
                  - success
                  - status
                  - message
                additionalProperties: false
        '409':
          description: >-
            The request can no longer be answered: it was already answered, it
            expired, or the purchase moved on without it
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  status:
                    type: string
                  message:
                    type: string
                required:
                  - success
                  - status
                  - message
                additionalProperties: false
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import HenrySDK from '@henrylabs/sdk';

            const client = new HenrySDK({
              apiKey: process.env['HENRY_SDK_API_KEY'], // This is the default and can be omitted
            });

            const response = await client.cart.checkout.submitPurchaseInput({
              requestId: 'inp-ref_3fa85f64-5717-4562-b3fc',
              value: '482913',
            });

            console.log(response.details);
components:
  schemas:
    cartPurchaseAnswerInput:
      type: object
      properties:
        requestId:
          type: string
          pattern: ^[a-zA-Z]{3}-ref_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[0-9a-f]{4}$
          description: >-
            The id of the input request being answered, from
            `inputRequests[].id` on Cart Purchase Status
          example: inp-ref_3fa85f64-5717-4562-b3fc
        value:
          anyOf:
            - type: string
              maxLength: 200
            - type: boolean
          description: >-
            The buyer's answer, by the request's `type`. `code`: the code as a
            string; spaces and dashes are dropped, and it is otherwise 4 to 10
            letters and digits. `text`: one line of text. `choice`: the `id` of
            the option picked. `confirm`: `true` or `false`. An `approval` or a
            `link` request takes no answer.
          example: '482913'
      required:
        - requestId
        - value
    cartPurchaseStatusResponse:
      type: object
      properties:
        refId:
          type: string
          pattern: ^[a-zA-Z]{3}-ref_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[0-9a-f]{4}$
        status:
          type: string
          enum:
            - pending
            - processing
            - complete
            - partially_complete
            - failed
            - cancelled
          description: >-
            `pending` / `processing` while the purchase runs. It then settles:
            `complete` (every item bought), `partially_complete` (some items
            bought — see `products[].status`), `failed` (nothing bought — see
            `error`), or `cancelled` (stopped by Cart Purchase Cancel before
            anything was bought). An order can stay `processing` for up to an
            hour before it settles.
        products:
          type: array
          items:
            type: object
            properties:
              status:
                type: string
                enum:
                  - pending
                  - processing
                  - complete
                  - failed
                  - cancelled
                description: >-
                  The item's own outcome: `complete` once bought, `failed` once
                  it could not be, `cancelled` when the purchase was cancelled
                  before it was bought. It stays `processing` while it is being
                  bought, for up to an hour before it settles.
              link:
                type: string
                format: uri
              affiliateProductLink:
                type: string
                format: uri
              quantity:
                type: integer
                exclusiveMinimum: 0
                maximum: 9007199254740991
              merchant:
                type: string
              host:
                type: string
              selectedOptions:
                type: array
                items:
                  type: string
              selectedShipping:
                type: object
                properties:
                  id:
                    type: string
                  value:
                    type: string
                additionalProperties: false
            required:
              - status
              - link
              - quantity
              - merchant
              - host
            additionalProperties: false
        details:
          type: object
          properties:
            hasAccount:
              type: boolean
            name:
              type: object
              properties:
                firstName:
                  type: string
                middleName:
                  type: string
                lastName:
                  type: string
              required:
                - firstName
                - lastName
              additionalProperties: false
            email:
              type: string
            phone:
              type: object
              properties:
                countryCode:
                  type: string
                nationalNumber:
                  type: string
                e164:
                  type: string
                country:
                  type: string
              required:
                - countryCode
                - nationalNumber
                - e164
              additionalProperties: false
            shippingAddress:
              type: object
              properties:
                name:
                  type: object
                  properties:
                    firstName:
                      type: string
                    middleName:
                      type: string
                    lastName:
                      type: string
                  required:
                    - firstName
                    - lastName
                  additionalProperties: false
                email:
                  type: string
                  format: email
                  pattern: >-
                    ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
                phone:
                  type: object
                  properties:
                    countryCode:
                      type: string
                    nationalNumber:
                      type: string
                    e164:
                      type: string
                    country:
                      type: string
                  required:
                    - countryCode
                    - nationalNumber
                    - e164
                  additionalProperties: false
                line1:
                  type: string
                line2:
                  type: string
                city:
                  type: string
                province:
                  type: string
                postalCode:
                  type: string
                countryCode:
                  type: string
              required:
                - line1
                - city
                - province
                - postalCode
                - countryCode
              additionalProperties: false
            card:
              type: object
              properties:
                nameOnCard:
                  type: object
                  properties:
                    firstName:
                      type: string
                    middleName:
                      type: string
                    lastName:
                      type: string
                  required:
                    - firstName
                    - lastName
                  additionalProperties: false
                details:
                  type: object
                  properties: {}
                  additionalProperties: false
                billingAddress:
                  type: object
                  properties:
                    name:
                      type: object
                      properties:
                        firstName:
                          type: string
                        middleName:
                          type: string
                        lastName:
                          type: string
                      required:
                        - firstName
                        - lastName
                      additionalProperties: false
                    email:
                      type: string
                      format: email
                      pattern: >-
                        ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
                    phone:
                      type: object
                      properties:
                        countryCode:
                          type: string
                        nationalNumber:
                          type: string
                        e164:
                          type: string
                        country:
                          type: string
                      required:
                        - countryCode
                        - nationalNumber
                        - e164
                      additionalProperties: false
                    line1:
                      type: string
                    line2:
                      type: string
                    city:
                      type: string
                    province:
                      type: string
                    postalCode:
                      type: string
                    countryCode:
                      type: string
                  required:
                    - line1
                    - city
                    - province
                    - postalCode
                    - countryCode
                  additionalProperties: false
              required:
                - nameOnCard
                - details
              additionalProperties: false
            settings:
              type: object
              properties:
                collectEmail:
                  type: boolean
                collectAddress:
                  type: boolean
                collectPhone:
                  type: boolean
              additionalProperties: false
          required:
            - hasAccount
            - name
            - card
          additionalProperties: false
        inputRequests:
          type: array
          items:
            $ref: '#/components/schemas/inputRequest'
          description: >-
            What the purchase is waiting on the buyer for, while it is
            `processing`: most often a code a store sent them. Show each
            request's `message` to the buyer and answer it with Cart Purchase
            Input before its `expiresAt`. Empty when the purchase is waiting on
            nothing, which is nearly always, and always when the purchase was
            made with `allowInputRequests: false`.
        result:
          type: object
          properties:
            items:
              type: array
              items:
                type: object
                properties:
                  productLink:
                    type: string
                    format: uri
                  confirmationNumber:
                    type: string
                  quantity:
                    anyOf:
                      - type: integer
                        exclusiveMinimum: 0
                        maximum: 9007199254740991
                      - type: 'null'
                  shipping:
                    type: object
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                      cost:
                        type: object
                        properties:
                          value:
                            type: number
                          currency:
                            type: string
                            enum:
                              - USD
                              - EUR
                              - AUD
                              - SGD
                              - TWD
                              - GBP
                              - CAD
                              - MXN
                              - NPR
                              - INR
                              - DKK
                              - NOK
                              - SEK
                              - CHF
                              - PLN
                              - CZK
                              - JPY
                              - NZD
                              - HKD
                              - AED
                              - LBP
                              - SAR
                        required:
                          - value
                          - currency
                        additionalProperties: false
                      timeEstimate:
                        type: string
                      minDate:
                        type: string
                      maxDate:
                        type: string
                    required:
                      - id
                      - name
                      - cost
                    additionalProperties: false
                  costs:
                    type: object
                    properties:
                      subtotal:
                        type: object
                        properties:
                          value:
                            type: number
                          currency:
                            type: string
                            enum:
                              - USD
                              - EUR
                              - AUD
                              - SGD
                              - TWD
                              - GBP
                              - CAD
                              - MXN
                              - NPR
                              - INR
                              - DKK
                              - NOK
                              - SEK
                              - CHF
                              - PLN
                              - CZK
                              - JPY
                              - NZD
                              - HKD
                              - AED
                              - LBP
                              - SAR
                        required:
                          - value
                          - currency
                        additionalProperties: false
                      tax:
                        type: object
                        properties:
                          value:
                            type: number
                          currency:
                            type: string
                            enum:
                              - USD
                              - EUR
                              - AUD
                              - SGD
                              - TWD
                              - GBP
                              - CAD
                              - MXN
                              - NPR
                              - INR
                              - DKK
                              - NOK
                              - SEK
                              - CHF
                              - PLN
                              - CZK
                              - JPY
                              - NZD
                              - HKD
                              - AED
                              - LBP
                              - SAR
                        required:
                          - value
                          - currency
                        additionalProperties: false
                      shipping:
                        type: object
                        properties:
                          value:
                            type: number
                          currency:
                            type: string
                            enum:
                              - USD
                              - EUR
                              - AUD
                              - SGD
                              - TWD
                              - GBP
                              - CAD
                              - MXN
                              - NPR
                              - INR
                              - DKK
                              - NOK
                              - SEK
                              - CHF
                              - PLN
                              - CZK
                              - JPY
                              - NZD
                              - HKD
                              - AED
                              - LBP
                              - SAR
                        required:
                          - value
                          - currency
                        additionalProperties: false
                      discount:
                        type: object
                        properties:
                          value:
                            type: number
                          currency:
                            type: string
                            enum:
                              - USD
                              - EUR
                              - AUD
                              - SGD
                              - TWD
                              - GBP
                              - CAD
                              - MXN
                              - NPR
                              - INR
                              - DKK
                              - NOK
                              - SEK
                              - CHF
                              - PLN
                              - CZK
                              - JPY
                              - NZD
                              - HKD
                              - AED
                              - LBP
                              - SAR
                        required:
                          - value
                          - currency
                        additionalProperties: false
                      total:
                        type: object
                        properties:
                          value:
                            type: number
                          currency:
                            type: string
                            enum:
                              - USD
                              - EUR
                              - AUD
                              - SGD
                              - TWD
                              - GBP
                              - CAD
                              - MXN
                              - NPR
                              - INR
                              - DKK
                              - NOK
                              - SEK
                              - CHF
                              - PLN
                              - CZK
                              - JPY
                              - NZD
                              - HKD
                              - AED
                              - LBP
                              - SAR
                        required:
                          - value
                          - currency
                        additionalProperties: false
                    required:
                      - total
                    additionalProperties: false
                  appliedCoupon:
                    type: object
                    properties:
                      code:
                        type: string
                      savedAmount:
                        type: object
                        properties:
                          value:
                            type: number
                          currency:
                            type: string
                            enum:
                              - USD
                              - EUR
                              - AUD
                              - SGD
                              - TWD
                              - GBP
                              - CAD
                              - MXN
                              - NPR
                              - INR
                              - DKK
                              - NOK
                              - SEK
                              - CHF
                              - PLN
                              - CZK
                              - JPY
                              - NZD
                              - HKD
                              - AED
                              - LBP
                              - SAR
                        required:
                          - value
                          - currency
                        additionalProperties: false
                    required:
                      - code
                    additionalProperties: false
                  metadata:
                    type: object
                    propertyNames:
                      type: string
                    additionalProperties: {}
                required:
                  - productLink
                  - confirmationNumber
                  - costs
                additionalProperties: false
            costs:
              type: object
              properties:
                subtotal:
                  type: object
                  properties:
                    value:
                      type: number
                    currency:
                      type: string
                      enum:
                        - USD
                        - EUR
                        - AUD
                        - SGD
                        - TWD
                        - GBP
                        - CAD
                        - MXN
                        - NPR
                        - INR
                        - DKK
                        - NOK
                        - SEK
                        - CHF
                        - PLN
                        - CZK
                        - JPY
                        - NZD
                        - HKD
                        - AED
                        - LBP
                        - SAR
                  required:
                    - value
                    - currency
                  additionalProperties: false
                serviceFee:
                  type: object
                  properties:
                    value:
                      type: number
                    currency:
                      type: string
                      enum:
                        - USD
                        - EUR
                        - AUD
                        - SGD
                        - TWD
                        - GBP
                        - CAD
                        - MXN
                        - NPR
                        - INR
                        - DKK
                        - NOK
                        - SEK
                        - CHF
                        - PLN
                        - CZK
                        - JPY
                        - NZD
                        - HKD
                        - AED
                        - LBP
                        - SAR
                  required:
                    - value
                    - currency
                  additionalProperties: false
                total:
                  type: object
                  properties:
                    value:
                      type: number
                    currency:
                      type: string
                      enum:
                        - USD
                        - EUR
                        - AUD
                        - SGD
                        - TWD
                        - GBP
                        - CAD
                        - MXN
                        - NPR
                        - INR
                        - DKK
                        - NOK
                        - SEK
                        - CHF
                        - PLN
                        - CZK
                        - JPY
                        - NZD
                        - HKD
                        - AED
                        - LBP
                        - SAR
                  required:
                    - value
                    - currency
                  additionalProperties: false
              required:
                - subtotal
                - serviceFee
                - total
              additionalProperties: false
          required:
            - items
            - costs
          additionalProperties: false
        error:
          description: >-
            Why items failed, once the order has settled as `failed` or
            `partially_complete`. Absent while the purchase runs and when every
            item was bought.
          type: object
          properties:
            code:
              type: string
              enum:
                - CARD_DECLINED
                - ITEM_UNAVAILABLE
                - SHIPPING_UNAVAILABLE
                - MINIMUM_ORDER_NOT_MET
                - ACCOUNT_LOGIN_FAILED
                - GMAIL_REQUIRED
                - INPUT_NOT_PROVIDED
                - ORDER_CHANGE_DECLINED
                - PURCHASE_FAILED
                - MULTIPLE_ERRORS
              description: >-
                `CARD_DECLINED` — the merchant did not accept the card; a
                different card may work. `ITEM_UNAVAILABLE` — an item is out of
                stock or no longer sold. `SHIPPING_UNAVAILABLE` — the merchant
                does not ship to the address. `MINIMUM_ORDER_NOT_MET` — the
                order is under the merchant's minimum. `ACCOUNT_LOGIN_FAILED` —
                the merchant would not sign in to the buyer's own account: no
                login is connected for them there, the password was rejected or
                the account is locked, or the merchant asked for a verification
                only the buyer can complete; ask the buyer to check their login
                at the merchant and connect it again (`account.connect`).
                `GMAIL_REQUIRED` — the merchant emailed a sign-in code to the
                buyer's own account and the buyer's Gmail is not connected (or
                its access was removed), so the code could not be read; hand the
                buyer `gmail.connectUrl` from `account.list` and purchase again
                once they have connected it. `INPUT_NOT_PROVIDED` — the merchant
                asked the buyer for something through an input request, most
                often a code it sent them, and no answer it accepted came before
                the request expired; purchase again and answer the request when
                it appears in `inputRequests`. `ORDER_CHANGE_DECLINED` — the
                buyer was asked through an input request to accept a change to
                the order, an item that now costs more than they were shown, and
                said no; nothing was bought from that merchant.
                `PURCHASE_FAILED` — the purchase could not be completed for a
                reason on Henry's side; contact support with the reference ID.
                `MULTIPLE_ERRORS` — the order's merchants failed for different
                reasons.
              example: CARD_DECLINED
            message:
              type: string
              description: >-
                A short description of the failure, safe to show the buyer.
                `PURCHASE_FAILED` and `MULTIPLE_ERRORS` carry the order's
                reference ID for support.
              example: The merchant did not accept the card
          required:
            - code
            - message
          additionalProperties: false
      required:
        - refId
        - status
        - products
        - details
        - inputRequests
      additionalProperties: false
    inputRequest:
      oneOf:
        - type: object
          properties:
            type:
              type: string
              const: code
              description: >-
                A code the store sent the buyer. Answer with the code as a
                string.
            id:
              type: string
              pattern: >-
                ^[a-zA-Z]{3}-ref_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[0-9a-f]{4}$
              description: The request's id. Answer it with Cart Purchase Input.
              example: inp-ref_3fa85f64-5717-4562-b3fc
            reason:
              type: string
              enum:
                - account_verification
                - payment_verification
                - order_change
              description: >-
                Why the store is asking. `account_verification`: to confirm that
                the buyer is the one signing in to their account at the store.
                `payment_verification`: to approve the payment; this one comes
                from the buyer's bank. `order_change`: something about the order
                changed and the buyer has to agree to it.
            message:
              type: string
              description: >-
                What to show the buyer: the store's own words when they could be
                read from its page, otherwise a standard sentence for the
                request.
              example: >-
                For your security, we texted a 6-digit code to the phone number
                ending in 34.
            merchant:
              type: string
              description: The store that is asking, as in `products[].merchant`.
            host:
              type: string
              description: That store's host, as in `products[].host`.
            lastAnswerRejected:
              type: boolean
              description: >-
                `true` when the store refused the answer given to the request
                before this one, and this request asks for a new one.
            expiresAt:
              type: string
              format: date-time
              pattern: >-
                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
              description: >-
                When the request stops taking an answer. If it passes
                unanswered, that store's items fail.
            code:
              type: object
              properties:
                length:
                  description: >-
                    How many characters the store's code box takes, when its
                    page shows that. A hint for drawing the input, not a rule:
                    the store judges the code.
                  type: integer
                  minimum: -9007199254740991
                  maximum: 9007199254740991
                sentVia:
                  description: >-
                    How the store says it sent the code: `sms`, `email`, or
                    `app` for an authenticator app.
                  type: string
                  enum:
                    - sms
                    - email
                    - app
              additionalProperties: false
          required:
            - type
            - id
            - reason
            - message
            - merchant
            - host
            - lastAnswerRejected
            - expiresAt
            - code
          additionalProperties: false
        - type: object
          properties:
            type:
              type: string
              const: approval
              description: >-
                Something the buyer approves on their own device, such as a
                sign-in notification. It takes no answer: show `message`, and
                the purchase goes on once they approve.
            id:
              type: string
              pattern: >-
                ^[a-zA-Z]{3}-ref_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[0-9a-f]{4}$
              description: The request's id. Answer it with Cart Purchase Input.
              example: inp-ref_3fa85f64-5717-4562-b3fc
            reason:
              type: string
              enum:
                - account_verification
                - payment_verification
                - order_change
              description: >-
                Why the store is asking. `account_verification`: to confirm that
                the buyer is the one signing in to their account at the store.
                `payment_verification`: to approve the payment; this one comes
                from the buyer's bank. `order_change`: something about the order
                changed and the buyer has to agree to it.
            message:
              type: string
              description: >-
                What to show the buyer: the store's own words when they could be
                read from its page, otherwise a standard sentence for the
                request.
              example: >-
                For your security, we texted a 6-digit code to the phone number
                ending in 34.
            merchant:
              type: string
              description: The store that is asking, as in `products[].merchant`.
            host:
              type: string
              description: That store's host, as in `products[].host`.
            lastAnswerRejected:
              type: boolean
              description: >-
                `true` when the store refused the answer given to the request
                before this one, and this request asks for a new one.
            expiresAt:
              type: string
              format: date-time
              pattern: >-
                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
              description: >-
                When the request stops taking an answer. If it passes
                unanswered, that store's items fail.
          required:
            - type
            - id
            - reason
            - message
            - merchant
            - host
            - lastAnswerRejected
            - expiresAt
          additionalProperties: false
        - type: object
          properties:
            type:
              type: string
              const: text
              description: >-
                Something the buyer knows. Answer with one line of text, at most
                `text.maxLength` characters.
            id:
              type: string
              pattern: >-
                ^[a-zA-Z]{3}-ref_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[0-9a-f]{4}$
              description: The request's id. Answer it with Cart Purchase Input.
              example: inp-ref_3fa85f64-5717-4562-b3fc
            reason:
              type: string
              enum:
                - account_verification
                - payment_verification
                - order_change
              description: >-
                Why the store is asking. `account_verification`: to confirm that
                the buyer is the one signing in to their account at the store.
                `payment_verification`: to approve the payment; this one comes
                from the buyer's bank. `order_change`: something about the order
                changed and the buyer has to agree to it.
            message:
              type: string
              description: >-
                What to show the buyer: the store's own words when they could be
                read from its page, otherwise a standard sentence for the
                request.
              example: >-
                For your security, we texted a 6-digit code to the phone number
                ending in 34.
            merchant:
              type: string
              description: The store that is asking, as in `products[].merchant`.
            host:
              type: string
              description: That store's host, as in `products[].host`.
            lastAnswerRejected:
              type: boolean
              description: >-
                `true` when the store refused the answer given to the request
                before this one, and this request asks for a new one.
            expiresAt:
              type: string
              format: date-time
              pattern: >-
                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
              description: >-
                When the request stops taking an answer. If it passes
                unanswered, that store's items fail.
            text:
              type: object
              properties:
                maxLength:
                  type: integer
                  minimum: -9007199254740991
                  maximum: 9007199254740991
              required:
                - maxLength
              additionalProperties: false
          required:
            - type
            - id
            - reason
            - message
            - merchant
            - host
            - lastAnswerRejected
            - expiresAt
            - text
          additionalProperties: false
        - type: object
          properties:
            type:
              type: string
              const: choice
              description: >-
                One of the options the store shows. Answer with the `id` of the
                option the buyer picked.
            id:
              type: string
              pattern: >-
                ^[a-zA-Z]{3}-ref_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[0-9a-f]{4}$
              description: The request's id. Answer it with Cart Purchase Input.
              example: inp-ref_3fa85f64-5717-4562-b3fc
            reason:
              type: string
              enum:
                - account_verification
                - payment_verification
                - order_change
              description: >-
                Why the store is asking. `account_verification`: to confirm that
                the buyer is the one signing in to their account at the store.
                `payment_verification`: to approve the payment; this one comes
                from the buyer's bank. `order_change`: something about the order
                changed and the buyer has to agree to it.
            message:
              type: string
              description: >-
                What to show the buyer: the store's own words when they could be
                read from its page, otherwise a standard sentence for the
                request.
              example: >-
                For your security, we texted a 6-digit code to the phone number
                ending in 34.
            merchant:
              type: string
              description: The store that is asking, as in `products[].merchant`.
            host:
              type: string
              description: That store's host, as in `products[].host`.
            lastAnswerRejected:
              type: boolean
              description: >-
                `true` when the store refused the answer given to the request
                before this one, and this request asks for a new one.
            expiresAt:
              type: string
              format: date-time
              pattern: >-
                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
              description: >-
                When the request stops taking an answer. If it passes
                unanswered, that store's items fail.
            options:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                  label:
                    type: string
                required:
                  - id
                  - label
                additionalProperties: false
            replaces:
              description: >-
                Present when the store cannot supply an option the buyer ordered
                for one of the items, and `options` are the ones it still has.
                The last option, whose `id` is `none`, declines them all: that
                item is then not bought.
              type: object
              properties:
                item:
                  type: object
                  properties:
                    link:
                      type: string
                      format: uri
                      description: The item's product link, as in `products[].link`.
                    name:
                      description: The product's name, when known.
                      type: string
                  required:
                    - link
                  additionalProperties: false
                label:
                  description: Which option it is, when known.
                  example: Size
                  type: string
                value:
                  type: string
                  description: The value the buyer ordered.
                  example: M
              required:
                - item
                - value
              additionalProperties: false
          required:
            - type
            - id
            - reason
            - message
            - merchant
            - host
            - lastAnswerRejected
            - expiresAt
            - options
          additionalProperties: false
        - type: object
          properties:
            type:
              type: string
              const: confirm
              description: A yes or a no. Answer with `true` or `false`.
            id:
              type: string
              pattern: >-
                ^[a-zA-Z]{3}-ref_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[0-9a-f]{4}$
              description: The request's id. Answer it with Cart Purchase Input.
              example: inp-ref_3fa85f64-5717-4562-b3fc
            reason:
              type: string
              enum:
                - account_verification
                - payment_verification
                - order_change
              description: >-
                Why the store is asking. `account_verification`: to confirm that
                the buyer is the one signing in to their account at the store.
                `payment_verification`: to approve the payment; this one comes
                from the buyer's bank. `order_change`: something about the order
                changed and the buyer has to agree to it.
            message:
              type: string
              description: >-
                What to show the buyer: the store's own words when they could be
                read from its page, otherwise a standard sentence for the
                request.
              example: >-
                For your security, we texted a 6-digit code to the phone number
                ending in 34.
            merchant:
              type: string
              description: The store that is asking, as in `products[].merchant`.
            host:
              type: string
              description: That store's host, as in `products[].host`.
            lastAnswerRejected:
              type: boolean
              description: >-
                `true` when the store refused the answer given to the request
                before this one, and this request asks for a new one.
            expiresAt:
              type: string
              format: date-time
              pattern: >-
                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
              description: >-
                When the request stops taking an answer. If it passes
                unanswered, that store's items fail.
            price:
              description: >-
                Present when the buyer is asked to accept a price that went up
                for one of the items. `true` buys it at the new price; `false`
                ends the purchase with nothing bought. With no answer before
                `expiresAt`, the item is bought at the store's price.
              type: object
              properties:
                item:
                  type: object
                  properties:
                    link:
                      type: string
                      format: uri
                      description: The item's product link, as in `products[].link`.
                    name:
                      description: The product's name, when known.
                      type: string
                  required:
                    - link
                  additionalProperties: false
                was:
                  type: object
                  properties:
                    value:
                      type: number
                    currency:
                      type: string
                      enum:
                        - USD
                        - EUR
                        - AUD
                        - SGD
                        - TWD
                        - GBP
                        - CAD
                        - MXN
                        - NPR
                        - INR
                        - DKK
                        - NOK
                        - SEK
                        - CHF
                        - PLN
                        - CZK
                        - JPY
                        - NZD
                        - HKD
                        - AED
                        - LBP
                        - SAR
                  required:
                    - value
                    - currency
                  additionalProperties: false
                  description: The price of one the buyer was shown.
                now:
                  type: object
                  properties:
                    value:
                      type: number
                    currency:
                      type: string
                      enum:
                        - USD
                        - EUR
                        - AUD
                        - SGD
                        - TWD
                        - GBP
                        - CAD
                        - MXN
                        - NPR
                        - INR
                        - DKK
                        - NOK
                        - SEK
                        - CHF
                        - PLN
                        - CZK
                        - JPY
                        - NZD
                        - HKD
                        - AED
                        - LBP
                        - SAR
                  required:
                    - value
                    - currency
                  additionalProperties: false
                  description: The price of one at the store now.
              required:
                - item
                - was
                - now
              additionalProperties: false
          required:
            - type
            - id
            - reason
            - message
            - merchant
            - host
            - lastAnswerRejected
            - expiresAt
          additionalProperties: false
        - type: object
          properties:
            type:
              type: string
              const: link
              description: >-
                A page the buyer finishes on another site. It takes no answer:
                send the buyer to `url`.
            id:
              type: string
              pattern: >-
                ^[a-zA-Z]{3}-ref_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[0-9a-f]{4}$
              description: The request's id. Answer it with Cart Purchase Input.
              example: inp-ref_3fa85f64-5717-4562-b3fc
            reason:
              type: string
              enum:
                - account_verification
                - payment_verification
                - order_change
              description: >-
                Why the store is asking. `account_verification`: to confirm that
                the buyer is the one signing in to their account at the store.
                `payment_verification`: to approve the payment; this one comes
                from the buyer's bank. `order_change`: something about the order
                changed and the buyer has to agree to it.
            message:
              type: string
              description: >-
                What to show the buyer: the store's own words when they could be
                read from its page, otherwise a standard sentence for the
                request.
              example: >-
                For your security, we texted a 6-digit code to the phone number
                ending in 34.
            merchant:
              type: string
              description: The store that is asking, as in `products[].merchant`.
            host:
              type: string
              description: That store's host, as in `products[].host`.
            lastAnswerRejected:
              type: boolean
              description: >-
                `true` when the store refused the answer given to the request
                before this one, and this request asks for a new one.
            expiresAt:
              type: string
              format: date-time
              pattern: >-
                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
              description: >-
                When the request stops taking an answer. If it passes
                unanswered, that store's items fail.
            url:
              type: string
              format: uri
          required:
            - type
            - id
            - reason
            - message
            - merchant
            - host
            - lastAnswerRejected
            - expiresAt
            - url
          additionalProperties: false
      type: object
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.