#gummigun_best-practices
1 messages ยท Page 1 of 1 (latest)
๐ 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/1349790085935272060
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
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.
- gummigun_best-practices, 6 days ago, 18 messages
Since we can see that there are metadata and description fields from the point of view of our connected accounts dashboard. Is there a way to update those fields with the API or somehow pass along those values?
Hi ๐
Yes you can update the metadata property on a Payment Intent after it has been confirmed. We document this here
Would the id here be the "py_1R2EUPPrDb8BF1CL6GofvPOE" that I can see on the screenshot? The example below uses the prefix pi_ not py_
const paymentIntent = await stripe.paymentIntents.update(
'pi_3MtwBwLkdIwHu7ix28a3tqPa',
{
metadata: {
order_id: '6735',
},
}
);
As for the Payment object on the Connected Account that results from a Transfer, you can use the Charge API to update that record. https://docs.stripe.com/api/charges/update#update_charge-metadata
It seems both updating the paymentIntent and updating the charge doesn't get reflected on that payment overview.
In the attached screenshot -- which is from the perspective of the connected account -- it would be payment with id "py_1R2EUPPrDb8BF1CL6GofvPOE" and the Metadata fields and Description fields are blank.
We are just looking for ways to show what the payment was for.
I've tried updating the charge and the payment intent and the transfer but the values only get updated in "our" view, in the records we have access to not the connected account.
Am I then correct in understanding that there are no ways to update the Description or Metadata on the payment itself?
Hello! I'm taking over and catching up...
You can update the metadata on that payment page by updating the metadata as described above. Note that the py_ Charge object exists on the connected account, not on your platform account. It sounds like you may have been adding metadata to the objects on your platform account instead of the py_ object on the connected account.
You need to use this approach to make the metadata update request on the connected account instead of your platform account: https://docs.stripe.com/connect/authentication
this might be it! was not doing it that way
let me give that a try
And it would be updating a charge that I'm looking for rather than payment intent? https://docs.stripe.com/api/charges/update
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Correct, py_ objects are Charges.
Alright getting an error on this. Charge doesn't exist.
const updated = await stripe.charges.update(
"py_1R2EUPPrDb8BF1CL6GofvPOE",
{
metadata: {
externalId: "6735",
},
},
{
stripeAccount: accountId,
},
);
Anything you can spot wrong in that?
Seems like that should work as long as the API key and account ID you're using are correct. Can you give me the ID for that request so I can take a look? Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request