curl -X PUT https://pay.autorizou.dev/api/v1/product-offers/b9af7796-ac98-47f2-b921-46b0415d7473 \
-H "Authorization: Bearer 4eC39HqLyjWDarjtT1zdp7dc" \
-H "Content-Type: application/json" \
-d '{
"name": "Mensal Progressivo",
"cycles": [
{ "start": 1, "end": 6, "amount": 9900 },
{ "start": 7, "end": null, "amount": 12900 }
]
}'
curl -X POST https://pay.autorizou.dev/api/v1/product-offers/b9af7796-ac98-47f2-b921-46b0415d7473/archive \
-H "Authorization: Bearer 4eC39HqLyjWDarjtT1zdp7dc"
{
"id": "b9af7796-ac98-47f2-b921-46b0415d7473",
"hash": "AUTOFRTNRV0QX5OYK8V6N5K4IZ",
"type": "recurring",
"name": "Mensal Progressivo",
"is_active": true,
"amount": 12900,
"currency": "BRL",
"interval": "monthly",
"trial_days": 7,
"cycles": [
{ "start": 1, "end": 6, "amount": 9900 },
{ "start": 7, "end": null, "amount": 12900 }
],
"checkout_url": "https://pay.autorizou.app/s/AUTOFRTNRV0QX5OYK8V6N5K4IZ",
"created_at": "2026-07-20T03:16:38.000000Z"
}
Produtos e Ofertas
Gerenciar Oferta
Edita uma oferta (inclusive reescreve a régua de preços), arquiva e restaura. Reescrever a régua nunca reprecifica quem já assina.
PUT
/
api
/
v1
/
product-offers
/
{id}
curl -X PUT https://pay.autorizou.dev/api/v1/product-offers/b9af7796-ac98-47f2-b921-46b0415d7473 \
-H "Authorization: Bearer 4eC39HqLyjWDarjtT1zdp7dc" \
-H "Content-Type: application/json" \
-d '{
"name": "Mensal Progressivo",
"cycles": [
{ "start": 1, "end": 6, "amount": 9900 },
{ "start": 7, "end": null, "amount": 12900 }
]
}'
curl -X POST https://pay.autorizou.dev/api/v1/product-offers/b9af7796-ac98-47f2-b921-46b0415d7473/archive \
-H "Authorization: Bearer 4eC39HqLyjWDarjtT1zdp7dc"
{
"id": "b9af7796-ac98-47f2-b921-46b0415d7473",
"hash": "AUTOFRTNRV0QX5OYK8V6N5K4IZ",
"type": "recurring",
"name": "Mensal Progressivo",
"is_active": true,
"amount": 12900,
"currency": "BRL",
"interval": "monthly",
"trial_days": 7,
"cycles": [
{ "start": 1, "end": 6, "amount": 9900 },
{ "start": 7, "end": null, "amount": 12900 }
],
"checkout_url": "https://pay.autorizou.app/s/AUTOFRTNRV0QX5OYK8V6N5K4IZ",
"created_at": "2026-07-20T03:16:38.000000Z"
}
Depois de criada, a oferta é gerenciada por
id. Você edita o nome, o valor (única) ou a régua inteira (recorrente), e liga/desliga a oferta com arquivar/restaurar.
string
required
O
id (uuid) da oferta.Editar
PUT /v1/product-offers/{id}
string
Novo nome. Máximo: 80 caracteres.
integer
Novo valor em centavos (ofertas
one_time). Mínimo 100.string
Nova cadência (ofertas
recurring): monthly, quarterly, half-yearly, yearly.integer
Dias de teste (
1 a 365).array
A régua nova, inteira (ofertas
recurring). Segue as mesmas regras da criação: começa no ciclo 1, contígua, só a última aberta.Reescrever a régua é seguro: a régua congela na assinatura de cada cliente no momento em que ele assinou. Editar a oferta muda apenas quem assinar dali para frente. Ninguém é reprecificado.
Arquivar e restaurar
Arquivar desliga a oferta: ocheckout_url dela para de aceitar novas compras, mas as ofertas irmãs do produto seguem vivas, e quem já assinou não é afetado.
| Método | Rota | Efeito |
|---|---|---|
POST | /v1/product-offers/{id}/archive | is_active vira false. |
POST | /v1/product-offers/{id}/restore | is_active volta a true. |
Resposta
As três rotas devolvem a oferta atualizada, no mesmo formato de Criar Oferta (comcycles e checkout_url).
curl -X PUT https://pay.autorizou.dev/api/v1/product-offers/b9af7796-ac98-47f2-b921-46b0415d7473 \
-H "Authorization: Bearer 4eC39HqLyjWDarjtT1zdp7dc" \
-H "Content-Type: application/json" \
-d '{
"name": "Mensal Progressivo",
"cycles": [
{ "start": 1, "end": 6, "amount": 9900 },
{ "start": 7, "end": null, "amount": 12900 }
]
}'
curl -X POST https://pay.autorizou.dev/api/v1/product-offers/b9af7796-ac98-47f2-b921-46b0415d7473/archive \
-H "Authorization: Bearer 4eC39HqLyjWDarjtT1zdp7dc"
{
"id": "b9af7796-ac98-47f2-b921-46b0415d7473",
"hash": "AUTOFRTNRV0QX5OYK8V6N5K4IZ",
"type": "recurring",
"name": "Mensal Progressivo",
"is_active": true,
"amount": 12900,
"currency": "BRL",
"interval": "monthly",
"trial_days": 7,
"cycles": [
{ "start": 1, "end": 6, "amount": 9900 },
{ "start": 7, "end": null, "amount": 12900 }
],
"checkout_url": "https://pay.autorizou.app/s/AUTOFRTNRV0QX5OYK8V6N5K4IZ",
"created_at": "2026-07-20T03:16:38.000000Z"
}
Posse por construção: uma oferta de outro lojista não resolve (devolve
404), mesmo com um id válido.