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

Update subscription triggers to use test tokens #1121

Merged
merged 1 commit into from
Sep 7, 2023

Conversation

vcheung-stripe
Copy link
Collaborator

Reviewers

r? @charliecruzan-stripe
cc @stripe/developer-products

Summary

stripe trigger subscription.payment_succeeded and stripe trigger subscription.payment_failed currently fail:

Setting up fixture for: payment_method
Running fixture for: payment_method
Trigger failed: Request failed, status=402, body={
  "error": {
    "message": "Sending credit card numbers directly to the Stripe API is generally unsafe. We suggest you use test tokens that map to the test card you are using, see https://stripe.com/docs/testing. To enable raw card data APIs in test mode, see https://support.stripe.com/questions/enabling-access-to-raw-card-data-apis.",
    "request_log_url": "https://dashboard.stripe.com/test/logs/req_QMYi1CK0ecpLRX?t=1694021882",
    "type": "invalid_request_error"
  }
}

We fix this by using test tokens instead of passing raw card data to the API: https://stripe.com/docs/testing

@vcheung-stripe vcheung-stripe requested a review from a team as a code owner September 6, 2023 18:05
@vcheung-stripe vcheung-stripe merged commit fe928e3 into master Sep 7, 2023
7 checks passed
@vcheung-stripe vcheung-stripe deleted the update-subscription-triggers branch September 7, 2023 17:09
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.

None yet

2 participants