#eterowicz_api
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/1296316131467853826
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
hi there, can you share the request id [0]? it'd look like req_xxx
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
req_zLwZFkdX4t4uDj
which Stripe object do you want the information to be populated on? e.g. PaymentIntent? Charge? Checkout Session?
Checkout session
I'm looking at your request to create a Checkout Session : https://dashboard.stripe.com/test/logs/req_A0WnsSRiBxmGaA - I don't see any metadata being included in the request
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
sorry, I think i it's the wrong request, may I send you another one?
sure
the metadata is there on the Checkout Session, can you paste the full json from when you retrieve that specific Checkout Session object?
oh, it really is now
{
"id": "evt_3QAkdZRriQcsQV6w1R9wonM3",
"object": "event",
"api_version": "2024-04-10",
"created": 1729136674,
"data": {
"object": {
"id": "pi_3QAkdZRriQcsQV6w1cHeOcXs",
"object": "payment_intent",
"amount": 100,
"amount_capturable": 0,
"amount_details": {
"tip": {
}
},
"amount_received": 100,
"application": null,
"application_fee_amount": null,
"automatic_payment_methods": null,
"canceled_at": null,
"cancellation_reason": null,
"capture_method": "automatic_async",
"client_secret": "pi_3QAkdZRriQcsQV6w1cHeOcXs_secret_84qUezRbjQY4XVErxQT5DM38Y",
"confirmation_method": "automatic",
"created": 1729136673,
"currency": "brl",
"customer": "cus_R2qKt7cejj2lV7",
"description": null,
"invoice": null,
"last_payment_error": null,
"latest_charge": "ch_3QAkdZRriQcsQV6w1aiPrX48",
"livemode": false,
"metadata": {
},
"next_action": null,
"on_behalf_of": null,
"payment_method": "pm_1QAkdYRriQcsQV6wwZmLmdMX",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
"installments": null,
"mandate_options": null,
"network": null,
"request_three_d_secure": "automatic"
}
},
"payment_method_types": [
"card"
],
"processing": null,
"receipt_email": null,
"review": null,
"setup_future_usage": null,
"shipping": null,
"source": null,
"statement_descriptor": null,
"statement_descriptor_suffix": null,
"status": "succeeded",
"transfer_data": null,
"transfer_group": null
}
},
"livemode": false,
"pending_webhooks": 1,
"request": {
"id": "req_9Ebw2E3Flt0cLd",
"idempotency_key": "f70fc847-1faa-45b6-bf43-7cf730947b85"
},
"type": "payment_intent.succeeded"
}
my logs show that it stored on the customer metadata : "________________________-EXTERNAL REFERENCE STRIPE CUSTOMER: e9e78f86-936d-48f5-be87-9fc733b8df54"
to be clear, when you pass in the metadata on the Checkout Session object, it will only show on the Checkout Session object. I don't understand what you mean by it's showing on the customer metadata
If you look at the screen shot i sent to you, you gonna see that i passed on both metaData of Customer and Checkout Session
The costumer metadata
This event evt_3QAkdZRriQcsQV6w1R9wonM3 which you shared the json for, is a PaymentIntent object
I'm asking for the Checkout Session object so that I can point you to where the metadata is showing on it
sure
{
"id": "ch_3QAkdZRriQcsQV6w1aiPrX48",
"object": "charge",
"livemode": false,
"payment_intent": "pi_3QAkdZRriQcsQV6w1cHeOcXs",
"status": "succeeded",
"amount": 100,
"amount_captured": 100,
"amount_refunded": 0,
"application": null,
"application_fee": null,
"application_fee_amount": null,
"balance_transaction": "txn_3QAkdZRriQcsQV6w1lpu04C7",
"billing_details": {
"address": {
"city": null,
"country": "BR",
"line1": null,
"line2": null,
"postal_code": null,
"state": null
},
"email": "eterowiczluigi@gmail.com",
"name": "The EterowicZ",
"phone": null
},
"calculated_statement_descriptor": "LUIGI ETEROVIK",
"captured": true,
"created": 1729136674,
"currency": "brl",
"customer": "cus_R2qKt7cejj2lV7",
"description": null,
"destination": null,
"dispute": null,
"disputed": false,
"failure_balance_transaction": null,
"failure_code": null,
"failure_message": null,
"fraud_details": {
},
"invoice": null,
"metadata": {
},
"on_behalf_of": null,
"order": null,
"outcome": {
"network_status": "approved_by_network",
"reason": null,
"risk_level": "normal",
"risk_score": 45,
"seller_message": "Payment complete.",
"type": "authorized"
},
"paid": true,
"payment_method": "pm_1QAkdYRriQcsQV6wwZmLmdMX",
"payment_method_details": {
"card": {
"amount_authorized": 100,
"authorization_code": null,
"brand": "visa",
"checks": {
"address_line1_check": null,
"address_postal_code_check": null,
"cvc_check": "pass"
},
"country": "US",
"exp_month": 5,
"exp_year": 2043,
"extended_authorization": {
"status": "disabled"
},
"fingerprint": "Il4hYE5lMU4AQrTl",
"funding": "credit",
"incremental_authorization": {
"status": "unavailable"
},
"installments": null,
"last4": "4242",
"mandate": null,
"multicapture": {
"status": "unavailable"
},
"network": "visa",
"network_token": {
"used": false
},
"overcapture": {
"maximum_amount_capturable": 100,
"status": "unavailable"
},
"three_d_secure": null,
"wallet": null
},
"type": "card"
},
"radar_options": {
},
"receipt_email": null,
"receipt_number": null,
"receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xUFA3dkNScmlRY3NRVjZ3KKSQwrgGMgYMkPR5lCk6LBZKJKXwWuOO-kNUF7F20SY0PG18u2p15Ab68NZsnTsM6FePEgYvJD_WGSEm",
"refunded": false,
"review": null,
"shipping": null,
"source": null,
"source_transfer": null,
"statement_descriptor": null,
"statement_descriptor_suffix": null,
"transfer_data": null,
"transfer_group": null
}
that's a Charge object. You use https://docs.stripe.com/api/checkout/sessions/retrieve to retrieve a Checkout Session object. The Checkout Session object id starts with the prefix cs_
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
sorry, but where can i find the cs_... id?
it is saying here that i need that id to retrieve
when you create a Checkout Session, there's a response that has the id
oh, ok
you can just paste the response you get from creating a Checkout Session too, i can point you to where the metadata is showing
cs_test_a1yMOxCFitIxD7IqKsxUPPZXEm0GJ1KIzS6u9YiyYvgWKLaEMzeEyt9osH
I had to require a new checkout
okay, like i mentioned, can you paste the response here, either when you create the Checkout Session, or when you retrieve that specific Checkout Session. I want to show you where you can see the metadata
tax_ids: null
},
customer_email: null,
expires_at: 1729224071,
invoice: null,
invoice_creation: {
enabled: false,
invoice_data: {
account_tax_ids: null,
custom_fields: null,
description: null,
footer: null,
issuer: null,
metadata: {},
rendering_options: null
}
},
livemode: false,
locale: null,
metadata: { external_reference: '001da136-557c-4460-a350-9f838a321178' },
mode: 'payment',
payment_intent: null,
payment_link: null,
payment_method_collection: 'if_required',
payment_method_configuration_details: null,
payment_method_options: { card: { request_three_d_secure: 'automatic' } },
payment_method_types: [ 'card' ],
payment_status: 'unpaid',
phone_number_collection: { enabled: false },
recovered_from: null,
saved_payment_method_options: {
allow_redisplay_filters: [ 'always' ],
payment_method_remove: null,
payment_method_save: null
},
setup_intent: null,
shipping_address_collection: null,
shipping_cost: null,
shipping_details: null,
shipping_options: [],
status: 'open',
submit_type: null,
subscription: null,
success_url: 'http://localhost:3000';,
total_details: { amount_discount: 0, amount_shipping: 0, amount_tax: 0 },
ui_mode: 'hosted',
}
Starting Container
Server is running at port 3001
{
id: 'cs_test_a1yMOxCFitIxD7IqKsxUPPZXEm0GJ1KIzS6u9YiyYvgWKLaEMzeEyt9osH',
object: 'checkout.session',
after_expiration: null,
allow_promotion_codes: null,
amount_subtotal: 100,
amount_total: 100,
automatic_tax: { enabled: false, liability: null, status: null },
billing_address_collection: null,
cancel_url: 'http://localhost:3000';,
client_reference_id: null,
client_secret: null,
consent: null,
consent_collection: null,
created: 1729137671,
currency: 'brl',
currency_conversion: null,
custom_fields: [],
custom_text: {
after_submit: null,
shipping_address: null,
submit: null,
terms_of_service_acceptance: null
},
customer: 'cus_R2qaLWAKEnq11G',
customer_creation: null,
customer_details: {
address: null,
email: 'eterowiczluigi@gmail.com',
name: null,
phone: null,
tax_exempt: 'none',
so if you see what you pasted, it's right there metadata: { external_reference: '001da136-557c-4460-a350-9f838a321178' },
๐งโ๐ป How to format code on Discord
Inline code: wrap in single backticks (`)
This:
The variable `foo` contains the value `bar`.
Will turn into this:
The variable
foocontains the valuebar.
Code blocks: wrap in three backticks (```)
Also, you can specify the language after the first three backticks to get syntax highlighting.
This:
```javascript
function foo() {
return 'bar';
}
```
Will turn into this:
function foo() {
return 'bar';
}```
Notes about **code blocks**:
- Specifying the language is optional (e.g., you can omit `javascript` in the example above)
- If you don't specify the language you won't get syntax highlighting
- When you're inside a code block (after you type \`\`\`) the `Return`/`Enter` key will add a new line instead of sending your message
- Once you end the code block `Return`/`Enter` works normally again
You can [read more about message formatting on Discord's website.](https://support.discord.com/hc/en-us/articles/210298617)
ooohhh yesss
If you pass in the metadata in https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-metadata, only the Checkout Session object will contain the metadata.
If you pass in the metadata into payment_intent_data.metadata (this is for mode="payment") - the PaymentIntent and Charge will contain that metadata : https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-payment_intent_data-metadata
You can take a look at https://docs.stripe.com/metadata#set-indirectly too
thank youuu