Skip to content

Scheduled Payments

ElasticPay supports two ways to schedule a payment for a future date:

  1. Payment Plans — the system automatically generates and processes recurring payment intents on your behalf (weekly, monthly, etc.)
  2. Direct PI scheduling — you create a single payment intent now and set scheduled_payment_date to a future date; the system processes it automatically on that date

This guide covers direct PI scheduling. For a full reference of payment plan lifecycle management, see Payment Plans API.

  • A saved payment method (pm_xxx) must be attached to the intent at create time. Transient tokens (from the widget) are not accepted because the customer will not be present at processing time.
  • The date must be today or in the future, and within 365 days of today, in your time zone (or on the customer’s test clock). A payment plan’s dates follow the same rule.

If you don’t have a saved pm_xxx yet, create a Setup Intent to collect and save the customer’s card:

Terminal window
curl -X POST https://api.elasticpay.co/api/v1/setup_intents \
-H "Authorization: Bearer sk_sandbox_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"customer_id": "cus_0abc123def456"}'

Pass the client_secret to the payment widget. After the customer completes the form, the saved method pm_xxx is available on the customer record.

Step 2 — Create a scheduled payment intent

Section titled “Step 2 — Create a scheduled payment intent”
Terminal window
curl -X POST https://api.elasticpay.co/api/v1/payment_intents \
-H "Authorization: Bearer sk_sandbox_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"amount": 9900,
"currency": "AUD",
"customer_id": "cus_0abc123def456",
"payment_method": "pm_0xyz789abc123def456ghi012jkl",
"scheduled_payment_date": "2026-07-01"
}'

The response will have status: "requires_confirmation" and scheduled_payment_date: "2026-07-01".

Step 3 — Confirm to lock in the schedule

Section titled “Step 3 — Confirm to lock in the schedule”
Terminal window
curl -X POST https://api.elasticpay.co/api/v1/payment_intents/pi_0abc123/confirm \
-H "Authorization: Bearer sk_sandbox_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{}'

Because the date is in the future, the response status will be ready — the payment is queued for automatic processing on scheduled_payment_date. No further action is needed.

A payment intent in ready status has been confirmed and is waiting for its scheduled date.

Status Meaning
ready Confirmed, waiting for scheduled date
processing Submitted to PSP
succeeded Payment collected
failed Payment declined or errored

If a problem on our side stops a scheduled payment being sent on its date, it stays ready and we keep trying while we fix the cause. Nothing is charged until it’s sent, and you don’t need to do anything: it’s collected once it goes through.

Subscribe to these events to monitor scheduled payment activity:

Event When
payment_intent.succeeded Scheduled payment collected successfully
payment_intent.failed Payment declined or failed
payment_intent.processing Submitted to PSP, awaiting result

See Webhooks for how to handle these events.