#sn_api

1 messages ยท Page 1 of 1 (latest)

tawny pewterBOT
#

๐Ÿ‘‹ 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/1239785326302593044

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

kind seal
#

hello! which test card did you use specifically? can you share the last4?

mellow saddle
#

Hi Alex, it was 4000000000000077

#

Use test cards to validate your Stripe integration without moving real money. Test a variety of international scenarios, including successful and declined payments, card errors, disputes, and bank authentication. You can also test non-card payment methods and redirects.

kind seal
#

gimme a while to take a look ๐Ÿ‘€

mellow saddle
#

No problem, I appreciate the help!

#

Adding some screenshots:

kind seal
mellow saddle
#

I have not, let me try that now

#

Ya it is showing as $0 right now, how can I add to the balance?

kind seal
#

can you paste the full output from when you retrieved the balance via the API in test mode

mellow saddle
#

Yup, just a moment

#

{
"object": "balance",
"available": [
{
"amount": 0,
"currency": "usd",
"source_types": {
"card": 0
}
}
],
"connect_reserved": [
{
"amount": 0,
"currency": "usd"
}
],
"livemode": false,
"pending": [
{
"amount": 7252,
"currency": "usd",
"source_types": {
"card": 7252
}
}
],
"refund_and_dispute_prefunding": [
{
"amount": 0,
"currency": "usd"
}
]
}

kind seal
#

you mentioned that you used the 0077 test card to make payment - logically using this test card to make payment should bypass the pending balance and go straight to the available balance

#

can you create a payment on your account using the 0077 test card?

mellow saddle
#

Sure, let me try that, just a few moments

#

Is this the correct place to do that?

#

I was going to do an autocharge invoice for $100

#

And if so, is there a specific date and CVC I'm supposed to use with the 0077 card?

kind seal
#

that works i guess. No specific date (just needs to be in the future) or CVC

mellow saddle
#

Got it

#

Let me try it out

dim girderBOT
kind seal
mellow saddle
#

I think that worked, let me try the balance command again, one moment

#

Ah that worked!

#

Just got the transfer test done as well

#

Thank you very much!

kind seal
#

i do want to mention though, that if you're using Transfers, you would ideally want to configure the source_transaction too

#

what you would want to do when creating the Transfer is to include the corresponding Charge id in the source_transaction parameter : https://stripe.com/docs/api/transfers/create#create_transfer-source_transaction

The main point to remember is that when using source_transaction, if the payment is still pending, then the transfer will pull the funds from the pending balance. If the payment is already available, then the transfer will pull the funds from the available balance.

if you don't specify the source_transaction, it'll always try to use the funds from your available balance and if the payment funds is not yet available, and you don't specify the source_transaction then you run into the problem of insufficient funds

mellow saddle
#

Where would I pull that Charge ID from?

#

Would it be this?

cinder grail
#

Hi @mellow saddle I'm taking over this thread

mellow saddle
#

No worries, thanks Jack

cinder grail
#

You can get the charge ID from PaymentIntent's latest_charge

mellow saddle
#

Got it, thank you!

#

I really appreciate the help from the both of you, thank you again, I think I'm all set

cinder grail
#

Happy to help!