Tweed checkout API

The checkout API from Tweed — 4 operation(s) for checkout.

OpenAPI Specification

tweed-checkout-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Tweed assets checkout API
  description: ''
  version: '1.0'
  contact: {}
servers: []
tags:
- name: checkout
paths:
  /checkout/transaction-price:
    post:
      operationId: getCheckoutItemPrice
      summary: Get the price of an item
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ItemPriceRequestDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemPriceResponseDto'
      tags:
      - checkout
  /checkout/create-intent:
    post:
      operationId: CheckoutController_createCheckoutIntent
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CheckoutIntentRequestDto'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CheckoutIntentResponseDto'
      tags:
      - checkout
  /checkout/perform-checkout:
    post:
      operationId: CheckoutController_performCheckout
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PerformCheckoutRequestDto'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PerformCheckoutResponseDto'
      tags:
      - checkout
  /checkout/{id}:
    get:
      operationId: getCheckoutById
      summary: Get checkout by ID
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      responses:
        '200':
          description: ''
      tags:
      - checkout
components:
  schemas:
    ItemPriceResponseDto:
      type: object
      properties:
        totalTransactionPriceUSD:
          type: number
        singleItemPriceUSD:
          type: number
        includedFees:
          type: number
        gasFee:
          type: number
      required:
      - totalTransactionPriceUSD
      - singleItemPriceUSD
      - includedFees
      - gasFee
    CheckoutIntentRequestDto:
      type: object
      properties:
        itemId:
          type: string
        quantity:
          type: number
        userWalletAddress:
          type: string
        receiptEmail:
          type: string
        customParams:
          type: object
      required:
      - itemId
      - quantity
      - userWalletAddress
      - receiptEmail
    KycDto:
      type: object
      properties:
        kycStatus:
          type: string
          enum:
          - NOT_REQUIRED
          - REQUIRED
          - PENDING
          - APPROVED
          - BLOCKED
        kycFactor:
          type: string
          enum:
          - PAYMENT_METHOD_FINGERPRINT_CUMULATIVE
          - WALLET_ADDRESS_CUMULATIVE
          - TOTAL_TRANSACTION_AMOUNT
        kycLink:
          type: string
      required:
      - kycStatus
    PerformCheckoutResponseDto:
      type: object
      properties:
        checkoutId:
          type: string
        kyc:
          $ref: '#/components/schemas/KycDto'
      required:
      - checkoutId
    PerformCheckoutRequestDto:
      type: object
      properties:
        checkoutId:
          type: string
        customParams:
          type: object
      required:
      - checkoutId
    ItemPriceRequestDto:
      type: object
      properties:
        itemId:
          type: string
        customParams:
          type: object
      required:
      - itemId
    CheckoutIntentResponseDto:
      type: object
      properties:
        checkoutId:
          type: string
        status:
          type: string
        clientSecret:
          type: string
        price:
          $ref: '#/components/schemas/ItemPriceResponseDto'
      required:
      - checkoutId
      - status
      - clientSecret
      - price
  securitySchemes:
    bearer:
      scheme: Bearer
      bearerFormat: Bearer
      description: 'Please enter token in following format: Bearer JWT'
      type: http
x-amazon-apigateway-gateway-responses:
  DEFAULT_4XX:
    statusCode: 403
    responseParameters:
      gatewayresponse.header.Access-Control-Allow-Origin: '''*'''
      gatewayresponse.header.Access-Control-Allow-Headers: '''Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token'''
      gatewayresponse.header.Access-Control-Allow-Methods: '''GET,OPTIONS,POST'''
    responseTemplates:
      application/json: '{"message":$context.error.messageString}'
  DEFAULT_5XX:
    statusCode: 500
    responseParameters:
      gatewayresponse.header.Access-Control-Allow-Origin: '''*'''
      gatewayresponse.header.Access-Control-Allow-Headers: '''Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token'''
      gatewayresponse.header.Access-Control-Allow-Methods: '''GET,OPTIONS,POST'''
    responseTemplates:
      application/json: '{"message":$context.error.messageString}'