Create a payment plan
/payment_plansBody Parameters
customerstringID of the customer that the plan should belong to.
card_tokenstring(optional)The token for a card to link this payment plan to
amountinteger (int32)Recurring payment amount in the smallest unit of the currency.
setup_feeinteger (int32)(optional)Setup fee to be charged upon creation of the payment plan.
frequencystringFrequency of the payments. Acceptable values are: Daily, Weekly, Fortnightly, Monthly, 4 Weekly, Quarterly, Half Yearly, Annually.
payment_methodstringPayment method for the plan - this can be Credit Card or Direct Debit. Note that if the customer is not setup with the defined payment method an error will be returned.
anniversaryinteger (int32)Anniversary of the recurring payments. For Weekly and Fortnightly payments this will be the day of the week (1 - Monday, 2 - Tuesday, 3 - Wednesday, 4 - Thursday, 5 - Friday) For Monthly this will be the day of the month. If the day of the month is greater then 28, and the month is shorter then the anniversary this date will be moved forward to the nearest possible date (i.e. a payment for the 31st will fall on the 30th for monthly like September etc).
start_datestring (date)Date that the payment plan should start. This must be in the future.
end_datestring (date)(optional)Date that the payment plan should end on. This must be in the future and greater than the start_date.
referencestring(optional)Reference for the payment plan.
descriptionstring(optional)Description for the payment plan (e.g. Model 200R Blender Lay-by).
currencystring(optional)ISO 4217 currency code for the plan.
total_countinteger (int32)(optional)Total number of payments to process for this plan.
total_amountinteger (int32)(optional)Total amount of all payments to be processed for this plan.
failed_payment_feeinteger (int32)(optional)· Defaults to 0Fee that applies to the retried payment in the event of any declined payment. Note: This amount will compound for the total number of retries (3) performed.
retry_intervalinteger (int32)(optional)· Defaults to 3Number of days between payment retries for any declined payments.
Request
curl https://gateway.pmnts-sandbox.io/v1.0/payment_plans -u TEST:TEST -X POST -d '
{
"customer": "071-C-JE34F66V",
"amount": 100,
"frequency": "Weekly",
"payment_method": "Credit Card",
"anniversary": 5,
"start_date": "2025-07-16",
"total_count": 2
}'Response
{
"successful":true,
"response":{
"id":"071-PP-8389G3DA",
"customer":"071-C-JE34F66V",
"amount":100,
"currency":null,
"setup_fee":0,
"frequency":"Weekly",
"anniversary":5,
"start_date":"2025-07-16",
"end_date":null,
"total_count":2,
"total_amount":null,
"payment_method":"Credit Card",
"reference":"071-PP-8389G3DA",
"description":null,
"status":"Active",
"status_reason":"None",
"created_at":"2018-07-11T16:23:39+10:00",
"failed_payment_fee":0,
"retry_interval":3,
"status_change_date":null,
"card_token": "ABC12345",
"payments":[
{
"id":"071-PT-WQ8LIHI4",
"payment_plan":"071-PP-8389G3DA",
"reference":"071-PP-8389G3DA-0001",
"amount":100,
"currency":null,
"scheduled_date":"2025-07-18",
"payment_method":"Credit Card",
"status":"Scheduled",
"result":null,
"records":[]
},
{
"id":"071-PT-QNFQFYW2",
"payment_plan":"071-PP-8389G3DA",
"reference":"071-PP-8389G3DA-0002",
"amount":100,
"currency":null,
"scheduled_date":"2025-07-25",
"payment_method":"Credit Card",
"status":"Scheduled",
"result":null,
"records":[]
}
]
},
"errors":[],
"test":true
}{
"successful":false,
"response":{
"id":"071-PP-UV4ZJECK",
"customer":"071-C-JE34F66V",
"amount":100,
"currency":null,
"setup_fee":0,
"frequency":"Weekly",
"anniversary":5,
"start_date":"2025-07-16",
"end_date":null,
"total_count":2,
"total_amount":null,
"payment_method":"Debit Card",
"reference":"071-PP-UV4ZJECK",
"description":null,
"status":"Active",
"status_reason":"None",
"created_at":null,
"failed_payment_fee":0,
"retry_interval":3,
"status_change_date":null,
"payments":[]
},
"errors":["Payment method is not valid"],
"test":true
}