#pedro-mameluque_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/1392940001196507276
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi ๐
That request ID is for an Account Link creation https://dashboard.stripe.com/logs/req_78kp7xRJjw0YnX
Can you provide the request that fails for the Checkout session?
Hey, sorry but the request doesn~t even show on my log! the checkout session doesn~t even open and I get error
Can you share the exact text of the error you receive?
Can you log the error on your server? Client-side errors don't provide enough information
Also can you share the code you are using to create the Checkout Session as text?
const session = await stripe.checkout.sessions.create(
{
payment_method_types: ["card", "pix"],
line_items: [
{
price_data: {
currency: "brl",
product_data: {
name: event.name,
description: event.description,
},
unit_amount: Math.round(totalAmountToCharge), // Apply discount
},
quantity: 1,
},
],
payment_intent_data: {
application_fee_amount: Math.round(totalAmountToCharge * 0.04), // aqui fica a taxa de servico
},
expires_at: Math.floor(Date.now() / 1000) + DURATIONS.TICKET_OFFER / 1000, // 30 minutes (Stripe minimum expiration time)
mode: "payment",
success_url: ${baseUrl}/tickets,
cancel_url: ${baseUrl}/event/${eventId},
metadata, // Include the metadata with coupon
},
{
stripeAccount: stripeConnectId,
}
);
Ah okay so the reason you don't see the logs in your account is because you are making the request on a different account. Specifically the one identified by stripeAccount: stripeConnectId
Can you share that Account ID?
Hmm, I can replicate it with the other account, it~ll be easier I believe
give me 3min
thx for the help btw
Why would you replace it?
It sounds like that account isn't properly configured and that is why you are seeing the error.
I can check that if you give me the ID
It would be whatever the value that you are passing in here is:
{
stripeAccount: stripeConnectId,
}
Not acct_1QuyDqQ11iMysMWU. There are no requests on that account
Okay yes the problem is the account configuration. You can see in this request: https://dashboard.stripe.com/logs/req_EvXidhDN7siIz5
The payment method type provided: pix 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. See https://stripe.com/docs/payments/payment-methods/integration-options for supported payment method, currency, and country combinations.
Hmmm
So I have to manually activate it in the settings
for each account that wants to accept it
Also I will note this is an Express Account (https://docs.stripe.com/connect/express-accounts). we generally don't recommend Direct Charges (https://docs.stripe.com/connect/direct-charges) for Express Accounts because they don't have full access to the Stripe Dashboard.
More likely you can set up your Connect Payment Method Configuration
We document this approach here: https://docs.stripe.com/connect/multiple-payment-method-configurations
I see that ~'on by default ' is greyd out so I believe it's supposed for each account to set it up, I can't activate it globally
Okay yes in that case you will need to activate it for this account specifically. You can do this via the API as well by requesting the pix_payments capability. https://docs.stripe.com/api/accounts/update#update_account-capabilities-pix_payments
i tried the capabilities but I also get an error in the create when i add pix_ayments
You can do this when you create the Account as well
Okay thats a Typescript error. What verion of the SDK are you using?
stripe@18.1.1
We didn't add support until 18.2.0 https://github.com/stripe/stripe-node/blob/master/CHANGELOG.md#1820---2025-05-29
Oh it makes sense!
So yeah, if you upgrade to v18.2.0 you should see the pix_payments be a valid parameter for Account.capabilities
Ok thanks, I~ll just check how to update all existing accounts to this new capability
it worked!
Great ๐
Do you know a way for me to change all existing accounts to this new capability?
probably no easy way, right?
You can use the Account Update API request to request the capability
This may trigger new KYC requirements so you should be listening for account.updated webhook events from your Connected Accounts https://docs.stripe.com/connect/webhooks
Ok thanks I~ll look into it
I code in Python mostly so I would do something like:
accounts = stripe.Account.list(limit=100)
for account in accounts:
if "pix_payments" not in account.capabilities.keys():
stripe.Account.modify(
capbilities = {
"pix_payment": { "requested": True}
}
So I
- get all my connected accounts
- Check to see if they don't already have
pix_payments - If they don't, request it
Great, ok, I get where it goes! thanks for sharing!
Happy to help! Sometimes it's easier to see it in code
Thank you it worked ! I tested and I could finish a payment using PIX
Great ๐ I'm glad it all worked out ๐
pi_3RjQBXQ3x4FhUeh503IqmIPv
but the issue now it just that I didn't got a webhook response when it succeeded
i have this webhook set and it was supposed to listen to the pix payment
we_1RTLLzLOgtMDtnWQ2Wm0r4B6
I thought the payment_intent.succeeded should have listenned to it..
That is your Account webhook endpoint. It will only get events that occur on your account.
But because you are creating the Checkout Sessions on the Connected Account, the events only occur on the Connected Account
You have a Connect Webhook but it's only for Test mode and it is not listening for payment_intent.succeeded