#konstantin_best-practices
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/1468447430675533854
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
ideally I would love to write unit/acceptance tests for the scenario with 'artificial' time advancement.
If I understand you correctly, you can simply create a Sandbox Account first, then create its Connected Account, then perform the Manual Capture fund flow
I have the sandbox account but 'Connect' is grayed out
I am at the exploratory stage. Do I need to create a company first?
Hmm something is up about the Atlas application. Have you completed it?
No, I wanted to test if my idea is implementable before registering a company
Yes but you will need to finish it in order to get a Sandbox Account to test
Maybe you can just create another separated Account not via Atlas, then go ahead with a Sandbox Account on it
โ๏ธ Stripe developers have stepped away for a short while
Please leave your questions here, and weโll respond as soon as we're back! If you need help urgently, you can contact Stripe support for help.
sandbox account works fine for test transactions with credit cards in the current state. I assumed that it should work for testing 'Connect' no?
I have cancelled 'atlas' application and created sandbox, connect seem to be available now. Is there a guide that describes how I can unit test (from Java) the 'Connect' workflow: capture 'pledge'-s from multiple 'buyer'-s, then if/when someone completes the task, (up to 90 days from 'pledge'-s), then onboard the 'completer' and transfer money. Lets say pledge 1 on today, few days later another pledge from a different person, and then 'completer' completes the task after 40 days later. I onboard the 'completer' and transfer money. If task is not completed - money go back to 'pledgers/buyers' or never leave their wallets
hi there ๐ give me some time to catch up on your latest question
You might want to first understand how payments work with Connect as a start: https://docs.stripe.com/connect/charges
I am not fully grasping the scenario you described. But let say you operate like Marketplace, and you are receiving funds from different customers and want to decide which merchants (connected accounts) to transfer funds to โ this fund flow is called Seperate Charge and Transfer: https://docs.stripe.com/connect/charges#separate-charges-transfers
Scenario: several people independentyl conditionally pledge money towards completion of a task. Let's say 2 persons, one today and another 5 days from now say: will pay X dollars if task 'AA' will be completed. First person say $2 and another $3, then someone else, lets say 40 days from now sees that there is $5 to complete the task, and does it. Now the 'completer' need to be onboarded and money transferred
similar to 'carpool' scenario in the document you are liniking, just spred in time
Yes, seperate charge and transfer sounds like it would work in your scenario
you can create test payments using test cards in this doc: https://docs.stripe.com/testing#cards
And I would like to write acceptance tests (in Java/Kotlin) to make sure that my implementation is correct
Do you have specific questions about the acceptance test or the integration?
And the 'time' is critical if I understand legal side correctly. I am not allowed to 'collect and hold' money without going through a lot of verifications
ideally money will move on 40th day in my example, and only if task is completed
I'm afraid we can't answer questions about regulations or legal. This Discord channel focuses on unblocking developers integrating with Stripe. I can help if you have a specific questions related to your integration.
understood. Is there is guide/samples how to write automated tests for my scenario which include 'time' aspect?
I don't think we have that specifically. This is the doc we have on automated testing: https://docs.stripe.com/automated-testing
here is example for 'temporal' workflow
see, the line 85, that 'advances' test environment for 7 days and 1 hour
so my logic can be verified. I am looking for something like that with Stripe.
for my long running payments workflow 'capture money today' transfer many days later
We do not have instruments that can advance time in general. We do have Test Clocks [0], but it only works for Stripe Billing objects like Subscriptions and Invoices. They do not impact one-time payments like standlone PaymentIntents.
hmm, what do you suggest me to do for verification of my scenario?
https://docs.stripe.com/billing/testing/test-clocks/api-advanced-usage seem to be applicable to invoicing only...
Yes Test Clock at Stripe only works with Stripe Billing objects.
By verification, do you mean account verification? or verifying your payment logic?
verification of payment logic
basically, that my platform works correctly and that later money can be transferred to the person who performs the task
P1 - pledges $X today
simulate 2 days advance
P2 - pledges $Y
simulate 40 days advance
transfer money from P1 and P2 to the person P3
But that scenario doesn't really require "advancing time", I understand that you basically want to make sure funds can be transferred in the future. Using our test cards should allow for such testings.
To be specific, you can test for specific payment scenarios using our test cards / payment methods. Scenarios like refunds, disputes, partial payments etc. But we do not have a tool/method that advances time for a Stripe account in general.
correct, I want to test that funds can be transferred in the future and any edge conditions handled properly
that type of automated testing needs to be implemented on your end, we don't have docs for that. you can use our test cards to simulate test payments.
of course on my end, but how do I test how Stripe reacts on time. You have implemented timers support for subscriptions, I am looking for similar thing for the payment intents
We don't have test clocks for payment intents to simulate a non-Stripe Billing payment scenario to happen in the future.