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

# Submit checkout

> Submit the wallet’s signed preparation to start redemption. Track the resulting order for shipment and dispatch.

Completing redemption burns the selected NFTs. Submit the payment once. If the connection drops, [look up the checkout](https://docs.renaiss.xyz/api-reference/redeem/get-checkout.md) with the original preparation ID. Reusing the ID returns its recorded state.

A successful checkout starts the redemption order. Check the order for dispatch and tracking updates.

## Request

Builder key, wallet access token and wallet signature

## Response

HTTP `200` can carry `status: "failed"` without a reason code. For `failed` or `submitting`, look up the original `preparationId` before another payment.

## Error codes

Match the HTTP status and response text to a row below. For guidance on codes shared across endpoints, see [Error meanings and recovery](https://docs.renaiss.xyz/api-reference/errors.md).

| HTTP | Error code | Text field | Response text and recovery |
| :- | :- | :- | :- |
| `400` | `CONTRACT_REVERT` | `error` | `Redemption request failed` The redemption was rejected. Read `GET /v2/redeem/checkout/{preparationId}` before you try again. |
| `400` | `FUNCTION_ERROR` | `error` | `Redemption request failed` The state of a collectible could not be read. Read `GET /v2/redeem/checkout/{preparationId}` before you try again. |
| `400` | `INSUFFICIENT_USDT_AMOUNT` | `error` | `Redemption request failed` Check the fee balance and the USDT allowance for Permit2. Look up the original preparation before another payment. |
| `400` | `REDEMPTION_ORDER_VALIDATION_FAILED` | `error` | `Redemption request failed` The prepared redemption is no longer valid. Prepare again from a new quote. |
| `400` | `WRONG_REQUEST_PARAMS` | `error` | `Invalid redemption input` `Request body is too large` `Redemption request failed` `Preparation expired` A field is missing or has the wrong form, or a collectible in the preparation can no longer be redeemed. Prepare again from a new quote. |
| `400` | `INSUFFICIENT_ALLOWANCE` | `error` | `Redemption request failed` This HTTP error can surface if the failed payment cannot be matched to its recorded checkout. A matched failure returns HTTP `200` with `status: "failed"`. Check the fee balance and the USDT allowance for Permit2. Look up the original preparation before another payment. |
| `401` | `API_AUTH_INVALID_CREDENTIAL` | `error` | `Invalid authentication credential` The builder key or the wallet access token is malformed, unknown, expired or revoked. Check the key. For the token, refresh the tokens or have the wallet sign in again. |
| `401` | `API_AUTH_MISSING_CREDENTIAL` | `error` | `Required authentication credential is missing` The builder key or the wallet access token is missing. Send both: the key in the `x-builder-api-key` header and the token as a Bearer token. |
| `403` | `API_AUTH_CREDENTIAL_NOT_ALLOWED` | `error` | `Credential is not allowed by this policy` A credential this route does not take was sent. Send the builder key and the wallet access token only. |
| `403` | `API_AUTH_INSUFFICIENT_SCOPE` | `error` | `Required authentication scope is missing` The wallet access token lacks the scope this route needs: `redeem:read` to read, `redeem:write` to change. Have the wallet sign in again and ask for the scope. |
| `403` | `API_AUTH_INTEGRATION_MISMATCH` | `error` | `Authentication integrations do not match` The wallet access token was issued to another builder than the key. Use the key of the builder that issued the token. |
| `403` | `API_AUTH_INVALID_ACTION` | `error` | `Invalid wallet action proof` The signature does not match the wallet or the prepared data, or the preparation has expired. Prepare again and have the wallet sign the new data. |
| `403` | `API_AUTH_SUBJECT_MISMATCH` | `error` | `Authentication subjects do not match` The wallet access token is not for the chain of this API. Have the wallet sign in again for the right chain. |
| `403` | `GACHA_V3_BUILDER_NOT_ACCEPTED_ON_PUBLIC_API` | `error` | `This builder checks out on its own surface, not on the public API` This builder key cannot be used on this API. Do not retry; contact Renaiss. |
| `404` | `REDEMPTION_ORDER_NOT_FOUND` | `error` | `Not found or expired` `Not found` There is no such quote or preparation for this wallet and builder, or it has expired. Ask for a new quote. |
| `409` | `REDEMPTION_ORDER_CHECKOUT_STILL_ACTIVE` | `error` | `Redemption request failed` A checkout for these collectibles is already in progress. Do not send it again. Read `GET /v2/redeem/checkout/{preparationId}` to follow it. |
| `429` | `API_AUTH_RATE_LIMITED` | `error` | `Authentication rate limit exceeded` The builder key hit its rate limit. Wait a little, then retry at a lower rate. |
| `500` | `API_AUTH_INVALID_CONFIGURATION` | `error` | `Internal server error` Contact Renaiss with `x-request-id` if wallet authentication keeps failing. |
| `500` | `API_AUTH_ERROR` | `error` | `Internal server error` The signature could not be checked because the chain could not be read. Retry the request. |
| `500` | `FUNCTION_ERROR` | `error` | `Internal server error` |
| `503` | `FUNCTION_ERROR` | `error` | `Internal server error` |


## OpenAPI

````yaml api-reference/openapi.json POST /v2/redeem/checkout
openapi: 3.1.1
info:
  version: 1.0.0
  title: Renaiss Builder API v2
  description: >-
    Builder API v2 for gacha, marketplace and redemption with external wallets
    on BNB Smart Chain (chain 56). Any active, approved builder key can prepare
    purchases.


    A collectible is an item a wallet can pull, trade, sell back or redeem, such
    as a card. This API calls every such item a collectible (e.g. cards), in
    paths, fields and descriptions.


    Browse publicly, then prepare and sign actions with the buyer wallet. Gacha
    history and buyback offers require your builder key; purchases and buybacks
    also require a wallet action signature. Private shipping data and redemption
    require a wallet access token, which the API issues from a registered
    partner origin after the wallet signs a sign-in message. Gacha and
    marketplace never use a wallet access token. Keep the builder key on your
    backend.


    The acting wallet is an EOA or a deployed ERC-1271 contract account.
    EIP-7702 delegated accounts, ERC-6492 and ERC-8010 wrapped signatures and
    Renaiss-managed Safes are refused (a Safe only after its signature
    verified). A pull to a contract account that cannot receive ERC-721 tokens
    returns `CONTRACT_WALLET_CANNOT_RECEIVE_NFT`. A failed chain read returns
    `API_AUTH_ERROR` (500). Wallet access tokens and redemption are EOA only.
servers:
  - url: https://api.renaiss.xyz
    description: BNB Smart Chain
  - url: https://dev-api.renaiss.xyz
    description: BNB testnet
security: []
tags:
  - name: Gacha v2
    description: >-
      Direct-EOA pack browsing, purchases, collectible (e.g. card) reveals,
      purchase history and buybacks. Start here; no wallet access token is
      needed.
  - name: Marketplace
    description: >-
      Public collectible (e.g. card) browsing and external-wallet asks, bids,
      purchases and cancellations. Trading requires builder authorization and
      wallet action signatures.
  - name: Users
    description: >-
      What one wallet address has and did: its collectibles (e.g. cards), their
      total market value and its activities. The whole wallet, whichever builder
      it used. Requires your builder key only.
  - name: Redemption
    description: >-
      Shipping eligibility, quotes, redemption preparation, submission and
      tracking. Requires your builder key and a wallet access token for the same
      wallet.
  - name: Wallet access tokens
    description: >-
      Get, refresh and revoke the wallet access tokens that Redeem needs. The
      wallet signs a sign-in message (valid 5 minutes, one use); the API returns
      a wallet access token (15 minutes) and a refresh token (7 days, single
      use). Register exact partner frontend origins with Renaiss before use.
      Gacha and marketplace never use a wallet access token.
paths:
  /v2/redeem/checkout:
    post:
      tags:
        - Redemption
      summary: Submit a prepared EOA redemption once
      description: >-
        Submit the wallet’s signed preparation to start redemption. Track the
        resulting order for shipment and dispatch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                preparationId:
                  type: string
                  format: uuid
                signature:
                  type: string
                  pattern: ^0x(?:[a-fA-F0-9]{128}|[a-fA-F0-9]{130})$
              required:
                - preparationId
                - signature
              additionalProperties: false
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  requestId:
                    type: string
                  status:
                    type: string
                    enum:
                      - prepared
                      - submitting
                      - succeeded
                      - failed
                  transactionHash:
                    type: string
                required:
                  - requestId
                  - status
        '400':
          description: >-
            The redemption cannot be submitted.


            - Other codes can appear when the chain rejects the redemption. Read
            `GET /v2/redeem/checkout/{preparationId}` before you try again.


            See [error codes and
            recovery](/api-reference/redeem/submit-checkout#http-errors).
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: A short sentence about what went wrong.
                  code:
                    type: string
                required:
                  - error
                  - code
              example:
                error: Invalid redemption input
                code: WRONG_REQUEST_PARAMS
        '401':
          description: >-
            The builder key or the wallet access token is not accepted.


            See [error codes and
            recovery](/api-reference/redeem/submit-checkout#http-errors).
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: A short sentence about what went wrong.
                  code:
                    type: string
                    enum:
                      - API_AUTH_MISSING_CREDENTIAL
                      - API_AUTH_INVALID_CREDENTIAL
                required:
                  - error
                  - code
              example:
                error: Required authentication credential is missing
                code: API_AUTH_MISSING_CREDENTIAL
        '403':
          description: >-
            The signature is refused.


            See [error codes and
            recovery](/api-reference/redeem/submit-checkout#http-errors).
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: A short sentence about what went wrong.
                  code:
                    type: string
                    enum:
                      - API_AUTH_INVALID_ACTION
                      - API_AUTH_INSUFFICIENT_SCOPE
                      - API_AUTH_INTEGRATION_MISMATCH
                      - API_AUTH_SUBJECT_MISMATCH
                      - API_AUTH_CREDENTIAL_NOT_ALLOWED
                      - GACHA_V3_BUILDER_NOT_ACCEPTED_ON_PUBLIC_API
                required:
                  - error
                  - code
              example:
                error: Invalid wallet action proof
                code: API_AUTH_INVALID_ACTION
        '404':
          description: >-
            The quote or preparation was not found.


            See [error codes and
            recovery](/api-reference/redeem/submit-checkout#http-errors).
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: A short sentence about what went wrong.
                  code:
                    type: string
                    enum:
                      - REDEMPTION_ORDER_NOT_FOUND
                required:
                  - error
                  - code
              example:
                error: Not found or expired
                code: REDEMPTION_ORDER_NOT_FOUND
        '409':
          description: >-
            A checkout for this cart is already running.


            See [error codes and
            recovery](/api-reference/redeem/submit-checkout#http-errors).
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: A short sentence about what went wrong.
                  code:
                    type: string
                    enum:
                      - REDEMPTION_ORDER_CHECKOUT_STILL_ACTIVE
                required:
                  - error
                  - code
              example:
                error: Redemption request failed
                code: REDEMPTION_ORDER_CHECKOUT_STILL_ACTIVE
        '429':
          description: >-
            Too many requests with this builder key.


            See [error codes and
            recovery](/api-reference/redeem/submit-checkout#http-errors).
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: A short sentence about what went wrong.
                  code:
                    type: string
                    enum:
                      - API_AUTH_RATE_LIMITED
                required:
                  - error
                  - code
              example:
                error: Authentication rate limit exceeded
                code: API_AUTH_RATE_LIMITED
        '500':
          description: >-
            A failure on our side. Retry later; before you send the request
            again, read `GET /v2/redeem/checkout/{preparationId}` to see whether
            it went through.


            See [error codes and
            recovery](/api-reference/redeem/submit-checkout#http-errors).
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: A short sentence about what went wrong.
                  code:
                    type: string
                required:
                  - error
                  - code
              example:
                error: Internal server error
                code: FUNCTION_ERROR
        '503':
          description: >-
            A failure on our side: checkout storage is not available. Retry in a
            few seconds.


            See [error codes and
            recovery](/api-reference/redeem/submit-checkout#http-errors).
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: A short sentence about what went wrong.
                  code:
                    type: string
                required:
                  - error
                  - code
              example:
                error: Internal server error
                code: FUNCTION_ERROR
      security:
        - builderAuth: []
          walletSession: []
components:
  securitySchemes:
    builderAuth:
      type: apiKey
      in: header
      name: x-builder-api-key
      description: >-
        Your approved builder API key. Keep it on your backend. Gacha and
        marketplace writes also require wallet action signatures. Redeem also
        needs a wallet access token, a Bearer token the API issues after the
        wallet signs a sign-in message.
    walletSession:
      type: http
      scheme: bearer
      description: 'Wallet access token: Bearer authentication for Redeem'

````

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