#kopi_the_first
1 messages · Page 1 of 1 (latest)
I'd suggest following up with our support team.
How can I see if I'm using direct charges,
overall this is something you should know as it's a foundational part of designing your Connect integration. Code wise, you are using Direct Charges if you create PaymentIntents/other objects using thestripeAccountoption to process the payments on other accounts.
To use Destination Charges you would use options liketransfer_data, and note that it changes the liability for refunds/chargebacks to be on your platform
in my backend integration when its marked as a paypal payment, I'm not attaching stripeAccount as the second argument (nodeJS SDK)
if (usePayPal) {
metadata = {
...metadata,
transfer_to: stripeConnectId,
requires_manual_transfer: '1',
};
const session = await provider.checkout.sessions.create({
payment_method_types: ['paypal'],
mode: 'payment',
line_items: lineItems,
payment_intent_data: { metadata },
metadata,
expires_at: dayjs().add(31, 'minutes').unix(),
success_url: checkoutReturnOverWrite
? `${checkoutReturnOverWrite}?type=success${isDev ? '&dev=1' : ''}`
: 'https://www.events.clubkit.app/success',
cancel_url: checkoutReturnOverWrite ? `${checkoutReturnOverWrite}?type=fail${isDev ? '&dev=1' : ''}` : 'https://www.events.clubkit.app/fail',
});
return session;
}
But what we do is basically just collect the paypal payment ourself and in the success webhook we make a manual transfer to the partner the payments is intended.
the issue here is does not matter how I tweak the backend code I keep getting back that "Payment method is not authorized". This is a bit misleading, because on testing environment everything works flawless, and it just got us back just before release 😄
ok well from that code presumably you are using separate charges and transfers, where you process that CheckoutSession and then do a call to /v1/transfers later based on your metadata
I keep getting back that "Payment method is not authorized".
what does that mean, do you have an example?
StripeInvalidRequestError: The payment method type provided: paypal 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
FYI this works in development environment fails only on real payments
if you use SC&T for the Paypal payments I suggest pushing back on the support team and explain that you do/show the code/ask to be escalated since they might have you classified wrong or they don't realise you can use Direct Charges in one part of your integration and SC&T in another
yeah, you need to activate it so you can use it in livemode, per the links in the error message
also share the request ID req_xxx from the error message so I can look
thank You. Give me a sec, let me make a new request.
req_TCBlHR8R6SkO4Y
funny thing is when I check the logs URL, it shows me as a connected account. While it is not a connected account but our main account.
well it is a connected account
you are passing stripeAccount in your actual code(try searching your codebase for that string) so the code you showed earlier is probably not what is actually running at runtime
yes I'm suspecting that the stripeAccount gets into this somehow
let me verify it and come back to You, if thats not the case. Thanks for the support already!
So I forced an undefined stripeAccountId in our case:
const session = await provider.checkout.sessions.create(
{
payment_method_types: ['paypal'],
mode: 'payment',
line_items: lineItems,
payment_intent_data: { metadata },
metadata,
expires_at: dayjs().add(31, 'minutes').unix(),
success_url: checkoutReturnOverWrite
? `${checkoutReturnOverWrite}?type=success${isDev ? '&dev=1' : ''}`
: 'https://www.events.clubkit.app/success',
cancel_url: checkoutReturnOverWrite ? `${checkoutReturnOverWrite}?type=fail${isDev ? '&dev=1' : ''}` : 'https://www.events.clubkit.app/fail',
},
{ stripeAccount: undefined },
);
Now I can see from the error log that its NOT a connected account. Request ID:
req_zK8QbfNOEKoowk
yet I'm getting the same error message, that the payment type is not authorized
yep, which is expected since per https://dashboard.stripe.com/settings/payment_methods on your platform account, it is not enabled
yepp. So just to sum it up, I gotta push back to support. I think when I was setting up connect, I had to fill some usage related questions and probably we classified our business wrong and thats why its disabled.
do You know if those things can be changed through API or only through support ?
only through support