Order now

Charge the saved payment method and place a Shopify subscription's next order early with the Subscriptions REST API, without ever charging twice.

Last updated: 2026-11-09

Order now charges the customer's saved payment method and places the subscription's next order right away. The order after it stays on the usual schedule.

Place the next order now

1

Read upcoming orders

Take cycle_index and scheduled_at from the first order in orders.

2

Send order_now

Send them as billing_occurrence with a new Idempotency-Key. Keep that key.

3

Repeat until it settles

While the payment settles the answer is 202 processing. Send the identical request, with the same key, every few seconds until it answers 200.

Order now
curl "https://api.chargezen.com/v1/customers/8f14e45f-ceea-467f-a0e6-0e1c2f4b9d3a/subscriptions/48213/upcoming_orders" \
  -H "X-Chargezen-Key-Id: $CHARGEZEN_KEY_ID" \
  -H "Authorization: Bearer $CHARGEZEN_SECRET"
# orders[0]: "cycle_index": 4, "scheduled_at": "2026-12-02T00:00:00Z"

KEY=$(uuidgen)
curl -X POST "https://api.chargezen.com/v1/customers/8f14e45f-ceea-467f-a0e6-0e1c2f4b9d3a/subscriptions/48213/order_now" \
  -H "X-Chargezen-Key-Id: $CHARGEZEN_KEY_ID" \
  -H "Authorization: Bearer $CHARGEZEN_SECRET" \
  -H "Idempotency-Key: $KEY" \
  -H "Content-Type: application/json" \
  -d '{ "billing_occurrence": { "cycle_index": 4, "scheduled_at": "2026-12-02T00:00:00Z" } }'

Answers

StatusBodyWhat to do
202{ "status": "processing" }The payment is settling. Repeat the identical request with the same Idempotency-Key in a few seconds.
200{ "status": "placed", "next_charge_at": "…" }Charged and placed. next_charge_at is the new next charge.
200{ "status": "needs_payment_approval", "payment_approval_url": "…" }The customer's bank wants them to approve the payment. Send them the link.

Repeating the request with the same key returns the outcome and never charges again. A successful charge sends the customer your renewal confirmation email and text, as your notifications are set up, and ends any payment retries in progress for that subscription.

When nothing is charged

CodeWhat happened
INVALID_BILLING_OCCURRENCEThe order you named is no longer the next one, for example after a skip or a reschedule. Read upcoming orders again.
ORDER_NOW_PAYMENT_FAILEDThe payment didn't go through. The message gives the reason. Check the payment method on file.
Paid, but the date isn't confirmed

CUSTOMER_SUBSCRIPTION_OUTCOME_UNKNOWN means the payment went through but Chargezen couldn't confirm the next order date. Read the subscription before you make another change.

Was this page helpful?

Need more help? Contact support