#dammyola

1 messages · Page 1 of 1 (latest)

reef spearBOT
steep sail
#

Hi, let me help you with this.

pure rose
#

Thanks

steep sail
#

What's the challenge you're facing exactly?

pure rose
#

I want to know how to do such integration, maybe a Stripe service that I can look into.

fair vine
#

You need to be looking at Connect to facilitate multiparty payments

pure rose
#

I've checked the Connect docs and I saw this code.


const session = await stripe.checkout.sessions.create({
  mode: 'payment',
  line_items: [
    {
      price: '{{PRICE_ID}}',
      quantity: 1,
    },
  ],
  payment_intent_data: {
    application_fee_amount: 123,
    transfer_data: {
      destination: '{{CONNECTED_ACCOUNT_ID}}',
    },
  },
  success_url: 'https://example.com/success',
  cancel_url: 'https://example.com/cancel',
});

The above code seems to be spilling the amount a user pays at checkout. However, that's not the case with us.

Users can checkout for any of our product/packages but connected account (trainers) don't get paid. They only get paid say $10 for every user they train on the platform.

We are only interested in paying trainers based on the number of users they train.

fair vine
#

Then that's somethign you'd need to track in your application, and then utilise a separate transfer to send X amount to the account at the end of the period

pure rose
#

Yeah, we'll tracking that in our application.

#

Let me check the link out.