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

# Create crypto subscription

> Create a recurring subscription charged through crypto

Creates a crypto subscription.

## Body parameters

<ParamField body="identifier" type="string" required>
  Unique identifier for this subscription in your application.
</ParamField>

<ParamField body="amount" type="number" required>
  Subscription charge amount.
</ParamField>

<ParamField body="cryptoCurrency" type="string" required>
  Cryptocurrency used for the subscription payment.
</ParamField>

<ParamField body="network" type="string" required>
  Blockchain network used for the subscription payment.
</ParamField>

<ParamField body="client" type="object" required>
  Customer information.
</ParamField>

<ParamField body="product" type="object" required>
  Product associated with the subscription.
</ParamField>

<ParamField body="subscription" type="object" required>
  Recurrence configuration.
</ParamField>

<ParamField body="callbackUrl" type="string">
  URL that will receive subscription webhook notifications.
</ParamField>

## Request example

<RequestExample>
  ```bash theme={null}
  curl --request POST \
    --url https://app.amplopay.com/api/v1/gateway/crypto/subscription \
    --header 'Content-Type: application/json' \
    --header 'x-public-key: SUA_CHAVE_PUBLICA_AQUI' \
    --header 'x-secret-key: SUA_CHAVE_PRIVADA_AQUI' \
    --data '{
      "identifier": "assinatura-crypto-123",
      "amount": 97,
      "cryptoCurrency": "USDT",
      "network": "TRON",
      "client": {
        "name": "João da Silva",
        "email": "joao@email.com",
        "phone": "(11) 99999-9999",
        "document": "123.456.789-00"
      },
      "product": {
        "id": "plano-crypto",
        "name": "Plano Crypto",
        "price": 97
      },
      "subscription": {
        "periodicityType": "MONTHS",
        "periodicity": 1,
        "firstChargeIn": 0
      },
      "callbackUrl": "https://example.com/webhooks/payment"
    }'
  ```
</RequestExample>

## Payload example

```json theme={null}
{
  "identifier": "assinatura-crypto-123",
  "amount": 97,
  "cryptoCurrency": "USDT",
  "network": "TRON",
  "client": {
    "name": "João da Silva",
    "email": "joao@email.com",
    "phone": "(11) 99999-9999",
    "document": "123.456.789-00"
  },
  "product": {
    "id": "plano-crypto",
    "name": "Plano Crypto",
    "price": 97
  },
  "subscription": {
    "periodicityType": "MONTHS",
    "periodicity": 1,
    "firstChargeIn": 0
  },
  "callbackUrl": "https://example.com/webhooks/payment"
}
```
