#g-west_api

1 messages ¡ Page 1 of 1 (latest)

unreal palmBOT
#

👋 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.

dire rose
polar wigeon
#

the attribute returns nothing

dire rose
#

What's the in_xxx?

polar wigeon
#

i have the returns stored in a class, so i call
self.stripe.Invoice.finalize_invoice(self.new_invoice.id)

dire rose
#

Please paste the in_xxx ID here

polar wigeon
#

ive also tried it with self.new_invoice_item.id

#

okay 1 sec

dire rose
#

I need an ID, I can't check anything without that

polar wigeon
#

its on a VM so i have to type it manually

dire rose
#

Just grab it from the Dashboard

polar wigeon
#

in_1PeEWlGwXB0l0nSmGUI5HL1d

dire rose
#

So I'm not sure what the issue is?

polar wigeon
#

Maybe that portion of the API is broken

dire rose
polar wigeon
#

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

dire rose
#

Then share a req_xxx ID and the JSON response where it is null please

polar wigeon
#

sure thing one sec ill print out both invoice and invoice item reponses

unreal palmBOT
polar wigeon
#

where would the req id be located?

#

sorry im running off no sleep

polar wigeon
#

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

onyx rivet
#

so this feels like more of a code issue

polar wigeon
#

my code is like 11 lines, it cannot be the code unless theres parameters missing

#

ill copy the code one sec

onyx rivet
#

like it would just be

invoice = stripe.Invoice.finalize_invoice(id)
url = invoice.hosted_invoice_url
polar wigeon
#

it would not be (id) because the invoice is stored in the class as well

onyx rivet
#

where's the code where you finalize the invoice?

onyx rivet
#

seems like the problem is you are not assigning that result to anything.

#

so new_invoice is still the old object pre-finalization

onyx rivet
polar wigeon
#

checking now

#

that works appreciate it