---
title: "Create a Top-Up Link"
method: POST
path: "/v2/acceptance/top-up-links"
tags: ["Top-Up Links"]
---

# Create a Top-Up Link

`POST /v2/acceptance/top-up-links`

## Request

- Base URL: `https://api.cdp.coinbase.com/platform`
- URL: `https://api.cdp.coinbase.com/platform/v2/acceptance/top-up-links`
- Auth: HTTP bearer

Creates a Top-Up Link: a shareable hosted URL that lets a payer add funds to their balance. The resource is immutable once created. The link expires 24 hours after creation and funds a single purchase: once a purchase succeeds, the link is spent and cannot be used again. A purchase that fails does not consume the link, so the payer can retry until it expires. A link is not bound to a specific payer.

Provide `topUpAmount` and `asset`; `orderTotalAmount`, `redirectUrl`, and `customerDisplay` are optional. When `redirectUrl` is supplied, its origin must exactly match one of the entity's configured allowed origins, and the URL must not contain a percent-decoded query key exactly equal to `toppedUpAmount`. The response includes the hosted `topUpUrl` to share with the payer. Creating a link is signaled to webhook subscribers by the `acceptance.top_up_link.created` event, and the purchase that spends the link emits an `acceptance.top_up_link.funds_added` event.

Supply `customerDisplay.merchantName` to override the merchant name on this link's hosted page. The supplied value must not exceed 128 Unicode code points, including surrounding whitespace. Surrounding whitespace is removed before storage. An omitted or empty name after trimming uses the entity's profile name. The create response and creation webhook always return the resolved name stored on the link.

## Headers

- `X-Idempotency-Key` string

## Request body

- CreateTopUpLinkRequest: A request to create a Top-Up Link. The entity is inferred from the API key. `topUpAmount` and `asset` are required; `orderTotalAmount`, `redirectUrl`, and `customerDisplay` are optional. Unrecognized top-level fields are allowed and ignored.
  - `topUpAmount` TopUpLinkAmount, required: The merchant-provided initial suggested net amount to add, denominated in `asset`. The suggestion remains fixed on the created link and is not recomputed from `orderTotalAmount` or the payer's current available balance. The payer can adjust the amount they add in the hosted flow. Fiat fees are outside this value. Positive and nonzero, with at most two fractional digits.
    - [`PositiveDecimal`](https://skmtc.dev/coinbase/apis/coinbase-developer-platform-apis/revisions/06cb41a4fb57/schema?at=%2Fcomponents%2Fschemas%2FPositiveDecimal)
    - string
  - `orderTotalAmount` TopUpLinkAmount: The total balance, denominated in `asset`, that the merchant expects the payer to need to complete the order. When supplied, the hosted Top-Up page shows the order total and the payer's current available balance, and computes the remaining shortfall from those values. This live shortfall is presentation context: it is separate from `topUpAmount` and does not replace, change, or limit that fixed suggestion.
    - [`PositiveDecimal`](https://skmtc.dev/coinbase/apis/coinbase-developer-platform-apis/revisions/06cb41a4fb57/schema?at=%2Fcomponents%2Fschemas%2FPositiveDecimal)
    - string
  - `asset` TopUpLinkAsset, required: The asset credited by the Top-Up Link. Currently, only `usdc` is supported.
    - [`Asset`](https://skmtc.dev/coinbase/apis/coinbase-developer-platform-apis/revisions/06cb41a4fb57/schema?at=%2Fcomponents%2Fschemas%2FAsset)
    - 'usdc'
  - `redirectUrl` string, uri: Optional absolute HTTPS URL to which the payer is redirected after the top-up completes. The URL's origin must exactly match one of the entity's configured allowed origins: the HTTPS scheme, hostname (case-insensitive), and effective port (with the default HTTPS port normalized to `443`) are compared, while the path, query, and fragment are ignored. Wildcard or suffix/subdomain matching is not supported. Existing query parameters and the fragment are preserved. The URL must not contain a percent-decoded query key exactly equal to `toppedUpAmount`; every occurrence is rejected, including duplicates, while other casing is allowed. This value can contain sensitive merchant parameters; treat it as secret and do not log it.
  - `customerDisplay` TopUpCustomerDisplayInput: Display details supplied for the hosted Top-Up page. Only the merchant name is supported. Unrecognized fields are allowed and ignored.
    - `merchantName` string: The merchant name to display on the hosted Top-Up page. The limit counts Unicode code points in the supplied value, including surrounding whitespace. Surrounding whitespace is removed before storage. When omitted or empty after trimming, the entity's profile name is used.

## Response `201`

Successfully created Top-Up Link.

- TopUpLink: A shareable link that lets a payer add funds to their balance through a hosted Top-Up flow. The resource is immutable once created. The link expires 24 hours after creation and funds a single purchase: once a purchase succeeds, the link is spent and cannot be used again. A purchase that fails does not consume the link, so the payer can retry until it expires. A link is not bound to a specific payer. `orderTotalAmount` and `redirectUrl` are omitted from the response when they were not supplied at creation; they are never returned as null. `customerDisplay` contains the resolved merchant name stored at creation, including the entity's profile name when no nonempty override was supplied. The response and creation webhook always include `customerDisplay` and its `merchantName`.
  - `topUpLinkId` string, required: The ID of the Top-Up Link, a UUID prefixed by `topUpLink_`.
  - `topUpAmount` TopUpLinkAmount, required: The merchant-provided initial suggested net amount to add for the link's single purchase, denominated in `asset`. The suggestion remains fixed on the link and is not recomputed from `orderTotalAmount` or the payer's current available balance. The payer can adjust the amount they add in the hosted flow. Fiat fees are outside this value.
    - [`PositiveDecimal`](https://skmtc.dev/coinbase/apis/coinbase-developer-platform-apis/revisions/06cb41a4fb57/schema?at=%2Fcomponents%2Fschemas%2FPositiveDecimal)
    - string
  - `asset` TopUpLinkAsset, required: The asset credited by the Top-Up Link. Currently, only `usdc` is supported.
    - [`Asset`](https://skmtc.dev/coinbase/apis/coinbase-developer-platform-apis/revisions/06cb41a4fb57/schema?at=%2Fcomponents%2Fschemas%2FAsset)
    - 'usdc'
  - `orderTotalAmount` TopUpLinkAmount: The total balance, denominated in `asset`, that the merchant expects the payer to need to complete the order, as supplied at creation. When present, the hosted Top-Up page shows the order total and the payer's current available balance, and computes the remaining shortfall from those values. This live shortfall is separate from `topUpAmount` and does not replace or change that fixed suggestion. It does not limit the amount the payer can add. Omitted when not supplied at creation.
    - [`PositiveDecimal`](https://skmtc.dev/coinbase/apis/coinbase-developer-platform-apis/revisions/06cb41a4fb57/schema?at=%2Fcomponents%2Fschemas%2FPositiveDecimal)
    - string
  - `redirectUrl` string, uri: The absolute HTTPS URL to which the payer is redirected after the top-up completes, as supplied at creation. Omitted when not supplied at creation. This value can contain sensitive merchant parameters; treat it as secret and do not log it.
  - `customerDisplay` TopUpCustomerDisplay, required: Display details resolved at creation and stored on the immutable Top-Up Link. These details are returned in the create response and creation webhook.
    - `merchantName` string, required: The stored merchant name displayed on the hosted Top-Up page. This is the supplied name with surrounding whitespace removed, or the entity's profile name when no nonempty override was supplied. The stored name does not change when the entity's profile changes. The supplied-name length limit does not constrain the profile-name fallback.
  - `topUpUrl` string, uri, required: The hosted Top-Up page URL. Share this URL only with the intended payer. The URL identifies the Top-Up Link but does not authorize a purchase; the payer must authenticate and approve the purchase.
  - `expiresAt` string, date-time, required: The UTC ISO 8601 timestamp after which the link can no longer be used, 24 hours after creation. A link that has already funded a purchase is spent before this time.
  - `createdAt` string, date-time, required: The UTC ISO 8601 timestamp at which the Top-Up Link was created.

## Other responses

- `400`: Invalid request.
- `401`: Unauthorized.
- `403`: Forbidden, or the entity is not configured for Top-Up.
- `409`: The resource already exists.
- `422`: Idempotency key conflict.
- `429`: Rate limit exceeded.
- `500`: Internal server error.
- `503`: The endpoint cannot serve the request right now, either because the API is in an unintended outage (`service_unavailable` — dependency failure, deploy issue) or because an operator has intentionally disabled this specific endpoint via a kill switch (`endpoint_unavailable`). Clients should dispatch on `errorType`: `service_unavailable` is typically transient and safe to retry, while `endpoint_unavailable` may persist until an operator re-enables the endpoint.

## Changes

- **2026-12-01** `06cb41a4fb57`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/coinbase/apis/coinbase-developer-platform-apis/changes/v2/acceptance/top-up-links/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)
