Skip to main content
Version: Live

Making a payment using subscription

A payment subscription involves paying for ongoing use of a service or product. This guide will walk you through how to make a payment using subscription.

Request​

In this example, Pat Johnson has purchased an ongoing subscription to Lawn Care Digest. Pat will be charged $5.00 every month from his tokenized method on file, until he cancels his subscription.

GraphQL
mutation {
createRecurringPayment(input: {
amount: 500, # Amount in pennies
merchant_uid: "", # Insert merchant_uid
payment_interval: MONTHLY,
payment_method_id: "", # Insert tokenized payment method
recurring_name: "Lawn Care Digest",
payor: {
full_name: "Pat Johnson",
email: "patjohnson@pat_johnson.io"
}
}) {
amount_per_payment
payment_interval
recurring_id
}

}
Additional Parameters

View the extensive list of parameters for recurring payments in our API.

View All Parameters

Return​

The call will return the newly created recurring payment.

JSON
{
"data": {
"createRecurringPayment": {
"amount_per_payment": 500,
"payment_interval": "MONTHLY",
"recurring_id": "pt_rec_XXXXXXXXX",
}
}
}

Next Steps​

You can also refer to create a payment plan, or if you are looking to update a recurring payment's payment method refer to update recurring payments.