Enable recurring payments

Enable recurring payments

About recurring payments

Recurring payments allow you to debit your customer’s account with a fixed or variable amount on a regular basis for the recurring services. You can also use recurring payments for single debit transactions.

The recurring services include:

  • Membership fees
  • Subscription to a regular or varying service
  • Registration within a shop to avoid re-entering of payment data
  • Trial period, which require an initial registration for a later service

Recurring payments is accepted in the following two ways:

  1. Accepting recurring payments without the customer being present during the transaction.
  2. Saving a customer’s payment method and corresponding details only for the [Accept payments with a payment page](/online-payments/payment-pages/

To accept recurring payments for a subscription service:

  1. The Embedded Payment Page or Hosted Payment Page opens.
  2. The customer selects one of the payment methods supported.
  3. The customer enters the payment method and corresponding details.
  4. The customer selects Save for later use.
    The returning customer can use the saved and pre-filled payment method, without having to re-enter their payment details.

Supported payment methods

The following payment methods support recurring:

Accept recurring payments

To accept recurring payments, make a POST call to types/<paymentId>/recurring, with a private key and the following parameters in the request body:

Parameter Required Type Description Example
returnUrl Yes String Needed for redirect payments and credit card payments if 3-D Secure is used. https://www.unzer.com
customerId No String The ID of the customers resource to be used.
metadataId No String The ID of the related metadata resource.
POST https://api.unzer.com/v1/types/<paymentId>/recurring

  "returnUrl" : "https://www.unzer.com"
    "isSuccess": false,
    "isPending": true,
    "isError": false,
    "redirectUrl": "https://api-payment.unzer.com/v1/redirect/3ds/s-I98KIK9alGzO",
    "message": {
        "code": "COR.000.200.000",
        "customer": "Transaction pending"
    "returnUrl": "https://www.unzer.com",
    "date": "2019-03-07 11:42:47",
    "resources": {
        "customerId": "",
        "metadataId": ""
    "processing": {
        "uniqueId": "31HA07BC8110C3EE06224EB9C3FC44C2",
        "shortId": "4158.8536.7528"
Property Type Description
isSuccess Boolean Set to true if the transaction was successful.
isPending Boolean Set to true if the transaction is pending
(e.g. if a redirect to an external system is required).
isError Boolean Set to true if an error occurs.
redirectUrl String The URL to which the customer gets redirected after the payment.
message String An error message describing the error in more detail.
code String A unique ID of the message.

For details, go to Error handling.
customer String Message displayed to the customer.
returnUrl String The URL to redirect the customer to after the payment is completed.
date String Date and time of the transaction.
resources Object The details linked to the payment.
customerId String The ID of the customers resource.
metadataId String The ID of the related metadata resource.
processing Object The process details of the related payment.
uniqueId String The ID of the transaction process.
shortId String The short ID of the transaction process.

Registering a credit card

For more details on recurring payments, see credit cards.

Registering a Paypal

To register Paypal as a recurring payment, implement the following flow:

  1. The customer goes to PayPal settings and enables a flag to allow recurring payments without customer interaction on their account.
  2. Create a new PayPal /types/<pay_pal_id>/recurring resource.
  3. Redirect the customer to the redirect URL.
  4. The customer logs in to their PayPal account and chooses their preferred payment option.
  5. After the customer enters their payment details, the PayPal types resource is successfully registered as recurring.
  6. Paypal can be used for direct charges without further customer interaction.

Registering Unzer Direct Debit

To use the recurring feature for Unzer Direct Debit, implement the following flow:

  1. Make a POST call to payments/charges.
  2. After a successful charge, Unzer Direct Debit resource is automatically set as recurring.