#muhammadadeel_63187

1 messages ยท Page 1 of 1 (latest)

echo sandBOT
eager fjord
#

Hi there ๐Ÿ‘‹ this endpoint can be used to retrieve the line items from a tax calculation, so you can review those outputs again:
https://stripe.com/docs/api/tax/calculations/line_items?lang=php
you should see a PHP snippet on the right side there to help get you started.

edgy torrent
#

is there way for automaticaly create invoice agaist payment intent
OR create custome invoice and attach it with payment intent?

eager fjord
#

No, it's the other way around. You create an Invoice, and the Invoice creates its own Payment Intent.

edgy torrent
#

No such calculation: 'Stripe\\Collection JSON: {\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"tax_li_OpssAkiGymLXiI\",\n \"object\": \"tax.calculation_line_item\",\n \"amount\": 500,\n \"amount_tax\": 50,\n \"livemode\": false,\n \"product\": null,\n \"quantity\": 1,\n \"reference\": \"General migration consultation\",\n \"tax_behavior\": \"exclusive\",\n \"tax_code\": \"txcd_10103001\"\n }\n ],\n \"has_more\": false,\n \"url\": \"\\/v1\\/tax\\/calculations\\/taxcalc_1O2D6xBQlQWboC12fs13mmvt\\/line_items\"\n}'"

#

$taxCalculation = $stripe->tax->calculations->allLineItems($taxId);

      $taxTransaction = $stripe->tax->transactions->createFromCalculation([
        'calculation' => $taxCalculation,
        'reference' => $request->payment_intent_id,
        'expand' => ['line_items'],
      ]);
#

on createFromCalculation its returning No such calculation

#

its returning tax_
not taxcalculation_

eager fjord
#

A tax calculation returns tax amounts. What are you hoping to retrieve?

edgy torrent
#

it shuold return taxcalculation object as its returning on create

eager fjord
#

We don't have an endpoint for retrieving tax calculation objects specifically. If you're going to need to rely on the output of the tax calculation creation request later, and retrieving the line items of that tax calculation aren't sufficient, then you may want to log/persist the output of the creation request on your end so you can reference it later.

edgy torrent
#

how create an Invoice, and the Invoice creates its own Payment Intent.

eager fjord
#

This is a good point for getting started with Invoices:
https://stripe.com/docs/invoicing
It has links to guides for creating them from the dashboard, as well as how to build an API-based integration for them if that's what you're after instead.

edgy torrent
#

its creating only invoice not have paymnet intnt

eager fjord
#

That happens when the Invoice is finalized.

edgy torrent
#

when i creating payment intent its have invoice_id that is null
on creating intent there is no way to create invoice automaticlly?