---
title: "Create an onramp mobile session"
method: POST
path: "/v2/onramp/mobile/sessions"
tags: ["Onramp (App2App)"]
---

# Create an onramp mobile session

`POST /v2/onramp/mobile/sessions`

## Request

- Base URL: `https://api.cdp.coinbase.com/platform`
- URL: `https://api.cdp.coinbase.com/platform/v2/onramp/mobile/sessions`
- Auth: HTTP none

Verifies the platform attestation for a challenge issued by [Create Onramp Mobile Challenge](#operation/createOnrampMobileChallenge) 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).

## Request body

- union: Request body for creating an onramp mobile session.
  - object
    - `challenge` string, required: The challenge returned by the [Create Onramp Mobile Challenge](#operation/createOnrampMobileChallenge) endpoint. Must be passed back exactly as received — do not decode or modify.
    - `ios` IosAssertionPayload, required: iOS App Attest assertion payload for verifying a signed challenge.
      - `keyId` string, required: The key identifier of the iOS App Attest key previously registered via the attestation registration endpoint. This is the `keyId` returned by `DCAppAttestService.generateKey()`.
      - `assertion` string, required: Base64-encoded App Attest assertion generated by `DCAppAttestService.generateAssertion(keyId, clientDataHash: SHA256(challenge))`.
    - `android` AndroidIntegrityPayload: Android Play Integrity Standard API payload for verifying a signed challenge.
      - `integrityToken` string, required: Play Integrity token obtained from `StandardIntegrityManager.requestToken()`, proving this request originates from a genuine, unmodified installation of the partner app. Request the token with `requestHash` set to the challenge string returned by [Create Onramp Mobile Challenge](#operation/createOnrampMobileChallenge). Pass that string through unchanged. Do not hash it.
  - object
    - `challenge` string, required: The challenge returned by the [Create Onramp Mobile Challenge](#operation/createOnrampMobileChallenge) endpoint. Must be passed back exactly as received — do not decode or modify.
    - `ios` IosAssertionPayload: iOS App Attest assertion payload for verifying a signed challenge.
      - `keyId` string, required: The key identifier of the iOS App Attest key previously registered via the attestation registration endpoint. This is the `keyId` returned by `DCAppAttestService.generateKey()`.
      - `assertion` string, required: Base64-encoded App Attest assertion generated by `DCAppAttestService.generateAssertion(keyId, clientDataHash: SHA256(challenge))`.
    - `android` AndroidIntegrityPayload, required: Android Play Integrity Standard API payload for verifying a signed challenge.
      - `integrityToken` string, required: Play Integrity token obtained from `StandardIntegrityManager.requestToken()`, proving this request originates from a genuine, unmodified installation of the partner app. Request the token with `requestHash` set to the challenge string returned by [Create Onramp Mobile Challenge](#operation/createOnrampMobileChallenge). Pass that string through unchanged. Do not hash it.

## Response `201`

Onramp mobile session created successfully.

- object
  - `session` OnrampSession, required: An onramp session containing a ready-to-use onramp URL.
    - `onrampUrl` string, uri, required: Ready-to-use onramp URL.

## Other responses

- `400`: Invalid request.
- `403`: App not permitted to initiate a mobile handoff.
- `422`: Attestation is stale or too old.
- `429`: Rate limit exceeded.
- `500`: Internal server error.
- `503`: Service unavailable.

## Changes

- **2026-12-01** `06cb41a4fb57`: 6 warning
  - added the new `policy_not_applicable` enum value to the `errorType` response property for the response status `400`
  - added the new `policy_not_applicable` enum value to the `errorType` response property for the response status `403`
  - added the new `policy_not_applicable` enum value to the `errorType` response property for the response status `422`
  - added the new `policy_not_applicable` enum value to the `errorType` response property for the response status `429`
  - …2 more
- **2026-10-22** `fa99d7ef723f`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/coinbase/apis/coinbase-developer-platform-apis/changes/v2/onramp/mobile/sessions/post.md)

---

[API](https://skmtc.dev/coinbase/apis/coinbase-developer-platform-apis.md) - [All operations](https://skmtc.dev/coinbase/apis/coinbase-developer-platform-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/coinbase/apis/coinbase-developer-platform-apis/revisions/06cb41a4fb57?raw)
