For the complete documentation index, see llms.txt. This page is also available as Markdown.

Subscriptions Via Tokenization (API)

In this article, you will learn how to accept recurring payments (subscriptions) in Payrexx using tokenization via the API.

The acronym "API" stands for Application Programming Interface. It refers to a set of commands, functions, and protocols that allow a software application to interact with another system.

What is Tokenization?

Tokenization involves storing a payment method for future payments. You can learn about the benefits of tokenization and how to set it up in Payrexx in the following article:

Tokenization

Payrexx offers two ways to set up subscriptions:

  1. Payrexx-managed subscriptions: Payrexx automatically handles charges, payment reminders, and customer notifications.

  2. Subscriptions via tokenization: Processing is managed via the API, which is explained in this article.

Who is the API method suitable for?

With the API option, you manage charges and notifications entirely yourself. This method is particularly suitable if:

  • Your recurring payments do not follow a fixed schedule (varying intervals or timing)

  • Your customers should not be bound by long-term commitments

  • The amount to be billed is variable (e.g., pay-per-use)

If your subscriptions are consistent in terms of timeframe, product, price, and payment method, the Payrexx-managed option is generally recommended, as it can be set up without technical expertise.

How Does It Work?

The process consists of three steps:

  1. Token Creation: During the customer's initial interaction, a token is created via the Payrexx Gateway using the preAuthorization parameter instead of processing a one-time payment. Optionally, an initial charge can be triggered immediately afterward using the chargeOnAuthorization parameter.

  2. Retrieve Transaction ID: Following authorization, you receive the corresponding transaction ID either via the Transaction Webhook or by querying the gateway via the API (status: authorized).

  3. Trigger Charge: Using the transaction ID, you can charge custom amounts as often as needed via the endpoint for capturing pre-authorized transactions.

Key features of this method:

  • A custom amount can be specified for each charge.

  • There is no guarantee of success for an individual charge.

  • Once created, a token does not expire.

Technical Information

Technical information and instructions for enabling subscription payments through tokenization can be found in the relevant article in our developer documentation:

Frequently Asked Questions

In which cases are the webhooks "Transaction" and "Subscription" triggered for subscriptions?
  • Cancellation: The "Subscription" webhook (status: cancelled) is triggered.

  • Updating a payment method: The "Subscription" webhook with the new token data is triggered.

  • Charge: The "Transaction" webhook is always triggered. If the charge is successful, the "Subscription" webhook is additionally triggered with the updated billing date (next_pay_date).

Is it possible to cancel a subscription at the next expiration date via the API?

No, the API only supports the immediate deletion of a subscription (DELETE). Cancellation effective at the end of the billing period can only be configured in the Payrexx merchant administration, not via the API.

Is it possible to update a customer’s address data via the API?

No, address data is tied to the payment process and cannot be updated independently via the API.

When does Payrexx send confirmation emails?

If the sending of confirmation emails is enabled under Settings > Notifications, Payrexx will send the emails. If the setting is disabled, Payrexx will not send any emails.

Last updated

Was this helpful?