This feature is currently in beta and requires a data migration. To get access, please contact us.
- A provider_customer_id, linking the Lago customer to their PSP record (e.g., cus_abc123 in Stripe)
- A provider_method_id, which identifies the specific payment instrument stored in the PSP
How payment methods are created
There are four ways a payment method can be created and stored.1. Checkout URL
This is the primary path for new customers. When a customer is created in Lago with a payment provider assigned andsync_with_provider set to true, Lago:
- Creates a corresponding customer record in the PSP.
- Emits a
customer.checkout_url_generatedwebhook containing a checkout URL. - You redirect the customer to this URL.
- The customer completes the form — no funds are collected at this stage.
- Once confirmed, the PSP securely stores the payment method for future transactions.
2. Syncing an existing PSP customer
If the customer already exists in the PSP with a payment method on file, you can link them to Lago without going through the checkout flow. By settingsync_with_provider to false and providing the existing provider_customer_id, Lago will retrieve the default payment method stored in the PSP and attach it to the customer. No checkout URL is generated.
This is useful when migrating customers from another billing system, or when the customer and their mandate/card already exist in Adyen or GoCardless.
3. Generate a new checkout URL
Once the customer is connected to a PSP, you can generate new checkout URL at any time to capture new payment method:- Dashboard
- API
To generate a new checkout URL:
- Navigate to the customer’s information tab; 2.In payment methods section, click on Add a payment method
- Click Generate link — Lago requests a new checkout URL from the PSP;
- Copy the generated URL and share it with your customer.
4. Auto-capture from Payment link
When an invoice has apending or failed payment status, you can generate a one-off payment checkout link:
How payment methods are assigned to billing objects
You can define a payment method when creating:- A subscription
- A one-off invoice
- A wallet top-up (purchased or recurring)