curl --request POST \
--url https://api.pagozz.com/v1/cycles/{id}/reactivate \
--header 'Pagozz-Token: <api-key>'{
"data": {
"cycle": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"plan_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"subscriber_account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "trialing",
"current_period_start": "2023-11-07T05:31:56Z",
"current_period_end": "2023-11-07T05:31:56Z",
"next_billing_at": "2023-11-07T05:31:56Z",
"anchor_day": 123,
"payment_method": "<string>",
"billing_count": 123,
"paid_count": 123,
"credit_balance": 123,
"cancel_at_period_end": true,
"canceled_at": "2023-11-07T05:31:56Z",
"cancellation_reason": "<string>",
"trial_start": "2023-11-07T05:31:56Z",
"trial_end": "2023-11-07T05:31:56Z",
"environment": "test",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"invoice": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cycle_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "recurring",
"period_start": "2023-11-07T05:31:56Z",
"period_end": "2023-11-07T05:31:56Z",
"billing_number": 123,
"amount": 123,
"setup_fee": 123,
"credit_applied": 123,
"total_amount": 123,
"currency": "BRL",
"status": "draft",
"transaction_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payment_method": "<string>",
"paid_at": "2023-11-07T05:31:56Z",
"due_at": "2023-11-07T05:31:56Z",
"attempt_count": 123,
"environment": "test",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}
}Reativa uma assinatura cancelada ou suspensa. Uma nova fatura é gerada imediatamente para o período atual. Disponível apenas para assinaturas com status canceled ou suspended.
curl --request POST \
--url https://api.pagozz.com/v1/cycles/{id}/reactivate \
--header 'Pagozz-Token: <api-key>'{
"data": {
"cycle": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"plan_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"subscriber_account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "trialing",
"current_period_start": "2023-11-07T05:31:56Z",
"current_period_end": "2023-11-07T05:31:56Z",
"next_billing_at": "2023-11-07T05:31:56Z",
"anchor_day": 123,
"payment_method": "<string>",
"billing_count": 123,
"paid_count": 123,
"credit_balance": 123,
"cancel_at_period_end": true,
"canceled_at": "2023-11-07T05:31:56Z",
"cancellation_reason": "<string>",
"trial_start": "2023-11-07T05:31:56Z",
"trial_end": "2023-11-07T05:31:56Z",
"environment": "test",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"invoice": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cycle_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "recurring",
"period_start": "2023-11-07T05:31:56Z",
"period_end": "2023-11-07T05:31:56Z",
"billing_number": 123,
"amount": 123,
"setup_fee": 123,
"credit_applied": 123,
"total_amount": 123,
"currency": "BRL",
"status": "draft",
"transaction_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payment_method": "<string>",
"paid_at": "2023-11-07T05:31:56Z",
"due_at": "2023-11-07T05:31:56Z",
"attempt_count": 123,
"environment": "test",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}
}Chave de API no formato pgz_test_* (test mode) ou pgz_live_* (live mode). O ambiente é determinado automaticamente pelo prefixo da chave.
ID do recurso (UUID).
Assinatura reativada com sucesso. Retorna a assinatura atualizada e a fatura gerada.
Show child attributes