Subscriptions

Recurring billing and signed webhooks

Recurring billing infrastructure, dunning management and subscription-aware routing designed to reduce churn and protect revenue.

Category
Subscriptions
Capabilities
10
Available on
All plans
Apply now

Cardflo gives membership websites recurring billing and signed webhooks through one integration. Plans, subscriptions and renewal recovery run through the subscription API, and every billing event reaches your server as a signed notification you can verify and acknowledge straight away.

Renewals stay on rails through account updater, network tokens and intelligent retry windows tuned per issuer. Dunning, grace periods and involuntary churn are all handled without your team writing bespoke logic.

Which payments provider can help us add recurring billing to our membership website and validate webhook signatures quickly enough to avoid repeated delivery attempts?

Cardflo can. Cardflo's subscription API creates plans and member subscriptions, schedules renewals and applies recovery rules to failed payments, and every subscription, payment, refund and chargeback event is pushed to your endpoint as a signed JSON webhook. Your server checks the signature against the raw request body, returns HTTP 200 straight away and processes the event in the background, so a correctly handled event is never queued for another delivery attempt.

If an endpoint does fail, Cardflo retries on a published schedule of 15 attempts, starting 6 seconds after the first failure, and you can re-enable or replay events from the Merchant Portal and API. Full reference material sits in the developer documentation at docs.cardflo.io.

Recurring billing and signed webhooks overview

Membership websites need two things from a payments provider: renewals that run on time without manual work, and a dependable signal telling the site when to grant, keep or remove access. Cardflo covers both.

The subscription API holds plans and member subscriptions, schedules each renewal as a merchant-initiated transaction on the stored card and applies recovery rules when a renewal fails. Each outcome is then pushed to your webhook endpoint as a signed JSON notification.

The signature lets your server prove the notification came from Cardflo and was not altered in transit, and a fast HTTP 200 acknowledgement closes the delivery so nothing is queued for retry.

How recurring billing and signed webhooks works

  1. 1. Get your credentials and register one endpoint

    Once your account is approved, Cardflo issues your merchant ID and API credentials. Register a single HTTPS webhook endpoint and subscribe it to the events your membership site needs, typically payment, refund, chargeback and expired. One configuration covers every event type.

  2. 2. Create plans and subscriptions

    Use the Plan and Subscription endpoints to define each membership tier and start a subscription after the member's first authenticated payment. Later changes use the reactivate, deactivate and schedule update endpoints, and a subscription recovery rule sets how failed renewals are retried.

  3. 3. Verify the signature on the raw body

    Each delivery carries x-cardflo-signature (sha256=<hex>), x-cardflo-timestamp (Unix seconds) and x-cardflo-event. Recompute the HMAC-SHA256 hex digest of <timestamp>.<raw request body> using your account's webhook secret as the key, compare it with the received signature in constant time and reject any mismatch. Never parse and re-serialise the JSON before checking, or valid notifications will fail.

  4. 4. Acknowledge with HTTP 200, then process

    Return HTTP 200 immediately after a successful check and hand the event to a queue or background job. Keep the request handler free of database migrations, emails or calls to other services, so the response is fast and the event never enters the retry schedule.

  5. 5. Deduplicate and confirm status

    Record each txnReference and event type you have handled and ignore repeats. Before changing a member's access, call the Transaction Status API and read OriginalTxnStatus and OriginalTxnStatusCode to confirm the final state of the payment.

  6. 6. Test, then go live

    Run renewals and failures against the staging API with the published test cards, force an endpoint error to watch the retry schedule, and replay events with the Push Webhook Event API. Switch to live credentials once every event type is handled.

Why recurring billing and signed webhooks matters

Slow endpoints cause duplicate work

A webhook that is processed synchronously can time out even when the work succeeds, so the same event arrives again and again. Without deduplication that can extend a membership twice or send repeated emails. Fast acknowledgement plus an idempotent handler removes the problem at the source.

Unverified webhooks are a security gap

Your webhook URL is public, so anyone who finds it can post a fake payment event. Checking the signature on every request, and confirming status through the API before granting access, stops forged notifications from unlocking paid content.

Recurring billing and signed webhooks use cases

Paid membership communities

Forums and member clubs grant access on a successful payment event and remove it on chargeback or expiry, with renewals and recovery handled by the subscription API.

Online courses and coaching

Course platforms bill monthly or annual tiers and use webhooks to unlock modules the moment a renewal clears.

Content subscriptions

Publishers and creators run recurring plans and keep paywalls in step with each member's billing status through signed notifications.

WooCommerce membership stores

WordPress sites use the Cardflo plugin for WooCommerce Subscriptions, which verifies notifications and updates orders without custom code.

Ready to route with Recurring billing and signed webhooks?

Talk to our team about a live rollout across our acquirer partners' rails.

Apply now

What you get with Recurring billing and signed webhooks

  • Subscription API endpoints to create plans, start, reactivate, deactivate and schedule updates to member subscriptions.
  • Subscription recovery rules that decide how failed renewals are retried before a membership lapses.
  • Signed JSON webhooks for payment, refund, refundFailed, capture, captureFailed, void, expired, chargeback and fraud events.
  • One webhook configuration covers every event type, so there is no need to register an endpoint per order or per member.
  • Every notification carries your txnReference, matching the reference you sent with the original transaction.
  • A published retry schedule of 15 attempts, from 6 seconds after the first failure to roughly 5.5 hours for the final attempt.
  • Push Webhook Event API to resend chosen events for a transaction once your endpoint is fixed.
  • Retrieve Webhook API, passing "all" as the webhook ID, to list every active endpoint on the account.
  • Webhook settings that can be viewed, configured and re-enabled at any time from the Cardflo Merchant Portal.
  • Official plugins and wrappers that reject notifications whose signature does not match, out of the box.
See Recurring billing and signed webhooks live across our acquirer partners.

A short scoping call, then a written plan for your MIDs.

Apply now

Questions about Recurring billing and signed webhooks

How do I verify a Cardflo webhook signature?

Each delivery includes three headers: x-cardflo-signature in the format sha256=<hex>, x-cardflo-timestamp in Unix seconds, and x-cardflo-event. The signature is an HMAC-SHA256 hex digest, keyed with your account's webhook secret, over the string <timestamp>.

<raw request body>. Recompute it from the timestamp header and the exact raw body, compare it with the received value in constant time, and reject the request on a mismatch.

This is signing, not encryption: the body is readable, and the signature proves it came from Cardflo unaltered.

How quickly must my endpoint respond to stop repeated delivery attempts?

Acknowledge each notification with HTTP 200 as soon as the signature check passes, then do the slow work, such as updating the member record or sending emails, in a background job.

Endpoints that do not respond in time are treated as failed and enter the retry schedule. If an endpoint stays unresponsive, Cardflo stops sending that event type and marks the webhook inactive until you re-enable it.

What is the webhook retry schedule?

Cardflo makes up to 15 attempts on Fibonacci-style intervals: 6, 10, 28, 78, 190, 406, 780, 1,378, 2,278, 3,570, 5,356, 7,750, 10,878, 14,878 and 19,900 seconds. After the final attempt the event type is unsubscribed from that endpoint without affecting your other event types.

You can re-enable it from the Merchant Portal.

How do I stop a retried webhook from renewing a membership twice?

Store the txnReference and event type of every notification you process and skip any repeat. Because retries resend the same event, this makes your handler idempotent.

Cardflo also recommends calling the Transaction Status API on receipt and using the OriginalTxnStatus and OriginalTxnStatusCode fields to confirm the actual state before granting or removing access.

Can I resend webhooks I missed while my server was down?

Yes. The Push Webhook Event API resends selected events, such as payment and refund, for a given transaction reference to your configured endpoint.

Re-enable the webhook in the Merchant Portal first if it was marked inactive, then replay the events you need.

Does Cardflo work with WordPress and WooCommerce membership sites?

Yes. Cardflo supports WooCommerce Subscriptions through its plugin, which handles signature checks and order updates from webhooks.

Sites built on a custom stack can use the subscription API and webhooks directly, and the same notifications are sent for hosted payment page and direct API integrations.

How is recurring billing priced?

Cardflo quotes pricing per merchant after reviewing your business model, volumes and card mix, with rates starting from 0.2%. Apply through the website and an advisor will confirm the commercial terms for your membership site.

Apply with Cardflo

Ready to improve your payments setup?

Tell us about your business. We'll match you with the right acquiring partners and the right route, typically inside a week.

Apply now
Apply now