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

# Create temporary crypto wallet

> Create a temporary wallet for one exact crypto collection.

Create a temporary crypto wallet when you expect one customer to send an exact amount. Pasteaza confirms the payment and updates the collection status automatically.

The same `merchantReference` returns the existing wallet in the same API key environment. This prevents duplicate assignments when you retry a request.

## Endpoint

```http theme={null}
POST /v1/crypto/temporary-addresses
```

## Headers

```http theme={null}
Authorization: Bearer sk_test_xxx
Content-Type: application/json
```

## Request body

| Field | Type | Required | Description |
| - | - | - | - |
| `merchantReference` | string | Yes | Your unique reference for this collection. |
| `amount` | string | Yes | Exact amount of the selected crypto asset, such as `25.50`. |
| `asset` | string | Yes | The asset to collect. Currently supports `USDC` and `USDT`. |
| `network` | string | Yes | The blockchain network. Currently supports `SOLANA`. |
| `expiresAt` | string | No | ISO 8601 expiry time. Defaults to 30 minutes and cannot exceed 24 hours. |
| `metadata` | object | No | Additional merchant data for this collection. |

## Example request

```bash theme={null}
curl https://api.oyapasteaza.com/v1/crypto/temporary-addresses \
  -H "Authorization: Bearer sk_test_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "merchantReference": "ORDER_1042",
    "amount": "25.50",
    "asset": "USDC",
    "network": "SOLANA",
    "metadata": {
      "customerId": "CUS_001"
    }
  }'
```

## Successful response

```json theme={null}
{
  "status": true,
  "message": "Temporary crypto wallet created.",
  "data": {
    "reference": "cp_MXxqjm8zS3LwQdKp",
    "merchantReference": "ORDER_1042",
    "asset": "USDC",
    "network": "SOLANA",
    "amount": "25.5",
    "receivedAmount": "0",
    "address": "7M9p...xQ2a",
    "status": "PENDING",
    "expiresAt": "2026-08-15T10:30:00.000Z",
    "paidAt": null,
    "metadata": {
      "customerId": "CUS_001"
    },
    "payments": [],
    "createdAt": "2026-08-15T10:00:00.000Z"
  }
}
```

<Warning>
  Only the exact asset and amount received before `expiresAt` completes the collection automatically. Review the collection status in Pasteaza if a customer sends a different payment.
</Warning>

## Errors

| Code | Meaning |
| - | - |
| `authentication_failed` | The API key is missing or invalid. |
| `validation_failed` | A required request field is missing or invalid. |
| `crypto_temporary_wallet_failed` | Pasteaza could not create or allocate the wallet. |

## Next step

<CardGroup cols={2}>
  <Card title="Verify temporary crypto wallet" icon="circle-check" href="/collections/crypto-temporary-wallets/verify-crypto-temporary-wallet">
    Check whether the exact payment was received and credited.
  </Card>

  <Card title="Webhooks" icon="webhook" href="/getting-started/webhooks">
    Receive a notification after a valid payment is confirmed.
  </Card>
</CardGroup>


## OpenAPI

````yaml openapi.yaml POST /v1/crypto/temporary-addresses
openapi: 3.1.0
info:
  title: Pasteaza API
  version: 1.0.0
  description: Collect and disburse bank and crypto payments with Pasteaza.
servers:
  - url: https://api.oyapasteaza.com
    description: Pasteaza API — the API key selects test or live mode
security:
  - bearerAuth: []
tags:
  - name: Hosted Checkout
  - name: Virtual Accounts
  - name: Dedicated Bank Accounts
  - name: Temporary Crypto Wallets
  - name: Dedicated Crypto Wallets
  - name: Bank Transfers
  - name: Crypto Transfers
paths:
  /v1/crypto/temporary-addresses:
    post:
      tags:
        - Temporary Crypto Wallets
      summary: Create temporary crypto wallet
      operationId: createTemporaryCryptoWallet
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TemporaryCryptoWalletRequest'
      responses:
        '201':
          description: Temporary crypto wallet created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResponse'
        default:
          $ref: '#/components/responses/Error'
components:
  schemas:
    TemporaryCryptoWalletRequest:
      type: object
      required:
        - merchantReference
        - amount
        - asset
        - network
      properties:
        merchantReference:
          type: string
          example: CRYPTO-COL-1001
        amount:
          type: string
          pattern: ^\d+(\.\d+)?$
          example: '25.50'
        asset:
          $ref: '#/components/schemas/CryptoAsset'
        network:
          $ref: '#/components/schemas/CryptoNetwork'
        expiresAt:
          type: string
          format: date-time
        metadata:
          $ref: '#/components/schemas/Metadata'
    SuccessResponse:
      type: object
      required:
        - status
        - message
        - data
      properties:
        status:
          type: boolean
          const: true
        message:
          type: string
        data:
          type: object
          additionalProperties: true
    CryptoAsset:
      type: string
      enum:
        - USDC
        - USDT
      example: USDC
    CryptoNetwork:
      type: string
      enum:
        - SOLANA
      example: SOLANA
    Metadata:
      type: object
      additionalProperties: true
      example:
        orderId: ORD-1042
    ErrorResponse:
      type: object
      required:
        - status
        - message
        - code
      properties:
        status:
          type: boolean
          const: false
        message:
          type: string
        code:
          type: string
  responses:
    Error:
      description: Request failed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Pasteaza secret key
      description: >-
        Use an `sk_test_...` key in the playground. Never enter a live key in
        shared environments.

````

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