Add Payment Method Form - Liquid Form Reference
On this page
Usage
```liquid
{% form “add-payment-method” %} {% render “checkout/payment_information/select_and_payment”, only_recurring_payments: true %} {% endform %} ```
The add-payment-method form renders a hosted payment gateway form that saves a new card against the customer’s account without taking a payment. It automatically selects the first active payment provider that supports saving cards, and is used on the account “Add payment method” page.
| Property | Value |
|---|---|
| Form Name | add-payment-method |
| Category | Payments |
Behavior
- The form renders nothing if the store has no active payment provider that supports saving cards.
- On submission it stores a reusable card token against the customer — no order is placed and no charge is taken.
Form Object
Inside the form block, you can access the form object which provides:
form.errors— Any validation errors after submission
Was this article helpful?
Thanks for your feedback! It helps us improve our docs.