Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the http verb of /stripe/billing from POST to GET. #211

Merged
merged 2 commits into from
May 30, 2022

Conversation

ro-tex
Copy link
Contributor

@ro-tex ro-tex commented May 25, 2022

PULL REQUEST

Overview

Example for Visual Changes

Checklist

Review and complete the checklist to ensure that the PR is complete before assigned to an approver.

  • All new methods or updated methods have clear docstrings
  • Testing added or updated for new methods
  • Verify if any changes impact the WebPortal Health Checks
  • Approriate documentation updated
  • Changelog file created

Issues Closed

Closes SKY-667

@ro-tex ro-tex self-assigned this May 25, 2022
@linear
Copy link

linear bot commented May 25, 2022

SKY-667 Fix /stripe/billing endpoint

The old /api/stripe/billing endpoint (the one in old dashboard) used to use a GET endpoint.

The new one is a POST which performs a redirect to Stripe endpoint that only accepts GET requests — this flow doesn't work (after redirection happens, browser sends the same POST request to Stripe, which fails).

We should either make it a GET request again, or have the POST endpoint return the Stripe's billing portal URL in a JSON response, so we can redirect from the frontend.

As it is right now, I'm also not able to get the Location header from response to work around the issue.

@ro-tex ro-tex enabled auto-merge May 25, 2022 14:02
meeh0w
meeh0w previously approved these changes May 25, 2022
Copy link

@meeh0w meeh0w left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for that 👍

api/routes.go Outdated Show resolved Hide resolved
@ro-tex ro-tex merged commit 31bf525 into main May 30, 2022
@ro-tex ro-tex deleted the ivo/stripe_billing_get branch May 30, 2022 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants