Membership & Direct Debit
When a trial lead reaches Trial Complete status, the instructor can send them a membership offer SMS. The parent follows a secure link, fills in a short form, and is directed to GoCardless to set up a Direct Debit mandate — all without leaving the browser.
How it works
- Lead reaches Trial Complete in the pipeline
- Instructor sends the Trial Conversion Offer SMS from the lead's detail sheet
- Parent receives a personalised link:
https://yourclub.r4ptor.app/membership?t=TOKEN - Parent fills in their address and accepts three consents (photo, cancellation policy, membership confirmation)
- Parent is redirected to GoCardless to set up their Direct Debit mandate
- On return, a Tasks notification is created for the instructor: "Set up GoCardless subscriptions for [name]"
- When the mandate is confirmed by the bank (
mandates.activewebhook), the lead is automatically converted to Converted
The membership form
The form is token-secured — it cannot be accessed without the unique link sent via SMS. It pre-fills all known information from the trial record so parents don't re-enter data.
What the form collects
| Field | Notes |
|---|---|
| Home address | Required for GoCardless |
| Photo consent | Optional opt-in |
| Cancellation policy acknowledgement | Required |
| Membership confirmation | Required |
Fee display
The form shows the applicable monthly fee based on the student's class:
| Class type | Fee setting |
|---|---|
| Snakes & Cranes | MEMBERSHIP_FEE_SNAKES_CRANES |
| Juniors | MEMBERSHIP_FEE_JUNIORS |
| Teens | MEMBERSHIP_FEE_TEENS |
| Unknown / other | All tiers shown as fallback |
The annual affiliation / insurance fee (AFFILIATION_FEE_JUNIOR) is also shown.
GoCardless integration
Each r4ptor instance connects directly to the club's own GoCardless account — there is no shared payments infrastructure.
Setup
- Create a GoCardless account at gocardless.com
- In the GoCardless dashboard, go to Developers → API Keys and copy your access token
- In r4ptor: Admin → Settings → set
GC_ACCESS_TOKENandGC_ENVIRONMENT(sandboxorlive) - In GoCardless: go to Developers → Webhooks → create a new endpoint:
- URL:
https://yourclub.r4ptor.app/api/membership/webhook - Events:
mandates - Copy the webhook secret
- URL:
- In r4ptor: Admin → Settings → set
GC_WEBHOOK_SECRET
What r4ptor manages
| Action | When |
|---|---|
| Creates GoCardless redirect flow | When parent submits membership form |
| Stores mandate ID and customer ID | When parent completes GoCardless flow |
| Creates instructor task | Immediately — mandate is ready for subscriptions |
| Converts lead to member | When mandates.active webhook fires (bank confirmed) |
What the instructor manages in GoCardless
Once the task appears, log in to GoCardless and manually create:
- Monthly training subscription against the new mandate
- Annual Membership/Insurance subscription against the same mandate
This is intentional — it gives the instructor flexibility for custom arrangements (family discounts, payment plans, etc.) and keeps a human in the loop for financial setup.
Tasks
When a mandate is successfully created, a High priority task is automatically added to the instructor's Tasks list:
Set up GoCardless subscriptions for [First Last] Mandate
MD0…is ready. Log in to GoCardless and create:
- Monthly training subscription
- Annual Membership/Insurance subscription
See Tasks for how to manage these.
Webhook configuration
The webhook endpoint is per-instance — each club handles their own GoCardless events. Signature verification is enforced when GC_WEBHOOK_SECRET is set (strongly recommended for live environments).
| Setting | Description |
|---|---|
GC_ENABLED | true / false — enables the GoCardless flow |
GC_ENVIRONMENT | sandbox or live |
GC_ACCESS_TOKEN | Your GoCardless API key |
GC_WEBHOOK_SECRET | Webhook signing secret from GoCardless dashboard |
AppSettings reference
| Key | Description |
|---|---|
GC_ENABLED | Enable the GoCardless mandate flow |
GC_ENVIRONMENT | sandbox for testing, live for real mandates |
GC_ACCESS_TOKEN | GoCardless API access token |
GC_WEBHOOK_SECRET | Webhook HMAC secret for signature verification |
MEMBERSHIP_FEE_SNAKES_CRANES | Monthly fee for Snakes & Cranes class (£) |
MEMBERSHIP_FEE_JUNIORS | Monthly fee for Juniors class (£) |
MEMBERSHIP_FEE_TEENS | Monthly fee for Teens class (£) |
AFFILIATION_FEE_JUNIOR | Annual membership/insurance fee (£) |
UNIFORM_STORE_URL | Optional link to kit/uniform shop shown on confirmation page |