#thehollytoats_code
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/1364996920971497562
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- thehollytoats_code, 3 hours ago, 10 messages
Hi ๐
When yousset onBehalfOf, it changes the merchant of record. Does that account have Apple and Google Pay enabled?
I set the value to the connected account.
My case is the platform in Australian dollar and the connected account in UK.
So I set the onBehalfOf to the connected account in the UK.
Does the UK account have Apple Pay or Google Pay enabled?
Can you provide me the public URL where I can see this behavior?
The UK account is only express account. I don't think there's any specific setting to enable apple/google pay for express account. CMMIW.
I changed the connected account to the same region (australia) and have the same currency, but still have the same problem.
Public URL: https://www.qr-paynow.com/au/product/440933573/
I see Google Pay just fine
It supposed to be this way:
The one below is using the checkout session and I have NOT included the 'onBehalfOf' code
the GPay on top disapper when I add onBehalfOf using java script stripe elements
Did you just make that update?
But also having the embedded checkout and Express Checkout Elements together on the same page makes observing the element events much harder
oh sorry, I remove the OnBehafOf just now, just to take a screenshoot for you.
Can you display one or the other? Embedded Checkout or Express Checkout Element? Also what is the account ID for the Connected Account?
I remove the checkout just now.
the ID for the connected account is acct_1PI8fTQ9jtDgzd7T
If I do this:, commenting out //onBehalfOf: p.o, I can see the button.
const elements = stripe.elements({
captureMethod: 'manual',
mode: 'payment',
amount: price_to_play_one + operator_fee_fix + Math.round(operator_fee_percent * price_to_play_one/100),
currency: p.c,
//onBehalfOf: p.o,
appearance,
})
const expressCheckoutElement = elements.create(
'expressCheckout',
expressCheckoutOptions
)
expressCheckoutElement.mount('#ece');
In that situation you are now the merchant of record
when I apply onBehalfOf: acct_1PI8fTQ9jtDgzd7T, the button disappear.
what should I put in the onBehalfOf?
Whether or not you add the onBehalfOf should not be something you decide just to get Google Pay to show up. This is fundamental to how your are integrating.
If acct_1PI8fTQ9jtDgzd7T is the merchant of record, that means their account and their settings are applied to this express checkout element. It means they are on the hook for refunds and the payment will settle in their currency.
What is the overall goal of your integration?
Okay I can see there is an invalid_request_error being raised when I try to load the Express Checkout Element now. Digging further into this
Just to be clear, what is the funds flow you are trying to achieve here?
the fund goes to the platform, and the platform control how much to send to the connected account.
In short, describe by this below code:
$intent = $stripe->paymentIntents->create([
'amount' => $order_total,
'currency' => $currency,
'capture_method' => 'manual',
'transfer_data' => array(
'destination' => $connected_account_id, // Charge the connected account
'amount' => $tx_ammount,
),
example: order total = $5.
transfer_data. ammount = $4 to the connected account
Okay so you are using Destination Charge with OBO. But if you are setting on behalf of in the Express Checkout Element you need to do the same thing with the payment intent
If those don't match the confirmation attempt will fail
In this problem, the button doesn't even show up. The payment intent has not been created.
I recognize that but I want to call out another source of failure before it happens
When the button is pressed, then the payment intent is created.
Yes, I understand.
Wait a sec. This connected account does not have the card_payments capability so of course they cannot be set as the merchant of record
๐คฆโโ๏ธ
Sorry I didn't see that earlier
You cannot assign them as the merchant of record unless they have the capability of accepting payments.
This is where you need to be: https://docs.stripe.com/connect/dashboard/managing-individual-accounts#updating-capabilities
And you'll want to make sure you add requesting that capability to your 'create Account' API call. https://docs.stripe.com/api/accounts/create#create_account-capabilities-card_payments
Thank you. I will need sometime to read them.
As I read more documentation, it seems like I have to create a merchant in the specific country and then use it as the 'onBehalfOf' parameter, and then transfer part of the fund to our vendor as part of the transfer_data field.
Every one of your vendors would need a Stripe account with Connect.
If that's what you meant, then yes, you've got it.
every of our vendor will have express account, with that acct_xxxx account number.
an IoT (internet of things) platform where vendor can add online payment to activate the machine(games/vending_machine)
It works well for all Australian vendor, and now we have more vendor join from other coutries, hence have to deal with this onBehalfOf
Cool. ๐
Thanks alot
You're very welcome! ๐