#satyam-fastbreak_code
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/1445537673920909424
π Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi there,
when you say subaccount, what do you mean?
Generally speaking though, offline payments are stored on the device and won't be deleted when re-registered with a different account.
Sub account is a key for example: acct_1RK2OBPnB8yJ61gf
which is given at the time of terminal Initialization.
I see. So you are initializing the SDK with account A, create an offline payment that remains in pending for now, and then re-register and initilaize to account B?
Sorry during generating a connection token for the terminal
Yes, while the payments have not synced to the backend from account A.
Would those payments be lost if we start working with account B?
Got it. so the pending payment for account A should remain on the Reader. They won't get deleted by re-registering
They should get synced as soon as you re-connect account A
Not the reader, the payments are strored in the SDK since we are using bluetooth readers, like stripe M2.
these readers do not have internal memory so all the payments are stored in the SDK itself.
I did a few payments from 1st account in offline mode, then without connecting it to internet
I switched the account and lost all the payments from my 1st account. I wanted to confirm if this is an expected behavior or I am missing something.
I am also doing clearCachedCredentials when I disconnect an account.
That should not happen. Generally the payment request should remain in the SDK and get synced after re-connecting.
And clearCachedCredentials should not interfer with the stored payments.
Are you sure about it? I am definitely losing payments when I switch accounts.
It does keep payments when you reconnect to the same account but as soon as you connect it to a different account, terminal looses all the offline payments from previous account.
If you are confident about the behavior I will test it even more and on different scenarios as well.
It was my understanding that it should work. But I am doing some more research on this right now, so please bear with me for a moment
Observed behavior:
-
Using React Native + Expo + Stripe Terminal RN SDK
-
Using Bluetooth M2 reader (so offline payments are stored in the SDK, not the reader)
-
Offline Mode = enabled
-
Create 2β3 offline payments under Account A
(offlinePaymentsCount > 0) -
Turn off Internet β do not allow sync
Call:
await Terminal.clearCachedCredentials();
and then initialize again with Account B (different Stripe connection token)
Result: The offline payment queue for Account A is wiped as soon as the SDK initializes with Account B.
offlinePaymentsCount becomes 0, and those payments never sync once reconnecting Account A.
Expected (based on your message):
- Offline payments should remain stored in the SDK
- Switching accounts should not delete them
- They should sync when reconnecting Account A later
You initiliaze with account B. And you can't see the payments for account A anymore, do I understand that correct?
What happens when you re-connect with account A. Are the payments still gone? Because the reader syncs only payment of the active account (meaning the account which connection token it uses)
So if I do
Account A -> clear -> Account A (again) : Payments synced.
But
Account A -> clear -> Account B -> clear -> Account A(again) : Payments lost.
Ok got it. Just wanted to make sure. I'll do some research. Give me a moment.
Sorry for the delay. Have you tried account A -> account B -> account A without ever calling clearCachedCredentials?
Hello! I'm taking over the thread and it looks like we're waiting for your response. π Let me know if you have other questions as well
No not tried it.
No
I am using clearCachedCredential to get out of the customer's account.
Okay we'll need to test out your use case, which could take some time. I'll drop you a DM to create a support case with us and we can work on this over email
Hello @feral urchin, we have sent you a direct message, please check it at https://discord.com/channels/@me/1445571814175543430
- πThe message has instructions on how to open a direct support case with our Developer Support team, in order to help you more effectively.
Sure, Satyam@fastbreak.ai