Update or Create Order

Creates a new order or updates an existing one (upsert). If orderId is omitted from the URL, one is auto-generated.

The order type is determined by the data provided:

  • Include a paySchedule object with an amount to create a Payment Plan (finite, ends when paid in full).
  • Include a paySchedule object without an amount to create a Subscription (recurring indefinitely until cancelled).
  • Omit paySchedule entirely to create an Unscheduled order (simple one-time invoice).

When providing pay schedule data for the first time, paySchedule.frequency and paySchedule.recurringAmount are required. When updating an existing pay schedule, both fields are optional (existing values are preserved). The reminderBeforeDueDays and retryAfterDueDays arrays must contain positive integers that do not exceed the frequency's maximum offset days (daily: 0, weekly: 6, monthly: 27, yearly: 364).

Path Params
string
required

The merchant ID

string
required

The string identifier for the order with max of 40 characters.

Body Params
string | null

Unique identifier for the order

string | null

Description of the order

number | null

Total amount of the order

string

Currency of the order amount in ISO 4217 format

paySchedule
object | null

Payment schedule for the order

string

List of customers associated with this order

Headers
string
Responses

Language
Credentials
Bearer
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json