#muhammad-adeel_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/1296400674313207828
đ 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.
- muhammad-adeel_api, 16 minutes ago, 5 messages
i need to creat one-time product with Api and collect payment with invoice from customer
hi
The Product Id prod_R2tfHIsA8tX1wD seems a good one
what is the issue you are facing with it ?
i need to create one-time product
for collecting one-time payment with invoice from customer
as have option in creting invoice from dashboard
its showing option of "Add one-time item".
i need this in Api
@lusty sable ?
Yes you need to create a Price for you product
its returning the type is recuring
but i need one-time
Can you share the price_id ?
price_1QAqB4BQlQWboC12PWrZJAdQ
according to the creation request, your integration sent recurring
req_vnCurBSA5cOSxH
You need to remove the recurring object from the creation request
It seems you are using Laravel Cashier which is sending this object.
we wouldn;t know how to write it in Lavarel's syntax, we don't support that directly. I'm sure there's a way to use it that creates a one-time price instead of recurring. At the raw API level, you would remove the recurring object in the params.
please provide raw Api
because when i am using direct Api to create price it's by default set recurring
and when i set type = 'one-time' it/s returning error of invalid param of type.
https://docs.stripe.com/api/prices/create
something like
curl https://api.stripe.com/v1/prices
-u "sk_test_zzPhAh8sZkhmI4JDtzTNnhGl:"
-d currency=usd
-d unit_amount=1000
-d "product_data[name]"="Gold Plan"
you have still not set flag of it's recurring or one-time
its created product in catalog
but
i have checked.
on creating invoice with one-time Item
it's not listed on product cataloge.
that's i required
not sure what you're saying, sorry.
can you see on creting invoicing from dashboard
in items section
there is an option
Add on-time item
when i create this type of invoice
stripe send invoice with item to customer
but
not create actual product in product cataloge
need this funtionality via Api
that's why https://docs.stripe.com/api/invoiceitems/create?lang=curl#create_invoiceitem-unit_amount is for then.
you can use ^^ that to add items to an invoice without a pre-existing Price price_xxxx object