Help me find API documentation about using swiped cards in my app

I’m not even sure where to start looking!! Any help appreciated. I want to create an app that can used a swiped card to establish an ongoing payment method for later purchases. My current app can use a customer card ccof id created by manual SDK entry. I can’t find a method to capture a reusable card id for a swiped card.

More info:

Here’s the problem I wish to solve:
Yoga studio has 2 modes:
Mode 1: Members can subscribe for classes on a recurring monthly basis. I’ve developed an app using the Card SDK to capture credit card and setup subscription. Easy to track usage electronically.

Mode2: Customer buys 1 or more Paper Tickets, purchased using Square phone-based swiper and Square POS.

In both current modes, a paper customer record is created on first in-person visit: Waiver form, emergency contact, health concerns, etc. The studio reviews this info to establish suitability of customer for the yoga practice.

Paper methods aren’t that helpful; studio wants to move to all data available electronically.

DESIRED MODE:
New Customer creates personal data record and waiver information using online phone or desktop form.
Customer can enter credit card using SDK, but we provide option to appear at studio in person, and completes first transaction in person for class E-card or subscription, using a Swiped Card. The swiped card is saved and reused for additional E-card class purchases and/or subscription renewals.

Customer can then make additional purchases via new phone app.

Benefits: Customer class attendance and usage of E-Cards is tracked electronically through phone app sign in.
Teachers can see customer health records from list of sign in students.
Phone app allows purchases based on previously swiped card instead

My unknowns:
Can a swiped card create a reusable ccof id like the one created by the Cards SDK?
Can I create a subscription or E-Card order which gets delivered to the Studio’s card swipe phone, and provide for card capture or payment for the order by swipe? (In other words, is there a method to replace the manual SDK card entry and capture instead use the swiped card and CURL it into the order info?)

I’m sorry if these questions aren’t clear. I’ve been searching / reading docs, can’t find the info I need, and I may be phrasing my search queries badly.

Any help appreciated

:wave: I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:

Additional Documentation

Charge a Card on File
Reader SDK Quickstart
Save a Card on File

If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.

These docs don’t answer my question on reuse of card swipe info in my app

If the customer is dipping or swiping the card then you can take the payment_id and store the card on file with the Cards API. :slightly_smiling_face:

Thanks. I think this is helpful and on the right track for my planned app.

I saw this:

Get a payment token

Before saving a card on file, you need to get a valid single-use payment token that represents a buyer’s payment card using the [Web Payments SDK].
You don’t need to charge the buyer’s card to save it. The payment token can be used to save a card on file, create a payment, or both.

Many of the studio customers are 60+ and dislike manual card entry using the SDK and phone or computer manual entry. As an in-person option, It would be ideal if I could use my app to create a payment token record (or similar record) that I deliver to the phone swiper, capture the customer card info from the swipe, and then have the app integrate that information into the app database.

So here’s what I’m trying to sort out:
Can my app pass data with the phone swiper? Perhaps creating data that can be integrated into the phone swiper;s Square app? Or can I get info from the swiper outside of the app? Is there an API for that?

Or can I set up something using the square app, (like a fake item of some sort?), that is only used to capture a card swipe that’s accessible afterward by APIs? Like a bare-bones customer record and card info only, which I later identify, access and integrate into my app’s data?

PS: I’m pretty smart about using Square’s API for data handling, but I don’t really understand how to access or integrate the swiper.

Are you using our out of the box Square app? If so you can change the settings to store cards on file when customers checkout. :slightly_smiling_face:

Thanks! it is helful to find documentation cards.

I created a $1.00 test item and sold it using a swipe.
See the payment record for this transaction below:
What elements can I capture and reuse for future customer sales using the API?
Customer_ID? payment_account_reference?
I know the item id, cost, and I can estimate the time of sale, Is there a better api to get information than Payments API?
Also, you said:
“you can change the settings to store cards on file when customers checkout.”
I can’t find this setting? Is it in the app someplace?
Thanks.
ICYMI: I’m kind of stupid about swiping.
{
“id”: “xxxxMfQqkKfLMLfVdnHO0HcvaB”,
“created_at”: “2024-09-21T17:11:16.188Z”,
“updated_at”: “2024-09-21T17:11:20.228Z”,
“amount_money”: {
“amount”: 100,
“currency”: “USD”
},
“status”: “COMPLETED”,
“source_type”: “CARD”,
“card_details”: {
“status”: “CAPTURED”,
“card”: {
“card_brand”: “VISA”,
“last_4”: “xx42”,
“exp_month”: 6,
“exp_year”: 2028,
“cardholder_name”: "XXXXXX/BARBARA ",
“fingerprint”: “xxx-O22gC1T8UVXNTpgNibozNy0njdVuR345w6fmaWSCV95On1XjxlsoUhYY6mqhfaGSnQ”,
“card_type”: “DEBIT”,
“prepaid_type”: “NOT_PREPAID”,
“bin”: “463405”,
“payment_account_reference”: “xxxx014623222685320929424757”
},
“entry_method”: “SWIPED”,
“cvv_status”: “CVV_NOT_CHECKED”,
“avs_status”: “AVS_NOT_CHECKED”,
“auth_result_code”: “014495”,
“statement_description”: “SQ *WEAVERVILLE YOGA INC”,
“device_details”: {
“device_id”: “xxxx858070909074”,
“device_name”: “LGE VS987”,
“device_installation_id”: “xxxx803-01be-458e-ab04-5f92eb7aa328”
},
“card_payment_timeline”: {
“authorized_at”: “2024-09-21T17:11:16.806Z”,
“captured_at”: “2024-09-21T17:11:19.195Z”
}
},
“location_id”: “xxxx1VEX85751A”,
“order_id”: “xxxxLrcG8Qgcq57DTd6tp3eV”,
“processing_fee”: [
{
“effective_at”: “2024-09-21T19:11:19.000Z”,
“type”: “INITIAL”,
“amount_money”: {
“amount”: 13,
“currency”: “USD”
}
}
],
“customer_id”: “xxxxx7P0VNNHF3YZYD1ZA76PKW”,
“total_money”: {
“amount”: 100,
“currency”: “USD”
},
“approved_money”: {
“amount”: 100,
“currency”: “USD”
},
“receipt_number”: “V43y”,
“receipt_url”: “Receipt from Weaverville Yoga INC”,
“device_details”: {
“device_id”: “355858070909074”,
“device_name”: “LGE VS987”,
“device_installation_id”: “59e1f803-01be-458e-ab04-5f92eb7aa328”
},
“application_details”: {
“square_product”: “SQUARE_POS”
},
“is_offline_payment”: true,
“offline_payment_details”: {
“client_created_at”: “2024-09-21T17:00:50.000Z”
},
“version_token”: “V8Wp09sXlDNK4sW9X8kbhXHLEVstyr2PgDCKXVgOUjO6o”
}