Recipes
Accept subscription payments
Bill a customer automatically every week, month or year with a Recurring Plan.
A Recurring Plan creates one transaction per cycle from the customer's connected account. You set the amount, the frequency and how many cycles to run; DRUO creates each payment on schedule.
- 1Connect the customer's bank account once (see the account-on-file recipe) and keep its uuid.
- 2Create the plan with POST /recurring-plans/create. Set
processing_methodto AUTOMATIC to charge without asking each time, orSEND_REQUESTto ask the customer to approve every cycle. - 3Choose
cycle_frequency(DAILY, WEEKLY, MONTHLY,SEMI_ANNUALLYor YEARLY) and eithertotal_cycle_countorend_date. - 4Listen for
Transaction.successfulandTransaction.failedwebhooks to keep each billing period in sync.
Node.js — create a monthly plan
const plan = await fetch("https://api.druo.com/recurring-plans/create", {
method: "POST",
headers: {
Authorization: `Bearer ${accessToken}`,
"DRUO-Version": "2021-11-22",
"Content-Type": "application/json",
},
body: JSON.stringify({
description: "Pro plan — monthly",
processing_method: "AUTOMATIC",
cycle_frequency: "MONTHLY",
start_date: "2026-12-01T00:00:00.000Z",
total_cycle_count: 12,
existing_end_user_id: "eur_ff6c5094-1cd1-11ec-9621-0242ac130002",
origin_account_id: "acc_7985e8a4-8f38-4eab-8b27-a5d1c6dbf340",
transaction: {
tenant_id: "ten_0521aadc-5fbd-4b3c-af0a-a4f4b8d6f20a",
type: "PAYMENT",
amount: 2900,
currency: "USD",
statement_descriptor: "NOVO* PRO PLAN",
primary_reference: "sub_771",
},
}),
}).then((r) => r.json());Manage the plan
| Action | Endpoint |
|---|---|
| Pause billing | PUT /recurring-plans/{recurring_plan_uuid}/pause |
| Resume billing | PUT /recurring-plans/{recurring_plan_uuid}/activate |
| Cancel for good | PUT /recurring-plans/{recurring_plan_uuid}/cancel |
| Check the plan | GET /recurring-plans/{recurring_plan_uuid} |
If a cycle fails, the plan keeps running. Decide in your
Transaction.failed handler whether to retry, notify the customer or pause the plan.
