Best answer

Stripe subscriptions with multiple prices

  • 22 August 2022
  • 6 replies
  • 233 views

Badge

Hi Folks, 

I am trying to build a multi price subscription in stripe via zapier. 

I have the price ID’s

I have the customer ID’s

I have a stripe API key

Stripe subscriptions API endpoint https://api.stripe.com/v1/subscriptions

Ideally I’d like to build this in a webhook post. 

I’ve had a good look but cant seem to find any examples that will work for this. 

Any help greatly appreciated. 

TIA

icon

Best answer by Troy Tessalone 24 August 2022, 18:05

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

6 replies

Userlevel 7
Badge +14

Hi @MysterD 

Good question.

Seems like you may need to use the concept of a Lookup Table: https://zapier.com/help/create/format/create-lookup-tables-in-zaps

Badge

Hey @Troy Tessalone ,

Sorry, perhaps I wasn't clear. The price ID’s and customer ID’s are already pushed in to the zap via a formstack form. It's more the formatting of the post to stripe that I need assistance with.

Hoping that someone in the community might have experience with it. 

Userlevel 7
Badge +14

@MysterD 

Which Stripe API endpoint for Subscriptions are you trying to use?

 

 

The Webhooks app can be used as a Zap action step to make an app API POST request: https://zapier.com/apps/webhook/integrations#triggers-and-actions

Badge

Hey Troy, 

Thanks for getting back. 

So the ask has slightly changed, and I don't need to post line items. 

I do however now have to update a subscription with a cancel at parameter. I've updated my time stamp to unix time and have the subscription id.

Based off https://stripe.com/docs/api/subscriptions/update?lang=java#update_subscription-cancel_at

I am trying to form the POST. 

When I use the below, I get “The app returned "https://stripe.com/docs/error-codes/parameter-unknown".”
 

 

 

When I look at my stripe logs I see the post parameter for cancel_at is messed up, like zapier is pushing strange formatting.

 


Any Ideas?

Userlevel 7
Badge +14

@MysterD 

Try using a normal POST instead of a Custom POST.

The normal POST has a section for data points, rather than 1 section for JSON.

Badge

100% this worked perfectly. 

Thanks man.