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"
}'
Endpoints
Create crypto subscription
Create a recurring subscription charged through crypto
POST
/
gateway
/
crypto
/
subscription
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"
}'
Creates a crypto subscription.
Body parameters
string
required
Unique identifier for this subscription in your application.
number
required
Subscription charge amount.
string
required
Cryptocurrency used for the subscription payment.
string
required
Blockchain network used for the subscription payment.
object
required
Customer information.
object
required
Product associated with the subscription.
object
required
Recurrence configuration.
string
URL that will receive subscription webhook notifications.
Request example
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"
}'
Payload example
{
"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"
}
Was this page helpful?

