Recurring Payments

Recurring payments enable you to collect customer’s card funds either periodically or on demand, after the customer authorizes the initial payment. Recurring payments are suitable for subscriptions or for services charging a monthly fee.

The payment gateway provides you with 2 types of recurring payments. The first type is called an automatic recurring payment. When the initial payment is created, you can set a recurring period and then the following payments are produced automatically. The second type is called an on demand recurring payment. Each of the following payment has to be collected by your REST API request. On demand recurring payments enable you to manage the amount of money and the time for the payment to be collected.

Our tip: Reccuring payments are activated on test (sandbox) enviroment. If you want to get your recurring payments activated on pruduction enviroment, contact GoPay customer support first, so that your recurring payments will be allowed.

Automatic recurring payments

To create an automatic recurring payment it is necessary for you to make a REST API request. The setup of the recurring payment is defined by the recurrence object, using the following parameters: recurrence_cycle, recurrence_period and recurrence_date_to. The recurrence_cycle parameter defines the recurrent payment cycle with DAY, WEEK, MONTH values. The recurrence_period parameter extends the recurrence_cycle parameter. The recurrence_period parameter enables you to set the recurring period for the particular cycle. For instance, if the recurrence_cycle is set to DAY and recurrence_period is set to 3, the recurring payment will be made every third day. The last important parameter is recurrence_date_to which determines the due date of the recurring payment. The system will automatically collect this payment until that date. The recurrence_date_to parameter must exceed the value of the current date and it must be lower than 2099-12-31.

Our tip:

It’s necessary to get a recurring payment settlement authorized with a token. For information about getting token access, see the How Do I Integrate the Payment Gateway? article.

When do I use automatic recurring payments?

Automatic recurring payments are suitable for services charging a fixed amount of money, for instance subscriptions to magazines (the price doesn’t change).


On demand recurring payments

You can make an on demand recurring payment with the same REST API request as you do when making the automatic recurring payment, but the settings of the recurrence_cycle parameter is different. The value of the recurrence_cycle parameter is ON_DEMAND.

To collect the following payments, make a REST API request which enables you to specify the following for your payment: amount, order_number, order_description, items or additional payment parameters additional_params. The object which defines the payment status and other parameters of the new payment created, is returned as a response to creating of the new payment.

Our tip: We recommend at least 3 tries to make recurrence on parent payment. If they are all unsuccessful you can cancel the recurrence.

When do I use on demand recurring payments?

On demand recurring payments are suitable for services which are paid for irregularly, or which are paid for according to scope of service.

Making the payment

The response to the recurring payment settlement is an object defining the status of the new payment created, which also carries the gw_url parameter. You can use this parameter to initiate either the inline payment gateway, or the redirect option of the payment gateway.

It’s necessary for the customer to make (=pay) this payment (which is actually a new recurring payment settlement), so that they authorize the following automatic recurring payments to be made.


Standard http notifications inform about the following payments, see the notification section in How Do I Integrate the Payment Gateway?

Moreover, the following payment notification contains GET parent_id parameter with the id of the payment being created.

Our tip:

If you want to receive HTTP notification in case customer's cancelation of recurring payment please contact our technical support on e-mail

Was this article helpful?:

Are you looking for something else?

Contact support specialist