#marques-subscription-price
1 messages ยท Page 1 of 1 (latest)
Hi ๐
Can you share am API request ID? It will start with req_
Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
Let's talk in this thread
sure
sure one sec ,
let me find it
where do I get that?
req_1j5SxxmJOhLlDS
that right
This is a GET request that returns a Price object
I can't see anything about it
What are you trying to do?
I want to get
the price of my subscription
so , Ipprivd ethe price_id and then I would get the information abt this product
thats whats expected
but thats what I get
with the exact same code
When you say you want to get the "price of your subscription" what do you mean? Do you mean the Price objects that are associated with your subscription? Or the total amount to be charged for a billing cycle?
marques-subscription-price
@steel lynx https://stripe.com/docs/billing/invoices/subscription#previewing is this what you want? Sorry that's not super clear
I want to profide price_id of subscription
and get the data of it
specially the price
am I able to do that with that code you sent?
I'm sorry, you're writing a lot of really short sentences without much context. "get the data of it" is vague. If you have a Subscription, you can retrieve it via the API https://stripe.com/docs/api/subscriptions/retrieve and get the full object back which has all the Price(s) associaged with it. The upcoming Invoice API will show you what their next Invoice will look like.
Please try playing with this in Test mode first to get a feel for it
ok so what I mean is
Please try to write one clear sentence all in one message
I have a place where users can see the options of subscriptions, its features and name
I want to show the PRICE of the subscription on It, BEFORE they get to the stripe website
basically, I want to show subscription details such as price before they go in the stripe website
What does "they get to the stripe website" mean? https://stripe.com is for developers or Stripe users.
I'm really sorry but there are 11 other people asking for help right now and I'm really struggling to follow what you are asking.
Please try to be crisp and concise all in one message, explaining what product(s) of Stripe you are using, what your overall flow is, etc.
thats ok
look
when users click a button they are brought to the Stripe website, where they can see the price, photo of subscription and pay it right?
basically all I want to do is
endpoitn receives PRICE_ID
endpoint returns The values I want, such as Price
@steel lynx I'm sorry but can you try to take a step back and explain things in one message. You type return every message with little to no info each time.
You still stay "brought to the Stripe website" with no explanation at all.
I will take pictures, one second
I don't want pictures, this will make things worse. I'm trying to push you to clearly explain your overall integration and use Stripe's vocabulary so that I can help you integrate our products and APIs properly.
I'm guessing you mean Stripe Checkout for example. Please try to be crisp about this.
ok look
I just want to have an endpoint where receives a price_id and returns data of the subscription, such as price, name and etc
that is it
https://stripe.com/docs/api/prices/retrieve
just like that endpoint, Ibut it does not work at all
That API absolutely works totally fine.
I'm really sorry, you're really just repeating the same thing with no information ๐ฆ
I keep asking for it and I get you're frustrated but you haven't mentioned one product, said what doesn't work, sahred any real code beyond one picture of creating the PriceService.
look
this is not what is expected from the documentation
thats the third on secont time that I provide these details here btw
idk what other information you need
Is this your first time using our API ever and that last picture is the first Stripe code you ever wrote? Or do you already have Checkout running?
I do have checkout running on the dev env only
Never published anything using you rAPI yet
Okay can you share the exact code for creating a Checkout Session please?
here is the code I copied from https://stripe.com/docs/api/prices/retrieve
but I get different results
this is not related to checkout creation but sure.
[HttpGet("DEVTEST")]
public async Task<IActionResult> ProductListByCountry()
{
//subsResponse.Add(subDto);
StripeConfiguration.ApiKey = "id"
var service = new PriceService();
service.Get("price_1NHX8ZCLLdrjzwRf7pHSAJZh");
return Ok(service);
}
this is the code that we are talking about.
yeah I don't understand how that Checkout code can work you have the same issue
Anyways the problem is that you didn't understand how our stripe-dotnet library works exactly. The .Get() call (And any other call) is returned a response but you never stored it
and then you return the service which is an internal structure of the library
you want ```
var service = new PriceService();
var myPrice = service.Get("price_1NHX8ZCLLdrjzwRf7pHSAJZh");
After that line `myPrice` is the full Price object and you can do `myPrice.Id` for example
And you want to do this for all calls you make with our library like var priceCreated = service.Create(...); and such
Does that make sense?
perfect, that was all that I needed