Store credentials only
Learn how to store credentials for future use via Hosted Checkout
Use this for: recurring payments via Card, Apple Pay, Google Pay, or Pay by Bank (VRP).
This setup is used when you want to save a customer's payment credentials for future use without taking a payment upfront. This is common for merchants who:
- Offer free trials followed by a recurring charge
- Set up payment details during onboarding but charge at a later date
- Collect a mandate for Variable Recurring Payments (VRP) via Pay by Bank
1. Storing Card, Apple Pay and Google Pay Credentials
For this scenario:
transaction.capture
must be set tofalse
is_recurring
must be set totrue
to indicate you're storing credentials for future use- A
customer_id
must be supplied so the stored payment method is linked to a specific customer record in Acquired.com
Learn more about creating customer records here: Creating New Customers
If amount
is set greater to than 0
, a hold will be placed on the funds of customers checking out by Card, Apple Pay and Google Pay. You must then capture the payment via the API afterwards.
Minimum Fields Required (Card, Apple Pay, Google Pay)
Once you've created a customer, initiate Hosted Checkout by sending a request to the payment-links
API endpoint. The table below highlights the key fields that must be set a certain way to enable the Store Credentials Only scenario for card-based payment methods.
Field | Type | Required | Description |
---|---|---|---|
transaction.order_id | string | ✅ | Unique reference assigned by you for the payment request |
transaction.amount | number | ✅ | Typically set to 0 |
transaction.currency | string | ✅ | Must be set to gbp to offer VRPs via Pay by Bank. Other payment types support additional currencies |
transaction.capture | boolean | ✅ | Should be set to false to indicate that no upfront payment is required |
customer.customer_id | string | ✅ | A UUID that identifies the customer in your system. Used to associate stored credentials |
is_recurring | boolean | ✅ | Must be set to true to indicate you're storing credentials for future use |
Example Request
The example below shows a valid request to initiate Hosted Checkout for the Store Credentials Only scenario, allowing the end user to provide payment credentials for future payments across card-based payment methods:
{
"transaction": {
"amount": 0,
"order_id": "b81b3424-4f32-4105-9d8b-509c7e170350",
"currency": "gbp",
"capture": false
},
"customer": {
"customer_id": "0197cfbc-56ee-7020-a8c5-281bda28a706"
},
"is_recurring": true
}
card_new
Webhook
card_new
WebhookThe card_new
webhook is triggered when a customer's card (or wallet) details are saved during a Hosted Checkout session. When is_recurring
is set to true
, card details are automatically stored — including in this scenario.
This enables you to process recurring payments with the stored card or wallet in the future.
The webhook includes a card_id
, which you should store securely and use for subsequent charges without requiring the customer to re-enter their details.
You can read more about the card_new
webhook here: card_new Webhook Details
-
Example Payload
{ "webhook_type": "card_new", "webhook_id": "d68a7a29-47ce-43ea-bad3-0e4a35c5f09c", "timestamp": 1684254231, "webhook_body": { "transaction_id": "0e789cf6-7e7a-3c55-870c-e69325975134", "status": "success", "order_id": "J97C6572ddt223-952", "card_id": "77e595b6-686b-724b-6340-6c8ee0123778" } }
Updated 2 days ago