Charge a Card on File

Applies to: Reader SDK - Android | Reader SDK - iOS | Customers API | Payments API

Learn how to enable recurring payments and create a seamless purchase experience for returning customers.

Warning

The Square Reader SDK is deprecated and will be retired on December 31, 2025. The SDK is no longer receiving new releases and support for new operating systems isn't guaranteed.

The Mobile Payments SDK launched as the successor of the Reader SDK and is now in General Availability (GA). To ensure continued support and functionality, you should migrate your application from the Reader SDK to the Mobile Payments SDK before the retirement date.

Link to section

Requirements and limitations

  • 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. To create your first Customer object, see Customers API.
  • You need a customer card on file. To save a card with the Reader SDK, see Save a Card on File.
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