Skip to main content
POST
/
sdk
/
{environmentId}
/
onramps
/
coinbase
/
orders
Create a Coinbase onramp order
curl --request POST \
  --url https://app.dynamicauth.com/api/v0/sdk/{environmentId}/onramps/coinbase/orders \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "agreementAcceptedAt": "2025-04-24T00:00:00.000Z",
  "destinationAddress": "0xbF394748301603f18d953C90F0b087CBEC0E1834",
  "destinationNetwork": "An example name",
  "partnerUserRef": "An example name",
  "paymentCurrency": "An example name",
  "paymentMethod": "GUEST_CHECKOUT_APPLE_PAY",
  "purchaseCurrency": "An example name",
  "domain": "http://*.example.com",
  "isQuote": false,
  "paymentAmount": "100.00",
  "purchaseAmount": "100.00"
}
'
{
  "order": {
    "orderId": "95b11417-f18f-457f-8804-68e361f9164f",
    "paymentTotal": "100.00",
    "paymentSubtotal": "100.00",
    "paymentCurrency": "An example name",
    "paymentMethod": "GUEST_CHECKOUT_APPLE_PAY",
    "purchaseAmount": "100.00",
    "purchaseCurrency": "An example name",
    "fees": [
      {
        "type": "FEE_TYPE_NETWORK",
        "amount": "100.00",
        "currency": "An example name"
      }
    ],
    "exchangeRate": "100.00",
    "destinationAddress": "0xbF394748301603f18d953C90F0b087CBEC0E1834",
    "destinationNetwork": "An example name",
    "status": "ONRAMP_ORDER_STATUS_PENDING_AUTH",
    "createdAt": "2025-04-24T00:00:00.000Z",
    "updatedAt": "2025-04-24T00:00:00.000Z",
    "txHash": "<string>",
    "partnerUserRef": "An example name"
  },
  "paymentLink": {
    "url": "https://pay.coinbase.com/v2/api-onramp/apple-pay?sessionToken=MWYwNWQwODktZTZlYy02OTdlLTgzZTYtMTI3NzcyOWJhNjM3",
    "paymentLinkType": "PAYMENT_LINK_TYPE_APPLE_PAY_BUTTON"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

environmentId
string
required

ID of the environment

Required string length: 36
Example:

"95b11417-f18f-457f-8804-68e361f9164f"

Body

application/json

Coinbase onramp order data

agreementAcceptedAt
string<date-time>
required

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
string
required

Valid blockchain wallet address, must be an alphanumeric string without any special characters

Maximum string length: 255
Example:

"0xbF394748301603f18d953C90F0b087CBEC0E1834"

destinationNetwork
string
required
Maximum string length: 50
Example:

"An example name"

partnerUserRef
string
required
Maximum string length: 255
Example:

"An example name"

paymentCurrency
string
required
Maximum string length: 50
Example:

"An example name"

paymentMethod
enum<string>
required

The type of payment method to be used to complete an onramp order.

Available options:
GUEST_CHECKOUT_APPLE_PAY
purchaseCurrency
string
required
Maximum string length: 50
Example:

"An example name"

domain
string

An RFC 6454 valid url. Must not include any paths. A single wildcard (*) can be used as the first subdomain.

Example:

"http://*.example.com"

isQuote
boolean
default:false

If true, this API will return a quote without creating any transaction.

paymentAmount
string

Digits with optional decimal part

Example:

"100.00"

purchaseAmount
string

Digits with optional decimal part

Example:

"100.00"

Response

Successfully created a Coinbase onramp order

order
object
required