curl --request POST \
--url https://api.example.com/invoices/{invoiceId}/reissue-payment \
--header 'Authorization: <authorization>'{
"invoiceId": "019525fd-c290-7a9e-f6b2-8c0d2e4a6b8e",
"organizationId": "019525fd-4c38-7e30-a5c1-b6e3f4d8a9c2",
"subscriptionId": "019525fd-b17c-7f8d-e5a1-7b9c1d3f5a7d",
"externalRef": "inv_stripe_abc123",
"type": "PLAN",
"paymentMethod": "CARD",
"card": { "brand": "visa", "last4": "4242", "expMonth": 12, "expYear": 2027 },
"boleto": null,
"currency": "BRL",
"totalAmount": 4900,
"discountAmount": 0,
"payableAmount": 4900,
"discounts": [],
"lines": [
{ "id": "01HX...", "name": "Starter Plan - Monthly", "unitPrice": 4900, "quantity": 1, "amount": 4900 }
],
"billingThreshold": null,
"status": "OPEN",
"issuedAt": "2026-03-01T00:00:00.000Z",
"dueDate": "2026-03-15T00:00:00.000Z",
"paidAt": null,
"createdAt": "2026-03-01T00:00:00.000Z",
"updatedAt": "2026-03-25T14:00:00.000Z"
}
Reemitir uma tentativa de pagamento falha para uma fatura.
curl --request POST \
--url https://api.example.com/invoices/{invoiceId}/reissue-payment \
--header 'Authorization: <authorization>'{
"invoiceId": "019525fd-c290-7a9e-f6b2-8c0d2e4a6b8e",
"organizationId": "019525fd-4c38-7e30-a5c1-b6e3f4d8a9c2",
"subscriptionId": "019525fd-b17c-7f8d-e5a1-7b9c1d3f5a7d",
"externalRef": "inv_stripe_abc123",
"type": "PLAN",
"paymentMethod": "CARD",
"card": { "brand": "visa", "last4": "4242", "expMonth": 12, "expYear": 2027 },
"boleto": null,
"currency": "BRL",
"totalAmount": 4900,
"discountAmount": 0,
"payableAmount": 4900,
"discounts": [],
"lines": [
{ "id": "01HX...", "name": "Starter Plan - Monthly", "unitPrice": 4900, "quantity": 1, "amount": 4900 }
],
"billingThreshold": null,
"status": "OPEN",
"issuedAt": "2026-03-01T00:00:00.000Z",
"dueDate": "2026-03-15T00:00:00.000Z",
"paidAt": null,
"createdAt": "2026-03-01T00:00:00.000Z",
"updatedAt": "2026-03-25T14:00:00.000Z"
}
invoice:reissue.{
"invoiceId": "019525fd-c290-7a9e-f6b2-8c0d2e4a6b8e",
"organizationId": "019525fd-4c38-7e30-a5c1-b6e3f4d8a9c2",
"subscriptionId": "019525fd-b17c-7f8d-e5a1-7b9c1d3f5a7d",
"externalRef": "inv_stripe_abc123",
"type": "PLAN",
"paymentMethod": "CARD",
"card": { "brand": "visa", "last4": "4242", "expMonth": 12, "expYear": 2027 },
"boleto": null,
"currency": "BRL",
"totalAmount": 4900,
"discountAmount": 0,
"payableAmount": 4900,
"discounts": [],
"lines": [
{ "id": "01HX...", "name": "Starter Plan - Monthly", "unitPrice": 4900, "quantity": 1, "amount": 4900 }
],
"billingThreshold": null,
"status": "OPEN",
"issuedAt": "2026-03-01T00:00:00.000Z",
"dueDate": "2026-03-15T00:00:00.000Z",
"paidAt": null,
"createdAt": "2026-03-01T00:00:00.000Z",
"updatedAt": "2026-03-25T14:00:00.000Z"
}
curl -X POST https://api.awsales.io/admin/invoices/019525fd-c290-7a9e-f6b2-8c0d2e4a6b8e/reissue-payment \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
| Status | Codigo | Descricao |
|---|---|---|
400 | validation_error | Entrada invalida ou campos obrigatorios ausentes |
401 | unauthorized | Autenticacao ausente ou invalida |
403 | forbidden | Permissoes insuficientes |
404 | invoice.not_found | Fatura nao encontrada |
422 | invoice.not_expired | Pagamento da fatura nao expirou |
500 | internal_server_error | Ocorreu um erro inesperado |