#morteza_api
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1284124198385614950
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- morteza_api, 3 days ago, 34 messages
Hi
I was given a sample Paper Receipt
they all included Application Id, Auth code
"receipt": {
"account_type": "credit",
"application_cryptogram": "FAC20B57FEE98FB3",
"application_preferred_name": "MASTERCARD",
"authorization_code": "803371",
"authorization_response_code": "3030",
"cardholder_verification_method": "offline_pin",
"dedicated_file_name": "A0000000041010",
"terminal_verification_results": "0000008001",
"transaction_status_information": null
},
this is data on te event we got from the webhook
Is this the same Application Id that we see on PaperReceipts
?
what is PaperReceipts?
when you make a purchase you get a Receipt
do we have a Terminal Id in Tap to Pay ? or we must generate ot ourselve?
I'm sorry I don't understand your question. can you explain in more details what you are trying to do and what is the issue?
we need to send an email for a customer who has made a purchase at a Tap to Pay device
Email will include a Receipt
I've been asked to mention ApplicationId, Authcode, Terminal Id, Application Id in the Receipt
I don't know where should I find this information
Tap to pay app is installed on regular devices, so do i need to create unique id or it's issued by the stripe
ApplicationId
do you mean the Stripe Application ID (ca_xxx) or something else?
Authcode
I'm not sure what that is. but it's included in the JSON you shared above.
Terminal Id
do you mean the ID of the tap to pay device?
I asked two questions. which question are you replying to?
second one '
I found first one
so your remaining question is how to find the Terminal ID for a tap to pay device? looking into this...
yes
and one more question , when a customer make a purchase with Tap to Pay device, we need his/her email, there's one email under billing_details Object on the charge object, is it the customer;s email. ?
there's one email under billing_details Object on the charge object, is it the customer;s email. ?
yes exactly, that's the customer's email
thanks
by the way, we need to show MerchantId on the Receipt as well, do we have such a thing as MerchantID on stripe
?
Yeah your account id
You can find it here: https://dashboard.stripe.com/settings/account
As for the reader id, you should still get a reader id back in the discover readers response for tap to pay readers
lemme check
Account id isn't really supposed to be exposed to your customer though
It just uniquely identifies your stripe account
Where is this Merchant ID requirement coming from?
well, the business guys have seen merchant id in the receipts and asked me to show in the receipt that's why
based on the docs only Application Id, Applicatio \n Name and Account Type is required
I use this package to enable Tap to Pay, is this gives us terminal id in discovered readers ?
and does Stripe saves these terminal ids somewhere ?
or we should track them
Hi there ๐ jumping in as my teammate needed to step away. I don't recall exactly offhand how that function responds and am trying to double check that, but it may be faster for you to log the full output in your app and see what's returned.
ok
what about second question
do we need to track this terminal ids in our server ?
or stripe saves them on its end so that we can get them
I think they may be retained, assuming when you say Terminal ID you're referring to the ID generated for a Reader object. I see there is a device_type enum value for those objects that is mobile_phone_reader, which I believe aligns with Tap to Pay readers.
https://docs.stripe.com/api/terminal/readers/object#terminal_reader_object-device_type
Have you processed a Tap to Pay payment, in either live or testmode already? If so, I'd suggest trying to list Readers, and pass the value mobile_phone_reader to the device_type filter parameter when doing so, to see if there are any Reader objects associated with your account:
https://docs.stripe.com/api/terminal/readers/list
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Yup, that's how TTP works.
ok , the point is should I get reader for localmobile , too
or it's just for bluetotth, etc.
I'm not exactly sure, and am not able to quickly stand up a TTP integration to test with. That's why I'm making suggestions about how to look into this from your account where it sounds like you've already used TTP. I don't know if a Reader object gets created for those connections, but if it does I'm pretty sure listing the available Reader objects for your account would be the fastest way to find out.
I tested
the list seems to be update
on the /terminal/readers
but on the app we log discovered readers and it's empty
Weird
@jagged maple
{
"object": "list",
"data": [
{
"id": "tmr_FuEWdAzw2NIgEk",
"object": "terminal.reader",
"action": null,
"device_sw_version": "unknown",
"device_type": "mobile_phone_reader",
"ip_address": "",
"label": "Livemode Reader",
"last_seen_at": 1726240063786,
"livemode": true,
"location": "tml_FtanZgPyznLWgp",
"metadata": {},
"serial_number": "8cf4cdca-ae70-45c2-b89e-946343eabed7",
"status": "online"
}
],
"has_more": true,
"url": "/v1/terminal/readers"
}
Okay, so you are seeing new Reader objects being created, and are able to get the ID from those, for your TTP flow?
yes
Cool, so that's one part! I was digging more into how we lay out the expected return value for discoverReaders, but wasn't getting much clarity from what we have there ๐
https://stripe.dev/stripe-terminal-react-native/api-reference/index.html#DiscoverReadersResultType
Documentation for @stripe/stripe-terminal-react-native
:d
it's weird that I see the object being created but it's not available on device
๐
I think it kind of makes sense for the IDs to not be shown device side, since you either have a local reader that you can find and connect to or you don't and the discoverReader call errors. But this may just be me being a bit unfamiliar with how this is structued for React Native integrations, let me take a closer look at the flow.
but if I don't have it how can I mention them on the receipts, unless charge object has it
I'm not sure, it's the first time I've heard someone try to do this and am still working on piecing that together.
Ah, so it looks like with this flow there should be a point where you call connectLocalMobileReader and provide it with a reader object, as shown in this step:
https://docs.stripe.com/terminal/payments/connect-reader?terminal-sdk-platform=android&reader-type=tap-to-pay#connect-reader
I think you may be able to get the ID from that reader object. It looks like that object has an id field in it, that I suspect will have the ID of the Reader object:
https://stripe.dev/stripe-terminal-react-native/api-reference/modules/Reader.html#Type
let me test
this solved the issue