Create a recurring subscription
Create monthly billing terms and attach a tokenized payment method.
Confirm eligibility
Confirm Recurring Module access and the customer’s billing agreement. The module is not offered in PSD2-mandated regions. Sandbox supports configuration but does not execute scheduled charges.
Create the plan
This example uses twelve monthly payments. Replace the amount and schedule with the agreed terms. POST /api/v5/plans HTTP/1.1 Host: sandbox.nmi.com Authorization: <sandbox-private-key> Content-Type: application/json { "id": "membership-annual-12", "plan_name": "Membership monthly payments", "plan_amount": 29.00, "plan_payments": 12, "month_frequency": 1, "day_of_month": 1 }
Attach the payment method
Use a fresh token and the existing plan ID. This example follows the current endpoint schema, rather than the older nested plan_details recipe. POST /api/v5/subscriptions HTTP/1.1 Host: sandbox.nmi.com Authorization: <sandbox-private-merchant-key> Content-Type: application/json { "plan_id": "membership-annual-12", "payment_details": { "payment_token": "<fresh-sandbox-token>" }, "paused_subscription": true }
Verify before activating
The example intentionally creates a paused subscription. Confirm its ID, schedule and state. Coordinate activation and cancellation in your application; do not treat creation as payment receipt. Subscription lifecycle and cancellation