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

feat(stripe): add api_version server option #294

Merged
merged 1 commit into from
Jul 1, 2024

Conversation

burmecia
Copy link
Member

@burmecia burmecia commented Jul 1, 2024

What kind of change does this PR introduce?

This PR is to add a new api_version foreign server option for Stripe FDW. Fix #291 .

What is the current behavior?

The current Stripe API requests are always using latest Stripe API version the version specified in the per-account settings, which can cause issues when requesting legacy Stripe API.

What is the new behavior?

Add a new api_version foreign server option, so users can specify a specific Stripe API version number when creating a foreign server.

More details about Stripe API versioning: https://docs.stripe.com/api/versioning

Additional context

N/A

@burmecia burmecia requested a review from imor July 1, 2024 09:07
@burmecia burmecia added enhancement New feature or request stripe Stripe related issues labels Jul 1, 2024
@burmecia burmecia merged commit f932177 into main Jul 1, 2024
2 checks passed
@burmecia burmecia deleted the bo/feat/stripe-api-version branch July 1, 2024 10:23
@vickkhera
Copy link

Your "current behavior" description is backwards. Unless overridden per API call, the stripe API calls will use the version specified in the per-account settings for the API which may be too old for the queries this extension is using, as per my original bug report.

@imor
Copy link
Contributor

imor commented Jul 1, 2024

@vickkhera updated the description. More importantly, now users should be able to specify the Stripe API version they want to use via the new option. Does that work for you?

@vickkhera
Copy link

@imor This is a workable solution. My solution was to just bump the version of the API in the Stripe dashboard, since I had nothing else using the API that might break with a newer version.

The docs https://supabase.github.io/wrappers/stripe/ should mention something about old versions being incompatible with this extension.

I still have this nagging feeling that the right thing in the clients using the API is to specify the version to which they are built, but I see no guidance from Stripe regarding that.

Thanks for following up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request stripe Stripe related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The products table is empty if the stripe account API version is old
3 participants