Building Recurring Crypto Billing With the Billing API
CoinGate’s Billing API automates recurring crypto billing by generating and sending invoices on a schedule, requiring customer action for each payment, unlike card-based subscriptions.
CoinGate’s Billing API addresses the challenge of recurring crypto billing by automating the generation and delivery of invoices on a set schedule, rather than attempting to pull funds directly from a customer’s wallet. Each payment requires the wallet holder’s signature, ensuring compliance with blockchain’s push-based transaction model. The API eliminates manual invoice creation and chasing, reducing operational overhead for businesses managing subscriptions in cryptocurrency.
To set up recurring billing, users define a contact (customer), optionally a product with a price in a specific currency, and a schedule with a frequency (e.g., weekly or monthly) and start date. The external_contact_id links the contact to internal user records, streamlining database management. Products are tied to a currency_id, which must be retrieved from the currencies endpoint rather than guessed, ensuring accuracy in pricing and invoicing.
CoinGate handles the invoicing process by generating billing requests on due dates and emailing customers a payment link. A callback_url receives updates on billing request statuses, including scheduled, pending, completed, expired, or canceled. Businesses can use the returned external_contact_id to update user subscriptions without additional lookups, while verifying callbacks to maintain security and idempotency.
To discontinue recurring billing, businesses send a PATCH request to the recurrings endpoint, which stops future and scheduled invoices while leaving already-issued ones intact. This approach avoids the card-specific failures—such as expired cards or issuer declines—that often lead to involuntary churn in traditional subscription models. The Billing API’s design prioritizes transparency and automation, aligning with blockchain’s push-based payment principles.