Skip to main content
POST
Create a new Payment Contract

Scheduled Payments Guide

Complete guide with examples, contract lifecycle and timezone handling

Body

application/json

Contract data

Input model for creating a payment contract

templateId
string<uuid>
required

Reference to template this contract is based on

name
string
required

User-friendly contract name

Maximum string length: 128
tokenId
string
required

Reference to tokenized payment method

Maximum string length: 32
chargeRequestData
object
required

Charge request data for scheduled payments (excludes PAN/CVV which come from token)

startDate
string<date-time>
required

When payments should begin

endDate
string<date-time> | null

Optional end date

maxOccurrences
integer<int32> | null

Optional maximum number of payments

Required range: 1 <= x <= 2147483647
merchantTimezone
string | null

Optional merchant timezone (IANA format, e.g., "America/New_York") If not specified, uses template's DefaultTimezone

Maximum string length: 50
cardholderTimezone
string | null

Optional cardholder timezone (IANA format, e.g., "America/New_York") If not specified, uses template's DefaultTimezone

Maximum string length: 50
metadata
string | null

Optional custom metadata (JSON)

Response

OK

Full output model for payment contract details

tokenId
string | null

Reference to tokenized payment method

chargeRequestData
object

Charge request data for scheduled payments (excludes PAN/CVV which come from token)

merchantTimezone
string | null

Merchant timezone (IANA format, e.g., "America/New_York")

cardholderTimezone
string | null

Cardholder timezone (IANA format, e.g., "America/New_York")

metadata
string | null

Optional custom metadata (JSON)

template
object

Brief template info for contract output

id
string<uuid>

Unique identifier

templateId
string<uuid>

Reference to template this contract is based on

templateName
string | null

Template name

name
string | null

User-friendly contract name

startDate
string<date-time>

When payments should begin

endDate
string<date-time> | null

Optional end date

maxOccurrences
integer<int32> | null

Optional maximum number of payments

currentOccurrences
integer<int32>

Number of successful payments executed

nextPaymentDate
string<date-time> | null

Next scheduled payment date

status
enum<string>

Status of a payment contract

Available options:
Active,
Paused,
Cancelled,
Completed
createdAt
string<date-time>

Creation timestamp

updatedAt
string<date-time>

Last update timestamp

lastExecutedAt
string<date-time> | null

Timestamp of last successful payment execution