Onramp (App2App)

Create an onramp mobile session

Changed on

Verifies the platform attestation for a challenge issued by Create Onramp Mobile Challenge and returns a ready-to-use onramp URL. The URL embeds the session token as a query parameter so the Coinbase app can populate the handoff screen immediately on launch.

This endpoint is idempotent on the challenge token: if the same challenge is submitted again (e.g. due to a lost response), the server returns the original session URL rather than an error.

Provide exactly one platform payload: ios (App Attest assertion) or android (Play Integrity token).

post/v2/onramp/mobile/sessions

Request

  • Base URL
    https://api.cdp.coinbase.com/platform
  • Auth
    HTTP none

Request body

union required

Request body for creating an onramp mobile session.

object required
OR
object required

Example request

{
  "challenge": "MWYwNWQwODktZTZlYy02OTdlLTgzZTYtMTI3NzcyOWJhNjM3",
  "ios": {
    "keyId": "abc123def456",
    "assertion": "eyJhbGci..."
  },
  "android": {
    "integrityToken": "eyJhbGci..."
  }
}

Response

Onramp mobile session created successfully.

object required
session, OnrampSession required

An onramp session containing a ready-to-use onramp URL.

Example response

{
  "session": {
    "onrampUrl": "https://pay.coinbase.com/buy?sessionToken=abc123F"
  }
}

Changes

    • warning

      added the new policy_not_applicable enum value to the errorType response property for the response status

    • warning

      added the new policy_not_applicable enum value to the errorType response property for the response status

    • warning

      added the new policy_not_applicable enum value to the errorType response property for the response status

    3 more changes in this revision