#thehollytoats_code

1 messages ยท Page 1 of 1 (latest)

fluid anvilBOT
#

๐Ÿ‘‹ 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.

mossy gorge
#

Hi ๐Ÿ‘‹

When yousset onBehalfOf, it changes the merchant of record. Does that account have Apple and Google Pay enabled?

eager harness
#

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.

mossy gorge
#

Does the UK account have Apple Pay or Google Pay enabled?

#

Can you provide me the public URL where I can see this behavior?

eager harness
mossy gorge
#

I see Google Pay just fine

eager harness
#

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

mossy gorge
#

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

eager harness
#

oh sorry, I remove the OnBehafOf just now, just to take a screenshoot for you.

mossy gorge
#

Can you display one or the other? Embedded Checkout or Express Checkout Element? Also what is the account ID for the Connected Account?

eager harness
#

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');

mossy gorge
#

In that situation you are now the merchant of record

eager harness
#

when I apply onBehalfOf: acct_1PI8fTQ9jtDgzd7T, the button disappear.

#

what should I put in the onBehalfOf?

mossy gorge
#

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?

eager harness
#

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

mossy gorge
#

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

eager harness
#

In this problem, the button doesn't even show up. The payment intent has not been created.

mossy gorge
#

I recognize that but I want to call out another source of failure before it happens

eager harness
#

When the button is pressed, then the payment intent is created.

fluid anvilBOT
mossy gorge
#

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.

eager harness
#

oh

#

I changed it to 'On' just now, and I still don't see the button.

leaden tinsel
eager harness
#

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.

leaden tinsel
#

Every one of your vendors would need a Stripe account with Connect.

#

If that's what you meant, then yes, you've got it.

eager harness
#

every of our vendor will have express account, with that acct_xxxx account number.

leaden tinsel
#

Perfect. ๐Ÿ™‚

#

What are you building?

eager harness
#

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

leaden tinsel
#

Cool. ๐Ÿ™‚

eager harness
#

Thanks alot

leaden tinsel
#

You're very welcome! ๐Ÿ™‚