#deondk-Connect
1 messages · Page 1 of 1 (latest)
this is how my code looks:
var options = new PaymentIntentCreateOptions
{
Amount = longAmount,
Currency = currency.CurrencyCode,
Description = payment.Description,
PaymentMethodId = payment.StripeCardId,
CustomerId = payment.StripeCustomerId,
TransferData = new PaymentIntentTransferDataOptions
{
Destination = subvendorMerchantId,
},
Confirm = true,
ApplicationFeeAmount = (long)totalApplicationFee,
ReturnUrl = "https://www.lastmanstands.com/auth-load"
};
what is the easiest way to get desired change?
You can use on_behalf_of param https://stripe.com/docs/api/payment_intents/create#create_payment_intent-on_behalf_of so that the connected account’s address and phone number shows up on the customer’s credit card statement (as opposed to the platform’s)
will the description also show up? instead of the auto generated one
the description is most important because it contains user details for them to cross reference
description? or are you talking about statement descriptor?
please see the image I attached.
before moving to destination charges these descriptions was the same as on platform account
which is a custom description
e.g the description field on above code I sent you
Maybe you want to explain the screenshot? i.e., what's the description before and what's the description now?
ok the screenshot is the express customers dashboard. where he views payments made to him.
and I have no visibility on what you passed to payment.Description
so it is showing an auto generated description by stripe.
the payment.Description field is only showing up on the platform account
Sorry I don't really understand you. Can you just show me the description before and the description now? so that I can see the difference?
I will send you the descriptions as they are on platform account
this is what is showing up on the platform account...which is right
and the same description used to show up on the express account when we did direct charges
I have had Stripe activated custom descriptions on our platform account
The "Payment from Last Man Stands LTD" description on the express account is auto generated from stripe per payment
remember I am not talking about the actual user making the payment
I've download this screenshot, please delete it from the discord as it contains customer email addresses.
done
Got it, thanks for the explanation. Let me find a solution.
thanks a lot!
Thanks for the waiting. First of all, it's the the description you set on the platform will not propagate to the connected account's charge. This is expected behavior as we treat this information as private to the platform.
Having said that, it's possible to update the charge on the connected account with the platform's description, it requires some development.
First off, to get the corresponding payment id you’d need to do two steps. The first step is to get the id of the transfer associated with the charge which is in the transfer property on the charge object. Then, you would retrieve that transfer and you’d see the destination_payment property corresponding to the payment on the connected account (py_XXX).
You can get all of this in one API call by using the expand feature and passing transfer to get the transfer property expanded in the response. This gives you access to the payment id (py_XXX) directly in that API call.
Then, once you get this, you’d call the Update Charge API using the Stripe-Account header so that you can set the description or metadata you want on that payment.
is there some documentation on this?
I'm afraid not, it's not a usual use case and not many users require it.
ok let me see if I can get it right.
and I can do this right after payment intent is confirmed?
Yes, whenever the charge object is available.
on the paymentIntent I can see a TransferData object
is this where I will get the transfer?
I am in DotNet
https://stripe.com/docs/api/charges/object#charge_object-transfer I'm not familiar with dotNet, but transfer is a property of the charge object.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
but how do I get the charge object once I have the paymentIntent?
ok I see the pi has a list of charges linked to it.
ok I have the transferId
You can get all of this in one API call by using the expand feature and passing transfer to get the transfer property expanded in the response. This gives you access to the payment id (py_XXX) directly in that API call.
not sure I understand above
which API call should I use?
The charge retrieval API, you can expand the transfer field so that you don't need to make another transfer retrieval API call to get the transfer object.
This is how you expand the responses in dotNet https://stripe.com/docs/api/expanding_objects?lang=dotnet
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I have the charge object. But there is only a transfer ID in there the transfer object is null
where is an example of the Charge retrieval API?
https://stripe.com/docs/api/charges/retrieve?lang=dotnet all the information are available in the API reference
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
ok got the transfer payment id
is there docs on updating a charge
dont worry
got it
do I use the DestinationPaymentId on the transfer object to update charge?
something like this:
var updateCharge = service.Update(charge.Transfer.DestinationPaymentId, options3);
ok great
got it working
thanks for the help!
I'm happy to hear that!