#deondk-Connect

1 messages · Page 1 of 1 (latest)

random grove
#

Hi there, are you using on_behalf_of flag when making the destination charge?

pearl ginkgo
#

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?

random grove
pearl ginkgo
#

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

random grove
#

description? or are you talking about statement descriptor?

pearl ginkgo
#

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

random grove
#

Maybe you want to explain the screenshot? i.e., what's the description before and what's the description now?

pearl ginkgo
#

ok the screenshot is the express customers dashboard. where he views payments made to him.

random grove
#

and I have no visibility on what you passed to payment.Description

pearl ginkgo
#

so it is showing an auto generated description by stripe.

#

the payment.Description field is only showing up on the platform account

random grove
#

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?

pearl ginkgo
#

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

random grove
#

I've download this screenshot, please delete it from the discord as it contains customer email addresses.

pearl ginkgo
#

done

random grove
#

Got it, thanks for the explanation. Let me find a solution.

pearl ginkgo
#

thanks a lot!

random grove
#

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.

pearl ginkgo
#

is there some documentation on this?

random grove
#

I'm afraid not, it's not a usual use case and not many users require it.

pearl ginkgo
#

ok let me see if I can get it right.

#

and I can do this right after payment intent is confirmed?

random grove
#

Yes, whenever the charge object is available.

pearl ginkgo
#

on the paymentIntent I can see a TransferData object

#

is this where I will get the transfer?

#

I am in DotNet

random grove
pearl ginkgo
#

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?

random grove
#

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.

pearl ginkgo
#

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?

random grove
pearl ginkgo
#

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!

random grove
#

I'm happy to hear that!