#.saberkhan

1 messages · Page 1 of 1 (latest)

bitter marlinBOT
wooden compass
brisk moat
#

I have read it but output fields are not in the above linked document.

wooden compass
brisk moat
#

I need to know the output fields that are displayed when input is tax_rate_id during creation of Checkout session.

wooden compass
#

You can just create a checkout session and check it out yourself. Did you expand the line_items field in the creation request?

brisk moat
#

No

wooden compass
#

Ok, you should expand it

brisk moat
#

Ok

#

There are several fields for line_items, which one is relevant to get response of detail information of tax collected by Stripe.

#

"total_details": {
"amount_discount": 0,
"amount_shipping": 0,
"amount_tax": 0
},

#

This is the response when I expanded line items. Am I missing any fields from the response for the Checkout session?

#

"total_details": {
"amount_discount": 0,
"amount_shipping": 0,
"amount_tax": 10000
},

#

I am not getting tax_rate_id. Is there a way to get tax_rate_id?

wooden compass
brisk moat
#

cs_test_b1nAFcyMpHtiSXI97xLGJVASeKNyIpoHY3WW5ntZVdGMJGCYns6W9oMwF9

wooden compass
brisk moat
#

Is "total_details.breakdown" field available during creation of Checkout session. I have not seen in the Stipe documentation.

#

I have seen "total_details.breakdown" field in Checkout session object but it is not inlcuded in "Create Checkout session". Am I missing anything here?

wooden compass
#

Yes total_details.breakdown' is included in the checkout session creation response if you add expand: ['total_details.breakdown'] in your requet.

brisk moat
#

Let me try

wooden compass
#

Request ID?

brisk moat
#

{
"error": {
"code": "parameter_unknown",
"doc_url": "https://stripe.com/docs/error-codes/parameter-unknown",
"message": "Received unknown parameter: total_details",
"param": "total_details",
"request_log_url": "https://dashboard.stripe.com/test/logs/req_nuzIfqzUa8NmRV?t=1689901886",
"type": "invalid_request_error"
}
}

Learn more about error codes and how to resolve them.

#

No request id.

wooden compass
#

This is the request ID req_nuzIfqzUa8NmRV

#

Are you trying to set a total_details in your request?

brisk moat
#

I set it using an unique string id and getting above error.

wooden compass
brisk moat
#

Ok

#

"total_details[breakdown][taxes][rate][id]. I did not add any input but still getting above error? Am I missing something here?

wooden compass
brisk moat
#

Let me try

wooden compass
#

And this isn't a param that checkout session creation APi acceipt

brisk moat
#

So how can I get response using total_details[breakdown][taxes][rate][id]?

wooden compass
#

Just to clarify, you want total_details[breakdown] included in the response, am I right?

brisk moat
#

Correct

wooden compass
#

total_details.breakdown' is included in the checkout session creation response if you add expand: ['total_details.breakdown'] in your request.

brisk moat
#

I added this code ['total_details.breakdown'] in the request, still getting the same error.

wooden compass
#

Send me the Request ID

brisk moat
#

"error": {
"code": "parameter_unknown",
"doc_url": "https://stripe.com/docs/error-codes/parameter-unknown",
"message": "Received unknown parameter: 'total_details.breakdown'",
"param": "'total_details.breakdown'",
"request_log_url": "https://dashboard.stripe.com/test/logs/req_5PhUr5oTUKXt1g?t=1689902701",
"type": "invalid_request_error"
}
}

Learn more about error codes and how to resolve them.

#

I do not have request id

wooden compass
#

And your code

brisk moat
#

Code is in postment. Difficult to copy and paste.

wooden compass
#

You should replace

with

expand: ['total_details.breakdown']
brisk moat
#

Let me try

wooden compass
#

You are sending expand: "['total_details.breakdown']", and it isn't a valid array.

#

It should be expand: ['total_details.breakdown']

brisk moat
#

Postman code is different. Still error

#

I have no clue how to work around it.

brisk moat
#

Is it possible for you to check if "Expand" feature is allowed in postman?