Recurring payments
The gateway can charge customers on a schedule using stored cards. If you use the gateway's customers, stored cards, plans, and subscriptions, it manages the billing schedule for you. You can also run the schedule yourself and charge a stored card when it's due.
Recurring payments suit:
- Software and service businesses that bill customers regularly
- Businesses that collect payment in several installments
Stored customers and cards
Save a customer and their card once, then reference them for future payments. In the API a customer is called a shopper. In the merchant portal they appear as customers.
- 1Create the customer with a POST to
/shoppers(full name is required; address, phone, email, and company are optional). - 2Save the card with a POST to
/stored-cards, linked to the customer. - 3Use the stored card in later transactions instead of the card number.
Plans and subscriptions
A plan defines what you charge and how often. A subscription signs a customer's stored card up to a plan.
Create a plan
| Field | What it is |
|---|---|
| name | The plan's name (required) |
| billingInterval.timeUnit | day, week, month, or year |
| billingInterval.count | How many time units between bills, such as 1 month or 2 weeks |
| total.amount and total.currencyCode | The amount of each bill, not counting any introductory bills (required) |
| billCount | How many bills the plan runs for in total |
POST https://<sandbox-api-host>/plans
{
"name": "Pro monthly",
"billingInterval": { "timeUnit": "month", "count": 1 },
"total": { "amount": "49.00", "currencyCode": "USD" }
}Create a subscription
POST to /subscriptions with the plan and the customer's stored card. The gateway then charges the card each billing period. You can update or cancel subscriptions through the API or the merchant portal, and choose whether customers get email receipts.
Scheduled payments you manage
If you run the schedule yourself, send the first payment through /transactions with the card details and credentialOnFileType set to subscription. Save the card, then charge the stored card for each later payment. This tells the card networks that the payments are part of an agreed series.
Card-on-file payments
For customer-started payments that aren't on a fixed schedule (for example, a saved card used for a new order), set credentialOnFileType to unscheduled on the first payment, then use the stored card for later ones.
Note
shopperInteraction to mailOrder or telephoneOrder. Full field lists come with your sandbox access. Create a developer account.Gateway services in this section are provided through ONKORE's processing partner, Elavon. Developer accounts, sandbox and production credentials, the developer portal, and the merchant portal are provided by Elavon, so you'll see the Elavon name in those emails, portals, and API addresses. ONKORE remains your point of contact.
