> ## Documentation Index
> Fetch the complete documentation index at: https://developer.uphold.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction to Buy and Sell

> Let users buy crypto with a card or an APM, and sell crypto to a card, a bank account or an APM, in a single transaction.

**Buy** moves fiat into crypto in the user's Uphold account, paid with a card or an alternative payment method (APM). In one transaction Uphold both takes the deposit and converts it to crypto — no need to run a separate deposit and trade, each with its own quote and commit. Bank transfers are push deposits instead: the user sends the funds to deposit details (see the table below).

**Sell** moves value out of the user's Uphold crypto account to a linked fiat external account — a card (via OCT) or a bank account — converting crypto to fiat and paying out.

## Key concepts

* **`cards` capability** — buying with a card deposit requires the user to have the `cards` capability enabled.
* **`trades` capability** — any buy or sell that involves converting one asset to another requires the `trades` capability. UK retail users face a 24-hour post-onboarding cooldown before trading is available.
* **`card-withdrawals` capability** — selling to a card via OCT requires the `card-withdrawals` capability.
* **3DS authorization** — card deposits may require user authorization via a 3DS challenge. When they do, the transaction response includes a `confirmationUrl` — redirect the user there to complete it.
* **`octSupport`** — selling to a card requires the destination external account to have `octSupport: "supported"`. Verify this when linking the payout card.

## Supported methods

| Direction | Source / destination | Notes |
| - | - | - |
| Buy | Card | May require 3DS authorization |
| Buy | Bank account | Push deposit to deposit details, not a quote. SEPA / FPS deposit details can target the crypto account directly; ACH / FedNow / wire deposits land in the default USD account and are then traded. See the [bank-transfer deposit guides](https://developer.uphold.com/developer-guides/bank-transfers/deposit/via-rest-api) |
| Buy | APMs | Such as PayPal — see [apm-transfer deposit guides](https://developer.uphold.com/developer-guides/apm-transfers/deposit/via-rest-api) for method-specific setup |
| Sell | Card (OCT) | Requires `octSupport: "supported"` on the external account |
| Sell | Bank account | SEPA / FPS / ACH / FedNow — see [bank-transfer withdrawal guides](https://developer.uphold.com/developer-guides/bank-transfers/withdrawal/via-rest-api) for rail-specific setup |
| Sell | APMs | Such as PayPal — see [apm-transfer withdrawal guides](https://developer.uphold.com/developer-guides/apm-transfers/withdrawal/via-rest-api) for method-specific setup |

The methods available depend on your organization and the user. Call [List rails](https://developer.uphold.com/rest-apis/core-api/assets/list-rails.md) to find which ones you can offer.

## Testing in sandbox

Use [test card numbers](https://developer.uphold.com/rest-apis/test-helpers.md) to simulate card deposits and payouts in the sandbox. Crypto deposits can be triggered via the [simulate crypto deposit](https://developer.uphold.com/rest-apis/core-api/accounts/test-helpers/simulate-crypto-deposit.md) endpoint.

## Start building

> [card] [Buy via API](https://developer.uphold.com/developer-guides/buy-and-sell/buy/via-rest-api.md)
>
> Buy crypto for users with a card or an APM, in a single transaction.

> [card] [Sell via API](https://developer.uphold.com/developer-guides/buy-and-sell/sell/via-rest-api.md)
>
> Sell crypto and pay out to a card, a bank account or an APM, in a single transaction.
