#keremkusmezer-transfer-metadata

1 messages · Page 1 of 1 (latest)

signal forum
#

@elder quarry 👋 what's your question?

elder quarry
#

return this.stripe.paymentIntents.create({
amount: amount,
currency: currency,
customer: customer.id,
description: ${orderDetailText} ${sellerUser.retrieveName()},
payment_method: paymentMethodId,
application_fee_amount: applicationFee,
transfer_data: {
destination: sellerUser.stripeConnectedAccountId,
},
receipt_email: buyerUser.email,
metadata: orderData,
});

signal forum
#

that sets metadata on the PI itself but not on the resulting Transfer in that case. There's no way to automate this

elder quarry
#

yes exactly, the question is how can i set metadata there ok great thx for the quick answer

#

i will investigate

signal forum
#

Basically the PaymentIntent has a charges collection today in the response after successful confirmation. That has a Charge (or multiple after failures) in it and so you get the Transfer id by doing something like paymentIntent.charges.data[0].transfer if that makes sense

elder quarry
#

yeah i can filter through that collection get the id then after i can enrich the entity with the metadata i have in hand

#

thx