Sandbox 101: Cards API @SquareDev
Sandbox 101: Cards API  @SquareDev
Uploaded September 2021 | Updated September 2026, 2 days ago
Use the Cards API to save a credit or debit card for a customer. Your application can then charge the card when the customer makes purchases in the future. The API can also be used by a developer-account-registered application to create and charge cards on behalf of a seller account.

The Cards API is used along with the Customers API to store payment cards for a customer in a Square account. To store a card on file, your application must use the Customers API to fetch an existing customer or create a new customer. When your application obtains a customer ID, it can call the CreateCard endpoint with a payment token or payment ID, and the customer ID. After the card is stored on file for the customer, that customer's stored card can be used for payments to the seller account.

Created a Card on File from a Payment ID – developer.squareup.com/docs/cards-api/walkthrough/card-from-payment-id
Create a Card on File and a Payment – developer.squareup.com/docs/cards-api/walkthrough-seller-card
Shared Card on File – developer.squareup.com/docs/cards-api/walkthrough-shared-card

Chapters:
0:00 Intro
0:11 Overview of Cards API
0:33 Save a Card Using a Previous Payment
1:53 How shared card on file work?
2:26 Creating a Shared Card on File
4:46 Recap

Square Developer Forums – developer.squareup.com/forums
Square Developer Community – https://squ.re/slack
Square Developer Twitter – twitter.com/squaredev
Square Developer Blog – developer.squareup.com/blog
Sandbox 101: Cards APITechnical Track | Managing Time with the Bookings APIScavenger Hunt: The Great Code ChaseSandbox 101: Web Payments SDKTechnical Track | Build with Cash App and AfterpaySquare Unboxed 2023: A Partner and Developer EventBusiness Track | Intro to Square PartnershipsSubscriptions API TutorialWeb Payments SDK with React & Next.jsSandbox 101: React Square Web Payments SDKBuilding a Closed-Loop WalletSandbox 101: Build Order Ahead with Order Manager
Square Developer |

Sandbox 101: Cards API

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER