Create a subscription
Create a new subscription for a customer using a subscription plan variation.
There are several supported flows for creating and activating subscriptions, depending on your integration needs.
Note
The customer must already exist in the API. The customer_id is required for all subscription flows.
Flow 1: Hosted Payment Page (HPP)
Use this flow to redirect the customer to Revolut's Hosted Payment Page to complete the first payment and save their payment method.
Backend flow:
- Create a subscription with optional
setup_order_redirect_url:- If provided: The setup order's
redirect_urlfield will be set to this value. - If omitted: The setup order will use Revolut's default redirect behavior.
- If provided: The setup order's
- The subscription is created in a
pendingstate with asetup_order_idin the response. - Retrieve the order using
setup_order_idas theorder_idin the path to get thecheckout_url. - Redirect the customer to the
checkout_urlfor the Hosted Payment Page.
Customer flow:
- Customer is redirected to Revolut's Hosted Payment Page.
- Customer completes payment on the HPP, and their payment method is saved.
- Customer redirect after payment depends on your setup:
- With
setup_order_redirect_url: Customer is redirected to your custom URL. - Without
setup_order_redirect_url: Customer sees the default Revolut completion screen.
- With
Key characteristics:
- Customer completes payment on Revolut's hosted page
- Payment method is automatically saved for future billing cycles
- Optional custom redirect after payment
- Best for web-based integrations
Flow 2: Widget or card-not-present (CNP) payment
Use this flow when you want to embed the payment experience directly on your website using one of Revolut's payment widgets or handle card-not-present payments.
Backend flow:
- Create a subscription with minimal required parameters.
- The subscription is created in a
pendingstate with asetup_order_idin the response. - Retrieve the order using
setup_order_idas theorder_idin the path to get order details for your integration. - Integrate your payment solution (widget, SDK, or CNP method) on your frontend, ensuring it's configured to save the customer's payment method for recurring billing.
Customer flow:
- Customer stays on your website/application.
- Customer completes payment, and their payment method is saved for future billing cycles.
Key characteristics:
- Payment experience embedded directly in your application
- Customer never leaves your website
- Payment method is saved for future billing cycles
- Best for native mobile apps or fully custom web experiences
Request
Response
Subscription created successfully