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

# Initiate buy (step 1/2)

> Start a crypto buy; confirm with confirmationToken. Scope: `crypto:write`. Requires `Idempotency-Key`.

> [!NOTE]
>
> This product may be disabled on your deployment. Contact [support@sendpadi.com](mailto:support@sendpadi.com) if calls return unavailable.

> [!NOTE]
>
> Live API key required for this endpoint.


## OpenAPI

````yaml POST /api/v1/merchant/crypto/buy
openapi: 3.1.0
info:
  title: SendPadi Merchant API
  version: 1.0.0
  description: >-
    Merchant REST API. Authenticate with HMAC headers (`X-Api-Key`,
    `X-Timestamp`, `X-Signature`). Generate playground headers with [Sign
    requests (playground)](/guides/sign-requests).
servers:
  - url: https://api.sendpadi.com
    description: Production (test + live keys)
security: []
paths:
  /api/v1/merchant/crypto/buy:
    post:
      tags:
        - crypto
      summary: Initiate buy (step 1/2)
      description: >-
        Start a crypto buy; confirm with confirmationToken. **Scope:**
        `crypto:write`. Requires `Idempotency-Key` on this write.
      operationId: api-reference_crypto_buy
      parameters:
        - name: X-Timestamp
          in: header
          required: true
          description: Unix time in seconds
          schema:
            type: string
        - name: X-Signature
          in: header
          required: true
          description: HMAC-SHA256 signature
          schema:
            type: string
        - name: Idempotency-Key
          in: header
          required: true
          description: UUID. Required on money-moving writes.
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                amount:
                  type: number
                paymentCurrency:
                  type: string
                paymentAmount:
                  type: integer
              required:
                - amount
                - paymentCurrency
                - paymentAmount
            example:
              amount: 0.001
              paymentCurrency: NGN
              paymentAmount: 95000
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
              example:
                success: true
                message: OK
                data:
                  intentId: intent_abc
                  operation: buy
                  confirmationToken: tok_secret_xyz
                  status: pending_confirmation
              examples:
                success:
                  summary: Success
                  value:
                    success: true
                    message: OK
                    data:
                      intentId: intent_abc
                      operation: buy
                      confirmationToken: tok_secret_xyz
                      status: pending_confirmation
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key
      description: API key id (sp_test_… / sp_live_…)

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.