# Recurring Payments

The **Recurring Payments** engine securely stores customer information, including e-mail address, billing address, first name, and last name.

The [Recurring Payments Service](https://app.gitbook.com/s/j9heLdoDRsfnChUQohvj/api/payments/cards/recurring-payments-service "mention") allows you to:

* Create customers and customer tokens for future payment process.
* Schedule payment plans at various frequencies.
* Automatically process payments according to the defined schedule.

### Prerequisites

To process recurring payments, ensure you have following:

✅ An active Xplor Pay account.

{% hint style="info" %}
Contact to [Xplor Pay](https://xplorpay.com/contact/) to create an active account.
{% endhint %}

✅ API access key issued to you by Xplor Pay.

{% hint style="info" %}
Visit [Let's Get Started - Xplor Pay](https://xplorpay.com/getting-started/) to get API access key.
{% endhint %}

{% stepper %}
{% step %}

### Create customer

To create a customer:

1. Use the POST method.
2. Send the customer request to the [Customer](https://app.gitbook.com/s/j9heLdoDRsfnChUQohvj/api/payments/cards/recurring-payments-service/customer "mention") endpoint with required fields.

The success response returns the customer key in the `customer-key` field.
{% endstep %}

{% step %}

### Create customer token

To create a customer token:

1. Use the POST method.
2. Include the `customer-key` in the request header for authentication.

See the `customer-key` field in the successful response from the create customer endpoint.

3. Send the request to the [Customer Token](https://app.gitbook.com/s/j9heLdoDRsfnChUQohvj/api/payments/cards/recurring-payments-service/customer-token "mention") URL with required fields.

The success response returns the customer payment token and card details.
{% endstep %}

{% step %}

### Create payment plan

To create a payment plan:

1. Use the POST method.
2. Send the request to the [Payment Plans](https://app.gitbook.com/s/j9heLdoDRsfnChUQohvj/api/payments/cards/recurring-payments-service/payment-plans "mention") endpoint URL with required fields.

The success response returns the `plan-key` for specified date range payment frequency that confirm the payment plan is created and activated for the customer.

{% hint style="info" %}
See [Recurring Payments Service](https://app.gitbook.com/s/j9heLdoDRsfnChUQohvj/api/payments/cards/recurring-payments-service "mention") for more information.
{% endhint %}
{% endstep %}
{% endstepper %}
