maybe we weren’t aligned on the two workflow replies we had above? here and here?
i ordered via Checkout. punched in a brand new card. paid successfully. the payment.created webhook fired. is that what i should be able to use an id from or no?
if it was card_on_file that’s not something i can change, is it? since it’s part of what Square obfuscates from developers in the Checkout + API usage.
thanks for continuing to dive in, i just really need at this point to figure out if Checkout + API is viable or i have to use the SDK to create our own secondary part of the user experience so we can get cranking on delivery.
extra clarity: i did punch in the card when checking out. it was a brand new card i’ve never used with Square before. i did use my usual email address that Square knows me by.
hi @Bryan-Square can you help clarify this one for me please? if it’s something i can resolve i’d love to but i don’t understand where our gap is on what i was doing vs. what you suggested vs. whatever caused the issue
I haven’t been able to replicate what you say you experienced. If you try paying for a $1.00 payment link again by keying the card in. When you call GetPayment with the payment_id what is the entry_method show?
what i need to know to determine how we proceed w this project is if can i grab a payment event from this /checkout screen (post payment/completion) and associate w a customer or not for future payments (authorized by them by the modifier they chose in the shopping experience).
if not, then it seems i’ll have to build out something else around the SDK. not ideal but doable.
You won’t get a payment from that checkout page since its the Square Online Store, but you will get a webhook event when the customer pays for this if your subscribed to the event.
yes and that’s what i used to produce the results above that didn’t work. i’m not sure where we’re missing each other but it seems like we’ve lost the trail and i’m unsure how to get it back on track at this point :\
starting fresh to try to get back on the same page.
user checkouts on a checkout page
i catch a webhook – payment.created
i use that to get an order via order_id
the order object has a customer_id i can use to get the customer
when i use the payment.id and the customer.id to try to create a card i get the error i listed above
is that something i can get around? your reply here didn’t make sense to me because i used a brand new card in checkout.
does this all make sense? what else can i offer or answer to help fill in gaps and get to a decision on if we can use checkout + API for our use case? thanks!
If the payments entry_method is card on file then you can use that card on file for any future payment. If it’s keyed then use the customer_id in the payment to GetCustomer to see if the customer has a card on file.
*If not then CreateCard with the payment_id.
What was the payment_id you used to get the error? Also when you call GetPayment with the payment_id what is the entry_method?
entry method does say ON_FILE. is it because square stored it for me bc it knows my email? or did i have a prompt that i had hit ‘yes’ to saving it? it’s a brand new card i’d just gotten so i used it to try to avoid square using my prior card/profile
when i look up the customer via retrieveCustomer and using the id i don’t see any payment information. how can i get that from a customer who may already have an ON_FILE method?
using listCards w a customerId pulls back a {} response. i can’t see anything else at the moment in API Explorer that would seem to be promising for getting my on file card :\
If you call GetPayment with jffuztfumrVLqnZCdltvEdA4njSZY what does the entry_method say? If it says ON_FILE the call to CreateCard will fail with that payment_id.
If you try another payment does it come over as ON_FILE? Or if you use a different card is the entry_methodKEYED? I haven’t been able to replicate what your seeing. Every payment I try it’s KEYED.
amazing. got things connecting finally, ty. i had to make sure to continue as guest for it to work.
is there any way to handle this for people who have used Square Checkout before and are ON_FILE for Square but not the merchant? or will we have to notice that status and manually bump them to somehow give us a different keyed version (through SDK? something else?)?
is there a way to get card info from users who are signed in to Square @Bryan-Square ? i could only use the payment.id when i was a guest bc otherwise it’d send my data over as ON_FILE method
the method you described way above only works if i choose to continue as guest. if i do the verification process via a square code texted to me it will use a method of ON_FILE. HOWEVER, that card is not on file for this merchant. if i use the search customer endpoint w that email or phone number, i cannot use the retrieved customer id to get listed cards. (i couldn’t, now i can after doing the as guest method, that’s how i was able to test and confirm your original solution)
does that make sense? it seems Square had my card on file even tho the merchant didn’t, so even tho i keyed in my card it stored it and used ON_FILE until i continued as guest.