#missing-individual_api

1 messages · Page 1 of 1 (latest)

timber echoBOT
#

👋 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/1441233068760502365

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

cold vortex
#

Hi there, the code snippet shows that you are creating a blanace transaction instead of paymentIntnet

#

But the error message is related to paymentIntent creation, can you share with the correct code that you wrote to create a paymentIntent?

#

Can you go to your Dashboard and turn on "Bank Transfers" payment method? that's the payment method correspond to customer_balance

visual saffron
#

Ah sorry, here is the payment intent one:

const paymentIntent = await this.stripe.paymentIntents.create({
  amount: 1000,
  currency: "usd",
  customer: cu_123,
  description: `customer topup xyz`,
  payment_method_types: ["customer_balance"],
});
cold vortex
#

Got it. can you turn on "Bank Transfers" payment method and try again?

visual saffron
#

It is currently turned on

cold vortex
#

Ok, let me take a look

visual saffron
#

Will do, now looks like
' const paymentIntent = await this.stripe.paymentIntents.create({
amount: 1000,
currency: "usd",
customer: cu_123,
description: customer topup xyz,
payment_method_types: ["customer_balance"],
payment_method_data: {
type: "customer_balance",
},
payment_method_options: {
customer_balance: {
funding_type: "bank_transfer",
bank_transfer: {
type: "us_bank_transfer",
},
},
},
}); '

Might need to re-deploy and reprocess the webhook to test out

cold vortex
#

Ok If you are still in development, I'll recommend using sandbox https://docs.stripe.com/sandboxes instead of testing with your live mode API key

This guide outlines Stripe Sandboxes, an isolated test environment for safely testing Stripe functionality without affecting live data. It describes use cases such as simulating transactions without real money and managing isolated testing environments for teams. The guide also provides instructions for managing sandboxes in the Stripe Dashboard...

visual saffron
#

I couldn't figure out how to send a customer cash balance created event in test mode.

cold vortex
visual saffron
#

ah through api it works yes

cold vortex
visual saffron
#

req_ksbHbus5sDNYau

cold vortex
#

Can you share with me the ID of the reuqest that failed to create the paymentIntent?

visual saffron
#

req_9UDI0MiTuf68Lc

cold vortex
#

Thanks, btw you should do it in sandbox mode since you are still developing

visual saffron
#

is test mode not same as sandbox mode?

timber echoBOT
earnest holly
#

Hey! Stepping in for my colleague here! Give me some time to catch up!

earnest holly
#

And we generally advice not to test on livemode, rather testing should be done on testmode or sandbox mode

#

e.g.
payment_method_types: ['customer_balance'], payment_method_data: {type: 'customer_balance'}, payment_method_options: { customer_balance: { funding_type: 'bank_transfer', bank_transfer: {type: 'us_bank_transfer'}, }, },

visual saffron
# earnest holly The reason why my colleague mentioned this, is because the request that you sent...

Yes we completed testing in test mode previously and moved to real bank transfer for customer cash balance which was ok. Now next step is to create a payment intent using that balance to top up customer's balance within our system.

I was not able to create a webhook event preivously so just made a real bank transfer for testing. Now i learnt how to do that, so makes my life much easier 😆

I've added these params and looking into deploying into a cloud environment since i wont be able to provide a localhost for the webhook.

cold vortex
#

You can use localhost for webhook testing as well