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

# Requesting payments

> Accept payments as a merchant or request money from a friend

The requestor flow is used when you want to receive a payment — as a merchant accepting a purchase or a person requesting money from a friend.

## Overview

1. Create a Payment Intent with your wallet as the `requestor`
2. Share the intent with the fulfiller via SonicPay audio, deep link, or QR code
3. The fulfiller reviews, signs, and submits the transaction
4. You receive a webhook or SSE event when the payment is confirmed

## Step 1: Create the intent

Create a Payment Intent server-side or client-side via the SDK:

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.crycketpay.com/v1/intents \
    -H "Authorization: Bearer pk_live_..." \
    -H "Content-Type: application/json" \
    -d '{
      "chain": "solana:5eykt4UsFv8P8NJdTREpY1vzqKq2Kvdp",
      "token": "USDC",
      "amount": "10.50",
      "requestor": "7xKXtg2...",
      "idempotencyKey": "order_982734",
      "metadata": { "orderId": "982734" }
    }'
  ```

  ```typescript SDK theme={null}
  const intent = await sdk.createIntent({
    chain: 'solana:5eykt4UsFv8P8NJdTREpY1vzqKq2Kvdp',
    token: 'USDC',
    amount: '10.50',
    requestor: wallet.address,
    idempotencyKey: 'order_982734',
    metadata: { orderId: '982734' },
  });
  ```
</CodeGroup>

## Step 2: Share with the fulfiller

There are three ways to share the intent:

### SonicPay audio broadcast

The SDK broadcasts the intent via near-ultrasonic audio. Any fulfiller within \~1–5m can decode it:

```typescript theme={null}
const broadcast = sdk.broadcast(intent);
// broadcast.stop() — call explicitly when done
```

The broadcast loops automatically until the fulfiller acknowledges receipt or the intent's TTL expires.

### Deep link

Generate a deep link for sharing via messaging, email, or other channels:

```typescript theme={null}
const link = sdk.getDeepLink(intent);
// "yourapp://pay?intent_id=pi_abc123"
```

### QR code

Generate a QR code payload for display on screen or print:

```typescript theme={null}
const qrPayload = sdk.getQRPayload(intent);
```

## Step 3: Watch for fulfillment

Track the payment status using the `onStatusChange` callback:

```typescript theme={null}
sdk.onStatusChange(intent, (status, context) => {
  // status: IntentState
  // context: { estimatedWaitSeconds, isDelayed, expiresAt, pendingAtExpiry }

  if (status === 'confirmed') {
    // Payment complete — update your UI
  }
});
```

Or listen via [webhooks](/guides/webhooks) for server-side handling.
