#MorenoMdz - Metadata
1 messages · Page 1 of 1 (latest)
Hello! You can set metadata when objects are created, or you can update existing objects with metadata. For example, with a Transfer, you can use this API to set the metadata: https://stripe.com/docs/api/transfers/update#update_transfer-metadata
yea every transfer in our system we add specific metadata, but the ones I am getting with the curl from the API docs is not populating the metadata field, for example:
curl -G https://api.stripe.com/v1/transfers \
-u sk_test_key: \
-d limit=100
Can you give me one of the Transfer IDs which should have metadata?
@solar gazelle sure, before let me confirm I am getting the correct data, how do I sort to fetch the newest registers first in this API?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
All of our list APIs start with the newest items first.
https://stripe.com/docs/api/pagination
Stripe's list API methods utilize cursor-based pagination via the starting_after and ending_before parameters. Both parameters take an existing object ID value (see below) and return objects in reverse chronological order.
hmm checking at this one for example @solar gazelle tr_3LCspD2eZvKYlo2C02wegtL1
thats from 1631564826 which is Mon Sep 13 2021 16:27:06 GMT-0400 (Eastern Daylight Time) so it is getting old data
Do you have an ID of a newer Transfer that you expected to see?
I'm not seeing any more recent Transfers on that account in test mode.
That's on a completely different account.
You're either using the wrong API key to list Transfers, or you need to make a Connect request: https://stripe.com/docs/connect/authentication
thats weird, I am getting that from the test key/example provided in the docs
If you go into the Dashboard you may need to switch to the correct account using the account switcher in the top left corner.
I am in the correct account, what I need is to get this from the API
Are you sure it's the correct API key that belongs to that account?
If you do curl https://api.stripe.com/v1/account -u sk_...: do you get the account you expect back?
let me do that
we are getting the correct data from the python and node SDKs
so ill close this one from now, but I am getting that weird behavior from the test curls in the API docs
Oh I just reloged in the dashboard and came back to the API and now it has the correct API key and the data is correct lol