#sajid_connect-embedded

1 messages · Page 1 of 1 (latest)

cloud bayBOT
trim fableBOT
#

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.

cloud bayBOT
#

👋 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/1234984656919724082

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

raven coral
#

Hello! Do you ahve an example Payment Intent ID I can take look at?

tight hill
#

py_1PAUzzR2bWiQvRfwxNAmwV20

#

this id of the payment

#

yes

#

this is code I am using:
app.post("/create-payment-intent", async (req, res) => {
const { items } = req.body;

// Create a PaymentIntent with the order amount and currency
const paymentIntent = await stripe.paymentIntents.create({
amount: calculateOrderAmount(items),
currency: "usd",
description: 'Software development services',
shipping: {
name: 'Jenny Rosen',
address: {
line1: '510 Townsend St',
postal_code: '98140',
city: 'San Francisco',
state: 'CA',
country: 'US',
},

},
transfer_data: {
    destination: 'acct_1PA9YDR2bWiQvRfw',
  },
  application_fee_amount: 1400,

// In the latest version of the API, specifying the `automatic_payment_methods` parameter is optional because Stripe enables its functionality by default.
automatic_payment_methods: {
  enabled: true,
},

});
console.log("payment intent id: ",paymentIntent.id)
res.send({
paymentIntent: paymentIntent,
clientSecret: paymentIntent.client_secret,
});
});

tight hill
raven coral
#

I don't think there's any way for you to easily change what's in the "From" column and we call that ou t in the docs - https://docs.stripe.com/connect/supported-embedded-components/payments#allow-your-connected-accounts-to-manage-destination-charges

By default, the embedded components offer limited information for destination charges and separate charges and transfers. They don’t provide access to customer information, payment methods, and some charge amount details. The destination_on_behalf_of_charge_management feature allows a connected account to see additional information with destination charges, as well as perform refunds and manage disputes.

#

You'd have to switch to using on_behalf_of with Payments, which will change the merchant of record as well

tight hill
#

like this one:
// Set your secret key. Remember to switch to your live secret key in production.
// See your keys here: https://dashboard.stripe.com/apikeys
const stripe = require('stripe')('');

const session = await stripe.checkout.sessions.create({
line_items: [
{
price_data: {
currency: 'usd',
product_data: {
name: 'T-shirt',
},
unit_amount: 1000,
},
quantity: 1,
},
],
payment_intent_data: {
application_fee_amount: 123,
on_behalf_of: '{{CONNECTED_ACCOUNT_ID}}',
transfer_data: {
destination: '{{CONNECTED_ACCOUNT_ID}}',
},
},
mode: 'payment',
success_url: 'https://example.com/success?session_id={CHECKOUT_SESSION_ID}',
});

raven coral
trim fableBOT
hallow carbon
#

sajid_connect-embedded

tight hill
#

can you provide link to checkout component that i can use at frontend.

hallow carbon
tight hill
#

that customer will use to make a payment.