curl --request POST \
--url https://app.amplopay.com/api/v1/gateway/pix/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-123",
"amount": 97,
"client": {
"name": "João da Silva",
"email": "joao@email.com",
"phone": "(11) 99999-9999",
"document": "123.456.789-00"
},
"product": {
"id": "plano-mensal",
"name": "Plano mensal",
"price": 97
},
"subscription": {
"periodicityType": "MONTHS",
"periodicity": 1,
"firstChargeIn": 0
},
"callbackUrl": "https://example.com/webhooks/payment"
}'
Endpoints
Create Pix subscription
Create a recurring subscription charged through Pix
POST
/
gateway
/
pix
/
subscription
curl --request POST \
--url https://app.amplopay.com/api/v1/gateway/pix/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-123",
"amount": 97,
"client": {
"name": "João da Silva",
"email": "joao@email.com",
"phone": "(11) 99999-9999",
"document": "123.456.789-00"
},
"product": {
"id": "plano-mensal",
"name": "Plano mensal",
"price": 97
},
"subscription": {
"periodicityType": "MONTHS",
"periodicity": 1,
"firstChargeIn": 0
},
"callbackUrl": "https://example.com/webhooks/payment"
}'
Creates a Pix subscription.
Body parameters
string
required
Unique identifier for this subscription in your application.
number
required
Subscription charge amount.
object
required
Customer information.
object
required
Product associated with the subscription.
object
required
Recurrence configuration.
string
required
Periodicity type. Supported values:
DAYS, WEEKS, MONTHS, YEARS.number
required
Recurrence interval.
number
Number of periods before the first charge.
string
URL that will receive subscription webhook notifications.
Request example
curl --request POST \
--url https://app.amplopay.com/api/v1/gateway/pix/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-123",
"amount": 97,
"client": {
"name": "João da Silva",
"email": "joao@email.com",
"phone": "(11) 99999-9999",
"document": "123.456.789-00"
},
"product": {
"id": "plano-mensal",
"name": "Plano mensal",
"price": 97
},
"subscription": {
"periodicityType": "MONTHS",
"periodicity": 1,
"firstChargeIn": 0
},
"callbackUrl": "https://example.com/webhooks/payment"
}'
Payload example
{
"identifier": "assinatura-123",
"amount": 97,
"client": {
"name": "João da Silva",
"email": "joao@email.com",
"phone": "(11) 99999-9999",
"document": "123.456.789-00"
},
"product": {
"id": "plano-mensal",
"name": "Plano mensal",
"price": 97
},
"subscription": {
"periodicityType": "MONTHS",
"periodicity": 1,
"firstChargeIn": 0
},
"callbackUrl": "https://example.com/webhooks/payment"
}
Was this page helpful?

