Charge a Card on File

Create a seamless purchase experience for returning customers and enable recurring payments.

Link to section

Prerequisites

  • You need an access token. If you're using OAuth, you need CUSTOMERS_WRITE permission to save a card on file and PAYMENTS_WRITE permission to process payments with the saved card. Cards on file are automatically updated on a monthly basis to confirm that they're still valid and can be charged.
  • You need to create a Customer object using the Customers API. You can follow Customers API Overview to create your first Customer object.
  • You need a customer card on file. You can follow Save Cards on File to save a card with the Reader SDK.
Link to section

Charge a card on file

After you save a card on file, you can use the Payments API and call the CreatePayment endpoint to process the saved card. If you're using OAuth, you need PAYMENTS_WRITE permission.

To charge a saved card, use the Payments API and set the source_id and customer_id fields in the CreatePayment object:

  • Replace {CARD_ID} with an existing card ID.
  • Replace {CUSTOMER_ID} with an existing customer ID.
  • Replace {LOCATION_ID} with an existing location ID.

Create payment