#hiekki4
1 messages · Page 1 of 1 (latest)
Hello, can you send me the ID for this price (price_1234)?
price_1NcC3UBe5KiwCS6eqMkobIwq
Thank you. And where in the API are you seeing 0,36€?
price retrieve
{
"id": "price_1NcC3UBe5KiwCS6eqMkobIwq",
"object": "price",
"active": true,
"billing_scheme": "per_unit",
"created": 1691347916,
"currency": "eur",
"custom_unit_amount": null,
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"product": "prod_OP03FViCZQcaq8",
"recurring": {
"aggregate_usage": "sum",
"interval": "month",
"interval_count": 1,
"trial_period_days": null,
"usage_type": "metered"
},
"tax_behavior": "exclusive",
"tiers_mode": null,
"transform_quantity": null,
"type": "recurring",
"unit_amount": null,
"unit_amount_decimal": "0.36"
}
That is expected for that field. unit_amount_decimal displays the price in cents https://stripe.com/docs/api/prices/object#price_object-unit_amount_decimal
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
so how can i get the 0,0036?
0,0036 won't show up in the API. You will need to use the unit_amount_decimal field and divide its value by 100