Payment integrations
Connect Woovi, AbacatePay, Stripe, PushinPay, Hotmart or Kiwify and issue the NFS-e automatically for every confirmed payment.
Connect your payment platform account to Corvo. When a payment is confirmed, Corvo issues the NFS-e through the same path as the API: it checks the company and certificate, uses one plan credit and sends the invoice to the city.
How it works
- In the Corvo dashboard, open Integrations, choose the platform and connect your account. Copy the webhook URL shown during setup.
- Register that address in the payment platform dashboard. The platform then notifies Corvo for every payment.
- Corvo checks the notice's authentication, stores the event and answers right away. Processing happens in the background.
- If the payment is confirmed and a service rule exists, the invoice is issued. The competence date is the confirmation date (São Paulo time zone).
- The same payment never produces two invoices, even if the platform sends the notice again.
By platform
Woovi
- There is no credential to provide. Corvo generates an authentication token shown when you create the connection. Copy and save this token. The
testenvironment uses the Woovi sandbox andliveuses the production account. - In Woovi, create a webhook with the connection
webhookUrland the paid charge event (OPENPIX:CHARGE_COMPLETED). Under HTTP headers, add anAuthorizationheader with thewebhookTokenin the Value field. - The invoice customer is the charge customer, never whoever paid the Pix.
- Each charge becomes one invoice, identified by its
correlationID. The service description on the invoice is the chargecomment; without one, the company default is used. - Refunds: also select
PIX_TRANSACTION_REFUND_SENT_CONFIRMEDin the webhook. Corvo links the refund to the sale by the PixendToEndId. A partial refund is ignored.
AbacatePay
- Credential:
apiKey, an AbacatePay API v2 key (Integration > API > + New key) with theCUSTOMER:READandPRODUCT:READpermissions. Corvo generates thewebhookSecretand shows the full webhook URL when you create the connection. Copy and save that address. - In AbacatePay, create a webhook: paste the
webhookUrlin the URL field and secret shown when creating the connection in the Secret field, and selectcheckout.completedandtransparent.completed. Corvo accepts the Standard Webhooks signature (webhook-id,webhook-timestamp,webhook-signature) and the legacy format (?webhookSecret=). - The event
devModemust match the connection environment: test events issue no invoice on aliveconnection, and the other way around. - The webhook carries the CPF/CNPJ masked, so Corvo looks the customer up on AbacatePay with your key and uses the full document. If the customer has no document, the sale stays pending (
customer_tax_id_missing), or is issued without a customer if the rule hasallowAnonymousCustomer. - A rule's
externalProductIdis the checkout itemid. The service description on the invoice is the product name (Corvo looks it up with your key); without thePRODUCT:READpermission, the company default is used. - Refunds: also select
checkout.refundedandtransparent.refundedin the webhook. Without automatic cancellation, a refund or dispute after the invoice opens therefund_after_invoicependency and the invoice is not cancelled.
PushinPay
- There is no credential to provide. Corvo generates the
webhookSecret(already inside thewebhookUrl) and thewebhookToken, shown only once when the connection is created. Copy and keep both. PushinPay does not sign its notices: authentication is the secret in the address plus the header carrying the token. - Pass Corvo's
webhookUrlaswebhook_urlwhen creating each charge in your system (Pix, boleto or recurring Pix). In the PushinPay panel, set the custom headerx-corvo-tokento thewebhookToken. - Everything arrives by webhook: Corvo never calls the PushinPay API. The notice carries no environment, email or description; the environment is the connection's, the service description comes from the rule or the company default, and the invoice is not emailed to the customer automatically.
- Each paid charge (
status: paid) becomes one invoice, identified by itsid. Each installment of a recurring charge has its ownidand produces its own invoice. - Refund: the reversal arrives with
status: canceled. If the charge was already paid, Corvo treats it as a full refund (a partial refund cannot be told apart); if it was never paid, the notice is ignored. Disputes (MED) have no webhook and are not handled.
Stripe
- Credentials:
apiKey, a restricted key (rk_...) with read-only access to Charges, Customers, Checkout Sessions and Invoices, andwebhookSigningSecret, the endpointwhsec_.... Corvo generates thewebhookSecretand shows the full webhook URL when you create the connection. Copy and save that address. - Steps: (1) in Developers > API keys, create the read-only restricted key; (2) in Developers > Webhooks, add an endpoint with the
webhookUrland the eventscharge.succeeded,charge.refundedandcharge.dispute.created; (3) copy the endpointwhsec_...and paste it in Corvo. - Corvo checks the
Stripe-Signatureheader (HMAC-SHA256, 5-minute tolerance) and the connection secret in the address. - Each paid Charge becomes one invoice, identified by
stripe_charge:<id>. Onlycharge.succeededwithstatussucceededandpaidtrue issues; Pix and boleto still pending are ignored. It works with Checkout, Payment Links, subscriptions and Pix on Stripe. - BRL only: a charge in another currency is blocked with
unsupported_currency. - The event
livemodemust match the connection environment: test events issue no invoice on aliveconnection, and the other way around. - The CPF/CNPJ comes from the customer (
tax_idsbr_cpforbr_cnpj) or from Checkout (customer_details.tax_ids). Turn on tax ID collection (tax_id_collection) in Checkout so the invoice goes out complete. Without a document, the sale stays pending (customer_tax_id_missing), or is issued without a customer if the rule hasallowAnonymousCustomer. - The service description on the invoice is the name of the Checkout or invoice items (up to 5); without them, the rule description or the company default is used.
- Refunds: only a full refund (
charge.refundedwithrefundedtrue) is handled; a partial refund is ignored and the invoice stays as it is. A dispute (charge.dispute.created) only flags the sale, without cancelling.
Kiwify
- Credentials:
token, the webhook token you choose in Kiwify (use a long random value), and optionallyinvoiceValue(totalormine). Corvo generates thewebhookSecretand shows the full webhook URL when you create the connection. Copy and save that address. - Steps: (1) in Kiwify, Apps > Webhooks, create a webhook with the
webhookUrl, choosing the products; (2) set a token and paste the same token in Corvo, ticking the triggerscompra_aprovada,compra_reembolsadaandchargeback; (3) use "Test Webhook" to check. Do not include affiliate or co-production sales: the invoice covers your own sales only. - Corvo checks the
?signature=query (HMAC-SHA1 of the raw body, key =token, lowercase hex) and the connection secret in the address. Kiwify signs no timestamp, so a replay is stopped byorder_id+webhook_event_type. - Each approved purchase (
order_approved,order_statuspaid) becomes one invoice, identified bykiwify:<order_id>. Each subscription charge has a neworder_idand gets its own invoice;subscription_renewed, cancellations and free-trial events are ignored. - BRL and Brazilian buyers only: another currency is blocked with
unsupported_currency; with no CPF/CNPJ, an invalid document or a buyer from another country, the sale stays pending (customer_tax_id_missing), or is issued without a customer if the rule hasallowAnonymousCustomer. - Invoice amount: by default the total paid by the buyer (
Commissions.charge_amount). WithinvoiceValue=mineit uses your share (Commissions.my_commission); if the notice has no such value, the sale goes to attention instead of using the total. - Kiwify has no test mode: "Test Webhook" sends fake data. Run that test on a Corvo test connection, never on a production one.
- A refund and a chargeback link to the sale by
order_id. With "cancel invoice on refund" on, a refund cancels the invoice; without it (and on a chargeback) the sale is only flagged (refund_after_invoice).
Hotmart
- Credentials:
hottok, the webhook token of your Hotmart account, and theinvoiceValueoption ("Invoice amount":totalormine). Corvo generates thewebhookSecretand shows the full webhook URL when you create the connection. Copy and save that address. - Steps: (1) in Tools > Webhook, add the
webhookUrlfor all products with the events purchase approved, purchase complete, refund, chargeback and protest; (2) copy thehottokand paste it in Corvo; (3) send a test from Hotmart. - Hotmart does not sign the webhook: Corvo checks the
X-HOTMART-HOTTOKheader and the connection secret in the address, both in constant time. Events Corvo does not handle get a success response and are ignored, so Hotmart does not disable the webhook. - Each paid purchase becomes one invoice, identified by
hotmart:<transaction>.PURCHASE_APPROVEDandPURCHASE_COMPLETEare the same sale and never issue twice. For subscriptions, each charge has its owntransactionand issues one invoice. - It only issues when
invoice_byisSELLER. If Hotmart issues the invoice (HOTMARTorbusiness_modelR), the sale is blocked withseller_not_issuer. Affiliate notices, with no buyer and no price, are ignored. - BRL only. A foreign buyer, or a document that is not a CPF/CNPJ, goes to complete data (
customer_tax_id_missing): Corvo never issues on its own for foreigners. The CPF/CNPJ only arrives if the checkout asks for it. - Invoice amount:
totaluses the amount paid (full_price);mine("my share") subtracts coproducer and affiliate commissions. If the notice has no commissions, the sale goes to attention and does not issue. - A refund (
PURCHASE_REFUNDED) and a chargeback (PURCHASE_CHARGEBACK) cancel the invoice only if the rule has automatic cancellation on; a partial refund is ignored. A protest (PURCHASE_PROTEST) only flags the sale, without cancelling. - Hotmart does not report the environment in the notice: the environment chosen on the connection applies. The notice fields still need to be confirmed with a real notice.
Sales that need attention
When a sale cannot become an invoice automatically, check its pending status and reason in the integration sales list in the Corvo dashboard.
| blockReason | What to do |
|---|---|
customer_tax_id_missing | The platform did not send a full CPF/CNPJ. Complete the customer details on the sale and retry issuing from the dashboard. |
no_rule / ambiguous_rule | Create or adjust the rules, then retry from the dashboard. |
invoice_rejected | Fiscal validation refused the request. The message names the field; fix it and retry from the dashboard. |
quota_exceeded | No credits or plan limit reached. After fixing it, retry from the dashboard. |
connection_inactive | The connection is paused or needs to be authorized again. Reactivate it and retry from the dashboard. |
company_not_ready | The company is not ready or the certificate is missing, expired or invalid. Fix the registration and retry from the dashboard. |
before_active_from | The payment happened before the connection start date. No invoice is issued. |
refunded / disputed | The payment was refunded or disputed before the invoice. No invoice is issued. |
refund_after_invoice | A refund or dispute arrived after the invoice and automatic cancellation is off. The invoice stays authorized. To cancel it, request cancellation from the invoice page; for future refunds, enable automatic cancellation in the integration settings (a dispute never cancels). |
cancel_requested | Nothing to do: Corvo asked for the invoice to be cancelled (reason "Cancelado por reembolso"). Follow the result on the invoice page. |
cancel_failed | The cancellation could not be requested (for example, the invoice is in a state that does not allow it). Check the invoice and, if it can be cancelled, retry from the dashboard. |
Using the API
Everything the dashboard does for payment integrations is also available by API, with an API key (X-API-Key).
| Method | Route | Description |
|---|---|---|
| GET | /v1/integrations/providers | Available platforms and the credential fields of each |
| POST | /v1/integrations/connections | Create a connection |
| GET | /v1/integrations/connections | List connections |
| GET | /v1/integrations/connections/:id | Get a connection |
| POST | /v1/integrations/connections/:id/validate | Check the credentials and identify the account |
| POST | /v1/integrations/connections/:id/activate | Start issuing automatically |
| POST | /v1/integrations/connections/:id/pause | Stop issuing; events are still stored |
| POST | /v1/integrations/connections/:id/disconnect | Disconnect for good |
| GET | /v1/integrations/connections/:id/rules | Get the service rules |
| PUT | /v1/integrations/connections/:id/credentials | Replace the credentials (for example after rotating a key) |
| PUT | /v1/integrations/connections/:id/rules | Replace the service rules |
| GET | /v1/integrations/connections/:id/events | Events received |
| GET | /v1/integrations/connections/:id/operations | Sales and the invoice status of each |
| PATCH | /v1/integrations/operations/:id/customer | Fill in the customer of a pending sale |
| POST | /v1/integrations/operations/:id/retry | Try to issue again |
| POST | /v1/integrations/inbound/:publicId | Address the payment platform calls (public, authenticated by the connector) |
1. Create the connection
curl -X POST "$BASE_URL/v1/integrations/connections" -H "X-API-Key: $CORVO_API_KEY" -H "Content-Type: application/json" -d '{
"provider": "woovi",
"companyId": "<company id>",
"environment": "test",
"credentials": {},
"activeFrom": "2026-11-01T00:00:00Z"
}'2. Set the service rule and activate
curl -X PUT "$BASE_URL/v1/integrations/connections/$CONNECTION_ID/rules" -H "X-API-Key: $CORVO_API_KEY" -H "Content-Type: application/json" -d '{ "rules": [ { "service": { "code": "010101", "description": "Consulting" }, "sendEmail": true } ] }'
curl -X POST "$BASE_URL/v1/integrations/connections/$CONNECTION_ID/validate" -H "X-API-Key: $CORVO_API_KEY"
curl -X POST "$BASE_URL/v1/integrations/connections/$CONNECTION_ID/activate" -H "X-API-Key: $CORVO_API_KEY"A rule without externalProductId applies to any product. To give a product a different service, send another rule with its externalProductId. Payments made before activeFrom are ignored.
A sale that could not become an invoice shows up in GET /v1/integrations/connections/:id/operations with fiscalStatus and blockReason (see the table above). Fix it with PATCH /v1/integrations/operations/:id/customer or by adjusting the rules, then call POST /v1/integrations/operations/:id/retry. To cancel an invoice after a refund, use POST /v1/invoices/:id/cancel.