#g-west_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/1263818907685228565
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
the attribute returns nothing
What's the in_xxx?
i have the returns stored in a class, so i call
self.stripe.Invoice.finalize_invoice(self.new_invoice.id)
Please paste the in_xxx ID here
I need an ID, I can't check anything without that
its on a VM so i have to type it manually
Just grab it from the Dashboard
in_1PeEWlGwXB0l0nSmGUI5HL1d
It was marked as paid when you finalized as there was balance applied from the associated cus_xxx
But, I can see hosted_invoice_url is set in your /finalize request response: https://dashboard.stripe.com/test/logs/req_OCBVxsu1BIArXH
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
So I'm not sure what the issue is?
the issue at hand
Maybe that portion of the API is broken
But the link above disproves that. You can see the field is set in the response. Please share the returned JSON from your request here
Sure the link above may store the link on the dashboard it is not able to be retrieved with my API test key at this moment
Then share a req_xxx ID and the JSON response where it is null please
sure thing one sec ill print out both invoice and invoice item reponses
i need nitro to send the entire JSON reponse
here are portions:
{
"account_country": "US",
"account_name": "dotVenv",
"account_tax_ids": null,
"amount_due": 0,
"amount_paid": 0,
"amount_remaining": 0,
"amount_shipping": 0,
"application": null,
"application_fee_amount": null,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
"automatic_tax": {
"enabled": false,
"liability": null,
"status": null
},
"automatically_finalizes_at": 1721392921,
"billing_reason": "manual",
"charge": null,
"collection_method": "charge_automatically",
"created": 1721389320,
"currency": "usd",
"custom_fields": null,
"customer": "cus_QS1uB875X4xuto",
"customer_address": null,
"customer_email": "test@gmail.com",
"customer_name": "Junior Gall",
"customer_phone": null,
"customer_shipping": null,
"customer_tax_exempt": "none",
"customer_tax_ids": [],
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
"description": "New Project Invoice: (test)",
"discount": null,
"discounts": [],
"due_date": null,
"effective_at": null,
"ending_balance": null,
"footer": null,
"from_invoice": null,
"hosted_invoice_url": null,
"id": "in_1PeFCGGwXB0l0nSmmj8Ck86i",
"invoice_pdf": null,
"issuer": {
"type": "self"
},
"last_finalization_error": null,
"latest_revision": null,
"lines": {
"data": [],
"has_more": false,
"object": "list",
"total_count": 0,
"url": "/v1/invoices/in_1PeFCGGwXB0l0nSmmj8Ck86i/lines"
},
"livemode": false,
"metadata": {
"dv_api_key": "(PRIVATE)",
"project_hash": "(PRIVATE)",
"project_name": "test",
"project_status": "active"
},
"amount": 2000,
"currency": "usd",
"customer": "cus_QS1uB875X4xuto",
"date": 1721389321,
"description": null,
"discountable": true,
"discounts": [],
"id": "ii_1PeFCHGwXB0l0nSm4TE7Pspw",
"invoice": "in_1PeFCGGwXB0l0nSmmj8Ck86i",
"livemode": false,
"metadata": {},
"object": "invoiceitem",
"period": {
"end": 1721389321,
"start": 1721389321
},
"plan": null,
"price": {
"active": false,
"billing_scheme": "per_unit",
"created": 1721389321,
"currency": "usd",
"custom_unit_amount": null,
"id": "price_1PeFCHGwXB0l0nSmKkzmRi5o",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
"product": "prod_QVFhaS0lBIm5gH",
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
"transform_quantity": null,
"type": "one_time",
"unit_amount": 2000,
"unit_amount_decimal": "2000"
},
"proration": false,
"quantity": 1,
"subscription": null,
"tax_rates": [],
"test_clock": null,
"unit_amount": 2000,
"unit_amount_decimal": "2000"
}
req_hexv6PQOoAw0i0
to be clear you can see in the response we logged there is a URL : https://dashboard.stripe.com/test/logs/req_hexv6PQOoAw0i0
so this feels like more of a code issue
my code is like 11 lines, it cannot be the code unless theres parameters missing
ill copy the code one sec
like it would just be
invoice = stripe.Invoice.finalize_invoice(id)
url = invoice.hosted_invoice_url
it would not be (id) because the invoice is stored in the class as well
where's the code where you finalize the invoice?
here
seems like the problem is you are not assigning that result to anything.
so new_invoice is still the old object pre-finalization
hence why you should do it this ^^ way