What's wrong with this Stripe API call?

Hey guys,

I get this error when trying to setup simple Stripe call

There was an issue setting up your call.
undefined error: this header name is not correct undefined

I have 2 other call that work fine.

this is the call:

curl https://api.stripe.com/v1/accounts/{{CONNECTED_STRIPE_ACCOUNT_ID}}
-usk_test_5234e2442…:
-d “settings[payouts][schedule][interval]”=manual

doc1: Using manual payouts | Stripe Documentation
doc2: Update an account | Stripe API Reference

this probably sth with “settings[payouts][schedule][interval]” :thinking:

any help? :pray:

1 Like

For the future generations:

this works:

4 Likes

The Future generation thanks you !

2 Likes

@bartek.dev I’m trying to get Stripes Checkout session to work for my application. For some reason I keep running into errors.

How did you get yours to work?

Thanks

You need to be more specific. What errors?

see this topic

@bartek.dev This is the error I keep on getting posted below. I ask attached a screenshot of the parameters in my POST call.

Raw response for the API
Status code 400
{
“error”: {
“message”: “Invalid request (check that your POST content type is application/x-www-form-urlencoded). If you have any questions, we can help at Stripe: Help & Support”,
“type”: “invalid_request_error”
}
}

You need to set your parameters as querystrings. You have also formatted the parameter keys incorrectly for Stripe.

I suggest reading through the post linked to above as I explain in more detail how to create a checkout session.

@adamhholmes I did see that and did fix that. Now I get the following error about payment_method_types.

{
“error”: {
“message”: “Invalid array”,
“param”: “payment_method_types”,
“type”: “invalid_request_error”
}
}

change ‘cards’ to ‘card’

@bartek.dev Did that, but still getting the error. In your stripe account did you already have accept a payment setup? That is the only thing I can think of maybe causing this issue.

what if you setup up the payment param key as this `payment_method_types[0]’ and uncheck the ‘private’

Not really sure what you mean. If sth is wrong with your account setup the response from the api should have some details about that if you initialize the call correctly

Okay, that seemed to work, but now I get line.item.quantity issue. I guess this is going to be the point I run into errors after solving one.
Status code 400
{
“error”: {
“message”: "Quantity is required. Add quantity to line_items[1]",
“param”: “line_items[1]”,
“type”: “invalid_request_error”
}
}

I was able to solve the last issue I was having by adding 4 line.item.quantity parameters since I have 4 items a user can purchase. Do you know away around being able more than one discount.coupon in my API call?

@bartek.dev did you go through the process of using stripes prebuilt checkout page? If not, and you did it yourself? How did you do it? Because on my form when I hit complete payment it does not take me to the checkout pass where users can enter the coupon code.

nope

yes I use Stripe checkout page

If you are building transparent payments then you have different setup than mine. Search the forum + youtube - this is pretty basic and solved dozens of time already. If you want to use Stripe Checkout page, see the topic I shared above. There is step by step solution there

Sorry for the late response. I have been able to figure everything out in dev mode. How can I get this to work when I want this to work in live mode? I get this error when I add a live product key to my api call.

Raw response for the API
Status code 400
{
“error”: {
“code”: “resource_missing”,
“doc_url”: “https://stripe.com/docs/error-codes/resource-missing”,
“message”: “No such price: ‘price_1IJQOYF0uyp2jlqjGQLBCSxW’; a similar object exists in live mode, but a test mode key was used to make this request.”,
“param”: “line_items[0][price]”,
“type”: “invalid_request_error”
}
}

You should initiate the call with the dev data. If it works you don’t have to change anything in API connector.

Also, use the private key in header as authentication method so you can have the dev mode working and live mode working.

If you don’t have price object in your live mode it will not work. So when using the created API call within the workflow action you have to pass the right data. And it should work if the dev mode is working as well.

I was actually able to figure it out. Thanks for getting back to me though. Its much appreciated.

I’m having trouble with the API Connector to get a call setup properly…getting the same error message of resource missing

When I look at my Stripe logs for failed, I see nothing associated with the call I am trying to initialize using the API Connector.

I’m referring to the Stripe API docs here for how to retrieve the card

https://stripe.com/docs/api/cards/retrieve

In my database I am saving the card id that is created when I use the Stripe.JS plugin.

Just can’t seem to get the API Connector to initialize using this setup

I know the id that is being provided in the setup exists because I see it in my Stripe dashboard as being attached to a customer.

I also tried to manually add the response, so I just copied the response from the Stripe Documentation into the API Connector

This allowed me to actually map the fields from the call

Which made me think I at least got the call initialized and setup properly…however, when I try to use the call I get the same error I was previously but in the debugger

No idea why it keeps saying the resource is missing as I have the card in my Stripe account test data

Screen Shot 2021-03-02 at 7.02.33 PM

At a complete loss on what could be the issue.

Just tested my hand at another Stripe API Call for the customer and it works fine…makes me believe there may be some bug for the credit card call.

Are you using the proper test/live key?