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

# Create a Coinbase onramp order

> Creates a new Coinbase onramp order for the authenticated user.



## OpenAPI

````yaml post /sdk/{environmentId}/onramps/coinbase/orders
openapi: 3.0.1
info:
  title: Dashboard API
  description: Dashboard API documentation
  version: 1.0.0
servers:
  - url: https://app.dynamicauth.com/api/v0
  - url: https://app.dynamic.xyz/api/v0
  - url: http://localhost:3333/api/v0
security: []
tags:
  - name: Analytics
  - name: SDK
  - name: Organizations
  - name: Projects
  - name: Environments
  - name: Users
  - name: Invites
  - name: Tokens
  - name: Origins
  - name: Allowlists
  - name: Wallets
  - name: Members
  - name: Sessions
  - name: Settings
  - name: Gates
  - name: Chains
  - name: Exports
  - name: Events
  - name: Webhooks
  - name: Custom Fields
  - name: OrganizationMfaSettings
  - name: CustomHostnames
  - name: TestAccount
  - name: NameServices
  - name: GlobalWallets
  - name: GlobalWalletConnections
  - name: UserApiTokens
  - name: Waas
  - name: WalletConnect
paths:
  /sdk/{environmentId}/onramps/coinbase/orders:
    post:
      tags:
        - SDK
      summary: Create a Coinbase onramp order
      operationId: createCoinbaseOnrampOrder
      parameters:
        - $ref: '#/components/parameters/environmentId'
      requestBody:
        description: Coinbase onramp order data
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CoinbaseOnrampOrderCreateRequest'
        required: true
      responses:
        '200':
          description: Successfully created a Coinbase onramp order
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CoinbaseOnrampOrderResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - bearerAuth: []
components:
  parameters:
    environmentId:
      in: path
      name: environmentId
      required: true
      description: ID of the environment
      schema:
        $ref: '#/components/schemas/uuid'
  schemas:
    CoinbaseOnrampOrderCreateRequest:
      type: object
      required:
        - agreementAcceptedAt
        - destinationAddress
        - destinationNetwork
        - partnerUserRef
        - paymentCurrency
        - paymentMethod
        - purchaseCurrency
      properties:
        agreementAcceptedAt:
          type: string
          format: date-time
          description: >-
            The timestamp of when the user acknowledged that by using Coinbase
            Onramp they are accepting the Coinbase Terms
            (https://www.coinbase.com/legal/guest-checkout/us), User Agreement
            (https://www.coinbase.com/legal/user_agreement),and Privacy Policy
            (https://www.coinbase.com/legal/privacy).
          example: '2025-04-24T00:00:00.000Z'
        destinationAddress:
          $ref: '#/components/schemas/WalletPublicKey'
        destinationNetwork:
          $ref: '#/components/schemas/NonEmptyStringWith50MaxLength'
        domain:
          $ref: '#/components/schemas/origin'
        isQuote:
          type: boolean
          description: >-
            If true, this API will return a quote without creating any
            transaction.
          default: false
        partnerUserRef:
          $ref: '#/components/schemas/NonEmptyStringWith255MaxLength'
        paymentAmount:
          $ref: '#/components/schemas/NonEmptyAmountString'
        paymentCurrency:
          $ref: '#/components/schemas/NonEmptyStringWith50MaxLength'
        paymentMethod:
          $ref: '#/components/schemas/CoinbaseOnrampOrderPaymentMethod'
        purchaseAmount:
          $ref: '#/components/schemas/NonEmptyAmountString'
        purchaseCurrency:
          $ref: '#/components/schemas/NonEmptyStringWith50MaxLength'
    CoinbaseOnrampOrderResponse:
      type: object
      required:
        - order
      properties:
        order:
          $ref: '#/components/schemas/CoinbaseOnrampOrder'
        paymentLink:
          type: object
          required:
            - url
            - paymentLinkType
          properties:
            url:
              type: string
              description: >-
                The URL to the hosted widget the user should be redirected to.
                For certain payment link types you can append your own
                redirect_url query parameter to this URL to ensure the user is
                redirected back to your app after the widget completes.
              example: >-
                https://pay.coinbase.com/v2/api-onramp/apple-pay?sessionToken=MWYwNWQwODktZTZlYy02OTdlLTgzZTYtMTI3NzcyOWJhNjM3
            paymentLinkType:
              $ref: '#/components/schemas/CoinbaseOnrampOrderPaymentLinkType'
    uuid:
      type: string
      pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
      minLength: 36
      maxLength: 36
      example: 95b11417-f18f-457f-8804-68e361f9164f
    WalletPublicKey:
      type: string
      pattern: ^[A-Za-z0-9]{18,100}$
      description: >-
        Valid blockchain wallet address, must be an alphanumeric string without
        any special characters
      example: '0xbF394748301603f18d953C90F0b087CBEC0E1834'
      maxLength: 255
    NonEmptyStringWith50MaxLength:
      type: string
      pattern: ^(?=\S)[\p{L}\p{N}a-zA-Z _.,:!?&%@\/+\-'|]+(?<=\S)$
      example: An example name
      maxLength: 50
    origin:
      type: string
      pattern: >-
        ^(https?|chrome-extension|moz-extension):\/\/(?!.*(\*).*(\*).*)[*a-zA-Z0-9._-]{1,256}(:[*0-9]{1,5})?$
      description: >-
        An [RFC 6454](https://www.rfc-editor.org/rfc/rfc6454) valid url. Must
        not include any paths. A single wildcard (*) can be used as the first
        subdomain.
      example: http://*.example.com
    NonEmptyStringWith255MaxLength:
      type: string
      pattern: ^(?=\S)[\p{L}\p{N}a-zA-Z _.,:!?&%@\/+\-'|]+(?<=\S)$
      maxLength: 255
      example: An example name
    NonEmptyAmountString:
      type: string
      pattern: ^(\d+(\.\d+)?|\.\d+)$
      description: Digits with optional decimal part
      example: '100.00'
    CoinbaseOnrampOrderPaymentMethod:
      type: string
      description: The type of payment method to be used to complete an onramp order.
      enum:
        - GUEST_CHECKOUT_APPLE_PAY
    CoinbaseOnrampOrder:
      type: object
      required:
        - orderId
        - paymentTotal
        - paymentSubtotal
        - paymentCurrency
        - paymentMethod
        - purchaseAmount
        - purchaseCurrency
        - fees
        - exchangeRate
        - destinationAddress
        - destinationNetwork
        - status
        - createdAt
        - updatedAt
      properties:
        orderId:
          $ref: '#/components/schemas/uuid'
        paymentTotal:
          $ref: '#/components/schemas/NonEmptyAmountString'
        paymentSubtotal:
          $ref: '#/components/schemas/NonEmptyAmountString'
        paymentCurrency:
          $ref: '#/components/schemas/NonEmptyStringWith50MaxLength'
        paymentMethod:
          $ref: '#/components/schemas/CoinbaseOnrampOrderPaymentMethod'
        purchaseAmount:
          $ref: '#/components/schemas/NonEmptyAmountString'
        purchaseCurrency:
          $ref: '#/components/schemas/NonEmptyStringWith50MaxLength'
        fees:
          type: array
          description: The fees associated with the order.
          items:
            $ref: '#/components/schemas/CoinbaseOnrampFee'
        exchangeRate:
          $ref: '#/components/schemas/NonEmptyAmountString'
        destinationAddress:
          $ref: '#/components/schemas/WalletPublicKey'
        destinationNetwork:
          $ref: '#/components/schemas/NonEmptyStringWith50MaxLength'
        status:
          $ref: '#/components/schemas/CoinbaseOnrampOrderStatus'
        createdAt:
          type: string
          format: date-time
          description: The date and time the order was created.
          example: '2025-04-24T00:00:00.000Z'
        updatedAt:
          type: string
          format: date-time
          description: The date and time the order was last updated.
          example: '2025-04-24T00:00:00.000Z'
        txHash:
          $ref: '#/components/schemas/NonEmptyStringWith4096MaxLength'
        partnerUserRef:
          $ref: '#/components/schemas/NonEmptyStringWith255MaxLength'
    CoinbaseOnrampOrderPaymentLinkType:
      type: string
      description: The type of payment link.
      enum:
        - PAYMENT_LINK_TYPE_APPLE_PAY_BUTTON
    BadRequest:
      type: object
      properties:
        error:
          type: string
    Unauthorized:
      type: object
      properties:
        error:
          type: string
          example: No jwt provided!
    InternalServerError:
      type: object
      properties:
        error:
          type: string
          example: Internal Server Error
    CoinbaseOnrampFee:
      type: object
      required:
        - type
        - amount
        - currency
      properties:
        type:
          $ref: '#/components/schemas/CoinbaseOnrampFeeType'
        amount:
          $ref: '#/components/schemas/NonEmptyAmountString'
        currency:
          $ref: '#/components/schemas/NonEmptyStringWith50MaxLength'
    CoinbaseOnrampOrderStatus:
      type: string
      description: The status of an onramp order.
      enum:
        - ONRAMP_ORDER_STATUS_PENDING_AUTH
        - ONRAMP_ORDER_STATUS_PENDING_PAYMENT
        - ONRAMP_ORDER_STATUS_PROCESSING
        - ONRAMP_ORDER_STATUS_COMPLETED
        - ONRAMP_ORDER_STATUS_FAILED
    NonEmptyStringWith4096MaxLength:
      type: string
      maxLength: 4096
      description: A string with a max length of 4096 characters
    CoinbaseOnrampFeeType:
      type: string
      description: The type of fee.
      enum:
        - FEE_TYPE_NETWORK
        - FEE_TYPE_EXCHANGE
  responses:
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/BadRequest'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Unauthorized'
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/InternalServerError'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````