#missing-individual_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/1441233068760502365
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
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
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"],
});
Got it. can you turn on "Bank Transfers" payment method and try again?
It is currently turned on
Ok, let me take a look
https://docs.stripe.com/payments/bank-transfers/accept-a-payment?payment-ui=direct-api&invoices=without&country=US&integration=pm-manual&lang=node can you use the sample code and try again? creating a paymentIntent to accept customer_balance is more than just include customer_balance in its payment_method_types
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
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...
I couldn't figure out how to send a customer cash balance created event in test mode.
https://docs.stripe.com/payments/bank-transfers/accept-a-payment?payment-ui=direct-api#test-your-integration have you tried this API?
I tried funding up but i get this error:
The payment method type "customer_balance" is invalid. Please ensure the provided type is activated in your dashboard (https://dashboard.stripe.com/account/payments/settings) and your account is enabled for any preview features that you are trying to use.
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
ah through api it works yes
Hi! Can you share the request ID (req_xxx)? Here's how you can find it: https://support.stripe.com/questions/finding-the-id-for-an-api-request
Each API request has an associated request identifier, e.g. req_123456789. How do I find the ID for an API request? You can find a log of API requests…
req_ksbHbus5sDNYau
Can you share with me the ID of the reuqest that failed to create the paymentIntent?
req_9UDI0MiTuf68Lc
Thanks, btw you should do it in sandbox mode since you are still developing
is test mode not same as sandbox mode?
Hey! Stepping in for my colleague here! Give me some time to catch up!
Hey! Test mode and sandbox mode are both testing environments for your stripe integrations: https://docs.stripe.com/testing-use-cases
The reason why my colleague mentioned this, is because the request that you sent: https://dashboard.stripe.com/acct_1PwzfjBVZKCfdJd1/workbench/logs?object=req_9UDI0MiTuf68Lc&filtered=true was a livemode request. It was neither a testmode or sandbox mode request
And we generally advice not to test on livemode, rather testing should be done on testmode or sandbox mode
As to the request that you sent, i noticed that you were passing in 'customer_balance' in payment_method_types, could you try including the rest of the fields in this example here: https://docs.stripe.com/payments/bank-transfers/accept-a-payment?payment-ui=direct-api&integration=pm-manual#web-create-and-confirm-payment-intent and see if it works after?
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'}, }, },
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.