Charge + store credentials

Learn how to collect an upfront payment and store credentials for future use via Hosted Checkout

Use this for: scenarios where you want to collect an initial payment and also store the customer’s credentials for future use. This includes recurring payments via Card, Apple Pay, Google Pay, or Pay by Bank (VRP).

This setup is commonly used by merchants who:

  • Charge the customer upfront (e.g. first month of a subscription, initial repayment)
  • Automatically set up recurring billing after the initial payment

Charging & Storing Credentials for Future Use

For this scenario:

  • transaction.amount must be greater than 0
  • is_recurring must be set to true
  • A customer_id must be supplied in your payment-links API request so that the stored payment method can be linked to a specific customer record in Acquired.com's system.

Learn more about creating customer records here: Creating New Customers


Minimum Fields Required (Card, Apple Pay, Google Pay)

The table below highlights the key fields that must be included in your /payment-links API request to enable the Charge + store credentials scenario.

FieldTypeRequiredDescription
transaction.order_idstringUnique reference assigned by you for the payment request
transaction.amountnumberMust be greater than 0
transaction.currencystringMust be set to gbp to offer VRPs via Pay by Bank. Other payment types support additional currencies
transaction.capturebooleanSet to true to indicate that payment should be taken immediately. If omitted, this field defaults to true.
is_recurringbooleanMust be set to true to indicate you're storing credentials for future use
customer.customer_idstringA UUID that identifies the customer in your system. Used to associate stored credentials

Example Request

The example below shows a valid request to initiate Hosted Checkout for the Charge + store credentials scenario. This setup presents the customer with the option to make an upfront payment while also storing their details for future recurring payments via Apple Pay, Google Pay, and Cards.

{
  "transaction": {
    "amount": 0,
    "order_id": "b81b3424-4f32-4105-9d8b-509c7e170350",
    "currency": "gbp",
  },
  "customer": {
    "customer_id": "0197cfbc-56ee-7020-a8c5-281bda28a706"
  },
  "is_recurring": true
}

card_new Webhook

The 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"
  }
}