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

# Create Buy Transaction (v1)

> Create Buy Transaction

---

**Field notes (recovered from legacy docs)**

**Create External Buy**

**Price lock (`quote_id`)**

Pass `quote_id` to create this transaction against a price-locked quote previously issued by the External Buy Quote endpoint (`POST /api/v2/wallet/w/quote`). When `quote_id` is supplied, the locked currency pair, payment method, amounts, network, and fees are resolved from the stored quote; the matching request fields become optional and any values sent for them are ignored. `crypto_wallet_address` is always required. When `quote_id` is absent the endpoint behaves as before and the original fields remain required.

```json
{
  "quote_id": "421b9fb7-6800-4d9d-ba17-083ad662733b",
  "crypto_wallet_address": "0xf82010290b2c3169ffaB5354d7Bbd09Eb2822724",
  "source_id": "94b00193-301d-4750-b310-207393d987c9",
  "bank_transaction_id": "501610337776"
}
```

**Response field values**

| Field | Possible Values |
| --- | --- |
| `status` | Typically `PROCESSING` immediately after creation |
| `failure_code`, `failure_desc` | Empty string until the transaction fails |

If `crypto_wallet_address` is `POOL_TRANSFER`, the handler may also surface broker or deposit-address service errors directly with their underlying code and message.



## OpenAPI

````yaml /openapi-v1.json post /api/v2/wallet/transaction/crypto/buy
openapi: 3.1.0
info:
  title: Saber Money API (v1)
  version: v1
  description: >-
    ## Authentication


    There is no standalone API-key auth — every request must be **signed**. An
    API key by itself authenticates nothing. Each call requires four headers
    together: `X-Api-Key` (your key), `X-Signature` (HMAC-SHA256 of `apiKey +
    timestamp` — or `apiKey + timestamp + userId` when `X-User-Id` is required —
    keyed with your API secret), `X-Timestamp` (unix seconds), and
    `X-Request-Id` (any unique string per request). The signature must be
    computed by a client script; there is no way to derive it by hand. Use the
    HMAC Generator flow to compute valid values for manual testing.


    ## Common Authentication Errors


    - **Invalid Client ID**: {"error_code":6092,"message":"X-Client-Id
    invalid","success":false}

    - **Invalid Secret**: {"error_code":6090,"message":"invalid
    secret","success":false}

    - **Timestamp (Older than 10 secs)**:
    {"errors":{"error_code":6093,"text":"timestamp expired"},"success":false}
servers:
  - url: https://api.saber.money
security: []
paths:
  /api/v2/wallet/transaction/crypto/buy:
    post:
      tags:
        - Onramp
      summary: Create Buy Transaction (v1)
      description: >-
        Create Buy Transaction


        ---


        **Field notes (recovered from legacy docs)**


        **Create External Buy**


        **Price lock (`quote_id`)**


        Pass `quote_id` to create this transaction against a price-locked quote
        previously issued by the External Buy Quote endpoint (`POST
        /api/v2/wallet/w/quote`). When `quote_id` is supplied, the locked
        currency pair, payment method, amounts, network, and fees are resolved
        from the stored quote; the matching request fields become optional and
        any values sent for them are ignored. `crypto_wallet_address` is always
        required. When `quote_id` is absent the endpoint behaves as before and
        the original fields remain required.


        ```json

        {
          "quote_id": "421b9fb7-6800-4d9d-ba17-083ad662733b",
          "crypto_wallet_address": "0xf82010290b2c3169ffaB5354d7Bbd09Eb2822724",
          "source_id": "94b00193-301d-4750-b310-207393d987c9",
          "bank_transaction_id": "501610337776"
        }

        ```


        **Response field values**


        | Field | Possible Values |

        | --- | --- |

        | `status` | Typically `PROCESSING` immediately after creation |

        | `failure_code`, `failure_desc` | Empty string until the transaction
        fails |


        If `crypto_wallet_address` is `POOL_TRANSFER`, the handler may also
        surface broker or deposit-address service errors directly with their
        underlying code and message.
      operationId: create-buy-transaction-v1
      parameters:
        - name: X-Api-Key
          in: header
          required: true
          description: Your API key (configured in credentials)
          schema:
            type: string
        - name: X-Signature
          in: header
          required: true
          description: >-
            HMAC-SHA256 signature (auto-generated) To test manually: HMAC-SHA256
            of `apiKey + timestamp` (or `apiKey + timestamp + userId` when
            X-User-Id is required), keyed with your API secret. The HMAC
            Generator flow computes this for you.
          schema:
            type: string
        - name: X-Timestamp
          in: header
          required: true
          description: >-
            Unix timestamp in seconds (auto-generated) Unix seconds, e.g.
            `Math.floor(Date.now() / 1000)`. Must match the timestamp used in
            the X-Signature computation.
          schema:
            type: string
        - name: X-Request-Id
          in: header
          required: true
          description: >-
            Unique request identifier (auto-generated) Any unique string per
            request, e.g. a UUID.
          schema:
            type: string
        - name: X-User-Id
          in: header
          required: true
          description: User UUID (set above)
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                from_currency:
                  type: string
                  description: The from_currency field
                to_currency:
                  type: string
                  description: The to_currency field
                from_amount:
                  type: number
                  description: The from_amount field
                payment_method:
                  type: string
                  description: The payment_method field
                crypto_wallet_address:
                  type: string
                  description: The crypto_wallet_address field
                network:
                  type: string
                  description: The network field
                source_id:
                  type: string
                  description: The source_id field
                bank_transaction_id:
                  type: string
                  description: The bank_transaction_id field
              required:
                - from_currency
                - to_currency
                - from_amount
                - payment_method
                - crypto_wallet_address
                - network
                - source_id
                - bank_transaction_id
            example:
              from_currency: EUR
              to_currency: USDT
              from_amount: 100
              payment_method: sepa_transfer
              crypto_wallet_address: '0xf82010290b2c3169ffaB5354d7Bbd09Eb2822724'
              network: MATIC
              source_id: IT78R36772223000EM0005782376
              bank_transaction_id: IT78R36772223000EM0005782376_1713099131715
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      uuid:
                        type: string
                      status:
                        type: string
                        enum:
                          - PROCESSING
                      fiat_symbol:
                        type: string
                      crypto_symbol:
                        type: string
                      fiat_amount:
                        type: integer
                      crypto_amount:
                        type:
                          - integer
                          - number
                      payment_method:
                        type: string
                      exchange_rate:
                        type: number
                      crypto_wallet_address:
                        type: string
                      network:
                        type: string
                      tag:
                        type:
                          - string
                          - 'null'
                      source_id:
                        type: string
                      bank_transaction_id:
                        type:
                          - string
                          - 'null'
                      failure_code:
                        type:
                          - string
                          - 'null'
                      failure_desc:
                        type:
                          - string
                          - 'null'
                      created_at:
                        type: integer
                      redirect_url:
                        type: string
                      payment_intent:
                        type: string
              example:
                success: true
                data:
                  id: 74cbe2f9-4e2a-4bd2-92d2-1a139e7cdcf9
                  uuid: 74cbe2f9-4e2a-4bd2-92d2-1a139e7cdcf9
                  status: PROCESSING
                  fiat_symbol: EUR
                  crypto_symbol: USDT
                  fiat_amount: 100
                  crypto_amount: 10
                  payment_method: sepa_transfer
                  exchange_rate: 97.61
                  crypto_wallet_address: '0xb84b44140b9c9d2a32707ba35332969c65bc918d'
                  network: MATIC
                  tag: null
                  source_id: c41f7d27-781c-41da-b74c-278fe7202af5
                  bank_transaction_id: null
                  failure_code: null
                  failure_desc: null
                  created_at: 1684394172000

````

## Related topics

- [Create Pool Buy Transaction (v1)](/api-reference/onramp/create-pool-buy-transaction-v1.md)
- [Get Buy Transaction Details (v1)](/api-reference/onramp/get-buy-transaction-details-v1.md)
- [Create Sell Transaction (v1)](/api-reference/offramp/create-sell-transaction-v1.md)
- [Create Pool Sell Transaction (v1)](/api-reference/offramp/create-pool-sell-transaction-v1.md)
- [Create Crypto Withdraw Transaction (v1)](/api-reference/wallet-operations/create-crypto-withdraw-transaction-v1.md)
