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

# Onramp with Cash App

> Create an onramp order that the buyer pays from Cash App

This guide covers how to create an onramp order that the buyer pays from Cash App. The order returns an invoice and a Cash App link. The buyer opens the link, or scans it as a QR code, and pays the invoice from Cash App. The order then completes, and the buyer's wallet receives USDC.

<Snippet file="enterprise-feature.mdx" />

## Prerequisites

* **API Key**: A server-side API key with the `orders.create` and `orders.read` scopes.
* **Verified buyer**: The buyer completes KYC before the order can take a Cash App payment. Crossmint links the KYC data to the order through `payment.receiptEmail`. See [User Onboarding](https://docs.crossmint.com/onramp/introduction/user-onboarding.md).
* **Recipient wallet**: The recipient is a wallet on Base or Solana.
* **Refund address (optional)**: Ask the buyer for a refund address in the `user@domain` format, and send it as `refundAddress`. Without a `refundAddress`, a refund needs Crossmint support.
* **Buyer location**: Cash App payments are not available to residents of New York State. Crossmint refuses the order with a 403 error.

A Cash App order has one line item, delivers only USDC, and delivers at least 1 USDC. Cash App limits these payments to up to \$999 in bitcoin every 7 days. Cash App refuses a payment above the limit, and the invoice expires.

## Create a Cash App Order

**1. Create the order**

Call [Create Order](https://docs.crossmint.com/onramp/api-reference/create-order.md) with these `payment` fields:

| Field | Value |
| - | - |
| `method` | `cashapp` |
| `currency` | `usd` |
| `refundAddress` | Optional. The buyer's address that receives a refund. |

A Cash App order delivers USDC on Base or Solana. Set `lineItems[].tokenLocator` to the USDC locator of the chain, and set `recipient.walletAddress` to a wallet on the same chain.

> [tab] Base
>
> ```bash cURL theme={null}
> curl -X POST 'https://www.crossmint.com/api/2022-06-09/orders' \
>   -H 'X-API-KEY: YOUR_SERVER_API_KEY' \
>   -H 'Content-Type: application/json' \
>   -d '{
>     "recipient": {
>       "walletAddress": "USER_EVM_WALLET_ADDRESS"
>     },
>     "lineItems": [
>       {
>         "tokenLocator": "base:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
>         "executionParameters": {
>           "mode": "exact-in",
>           "amount": "10"
>         }
>       }
>     ],
>     "payment": {
>       "method": "cashapp",
>       "currency": "usd",
>       "refundAddress": "BUYER_REFUND_ADDRESS",
>       "receiptEmail": "user@example.com"
>     }
>   }'
> ```
>
> ```js Node.js theme={null}
> const response = await fetch("https://www.crossmint.com/api/2022-06-09/orders", {
>     method: "POST",
>     headers: {
>         "X-API-KEY": "YOUR_SERVER_API_KEY",
>         "Content-Type": "application/json",
>     },
>     body: JSON.stringify({
>         recipient: { walletAddress: "USER_EVM_WALLET_ADDRESS" },
>         lineItems: [
>             {
>                 tokenLocator: "base:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
>                 executionParameters: { mode: "exact-in", amount: "10" },
>             },
>         ],
>         payment: {
>             method: "cashapp",
>             currency: "usd",
>             refundAddress: "BUYER_REFUND_ADDRESS",
>             receiptEmail: "user@example.com",
>         },
>     }),
> });
> const { order } = await response.json();
> ```
>
> ```python Python theme={null}
> import requests
>
> response = requests.post(
>     "https://www.crossmint.com/api/2022-06-09/orders",
>     headers={"X-API-KEY": "YOUR_SERVER_API_KEY", "Content-Type": "application/json"},
>     json={
>         "recipient": {"walletAddress": "USER_EVM_WALLET_ADDRESS"},
>         "lineItems": [
>             {
>                 "tokenLocator": "base:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
>                 "executionParameters": {"mode": "exact-in", "amount": "10"},
>             }
>         ],
>         "payment": {
>             "method": "cashapp",
>             "currency": "usd",
>             "refundAddress": "BUYER_REFUND_ADDRESS",
>             "receiptEmail": "user@example.com",
>         },
>     },
> )
> print(response.json())
> ```

> [tab] Solana
>
> ```bash cURL theme={null}
> curl -X POST 'https://www.crossmint.com/api/2022-06-09/orders' \
>   -H 'X-API-KEY: YOUR_SERVER_API_KEY' \
>   -H 'Content-Type: application/json' \
>   -d '{
>     "recipient": {
>       "walletAddress": "USER_SOLANA_WALLET_ADDRESS"
>     },
>     "lineItems": [
>       {
>         "tokenLocator": "solana:EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
>         "executionParameters": {
>           "mode": "exact-in",
>           "amount": "10"
>         }
>       }
>     ],
>     "payment": {
>       "method": "cashapp",
>       "currency": "usd",
>       "refundAddress": "BUYER_REFUND_ADDRESS",
>       "receiptEmail": "user@example.com"
>     }
>   }'
> ```
>
> ```js Node.js theme={null}
> const response = await fetch("https://www.crossmint.com/api/2022-06-09/orders", {
>     method: "POST",
>     headers: {
>         "X-API-KEY": "YOUR_SERVER_API_KEY",
>         "Content-Type": "application/json",
>     },
>     body: JSON.stringify({
>         recipient: { walletAddress: "USER_SOLANA_WALLET_ADDRESS" },
>         lineItems: [
>             {
>                 tokenLocator: "solana:EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
>                 executionParameters: { mode: "exact-in", amount: "10" },
>             },
>         ],
>         payment: {
>             method: "cashapp",
>             currency: "usd",
>             refundAddress: "BUYER_REFUND_ADDRESS",
>             receiptEmail: "user@example.com",
>         },
>     }),
> });
> const { order } = await response.json();
> ```
>
> ```python Python theme={null}
> import requests
>
> response = requests.post(
>     "https://www.crossmint.com/api/2022-06-09/orders",
>     headers={"X-API-KEY": "YOUR_SERVER_API_KEY", "Content-Type": "application/json"},
>     json={
>         "recipient": {"walletAddress": "USER_SOLANA_WALLET_ADDRESS"},
>         "lineItems": [
>             {
>                 "tokenLocator": "solana:EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
>                 "executionParameters": {"mode": "exact-in", "amount": "10"},
>             }
>         ],
>         "payment": {
>             "method": "cashapp",
>             "currency": "usd",
>             "refundAddress": "BUYER_REFUND_ADDRESS",
>             "receiptEmail": "user@example.com",
>         },
>     },
> )
> print(response.json())
> ```

This exact-in order sets the most that the buyer pays, and the invoice can be lower than that amount. When the payment link appears, `lineItems[].quote.quantityRange` shows the quantity that the order delivers.

> [!WARNING]
>
> A refund goes to `refundAddress`, not to the buyer's Cash App account. Crossmint cannot change it after the order is created, so confirm the address with the buyer before you create the order.

**2. Open Cash App**

The response holds the payment details in `order.payment.preparation`:

```json Response (excerpt) theme={null}
{
  "order": {
    "orderId": "ORDER_ID",
    "phase": "payment",
    "quote": {
      "status": "valid"
    },
    "payment": {
      "status": "awaiting-payment",
      "method": "cashapp",
      "preparation": {
        "depositAddress": "PAYMENT_INVOICE",
        "paymentLink": "CASH_APP_PAYMENT_LINK"
      }
    }
  }
}
```

* `depositAddress`: the invoice that the buyer pays. The invoice fixes the amount, so the response has no `transactionParameters`.
* `paymentLink`: a Cash App link that opens the invoice in Cash App.

Send the buyer to `paymentLink`, or show it as a QR code. The two fields are present only while `payment.status` is `awaiting-payment` and `quote.status` is `valid`, so stop showing the link when `quote.status` is `expired`.

An invoice takes one payment and expires after about 5 minutes, for exact-in and exact-out orders.

**3. Track the order**

Subscribe to the `orders.delivery.completed` and `orders.delivery.failed` [webhooks](https://docs.crossmint.com/payments/advanced/webhooks.md). Crossmint sends the first when the order completes, and the second when the payment is refunded. If you cannot receive webhooks, poll [Get Order](https://docs.crossmint.com/onramp/api-reference/get-order.md) until `phase` is `completed`.

* Read the delivered quantity from `lineItems[].delivery.tokens[].quantity`. It can differ from the requested amount because of fees.
* The buyer cannot pay an invoice after it expires. A payment sent before the expiry can settle later, and the order still completes, even when `quote.status` is `expired`.

## Next Steps

> [card] [Onramp to Non-Crossmint Wallets](https://docs.crossmint.com/onramp/guides/onramp-to-external-wallets.md)
>
> Verify ownership of the recipient wallet

> [card] [Create Order](https://docs.crossmint.com/onramp/api-reference/create-order.md)
>
> Full reference for the onramp order payload
