Question

Troubleshooting RevenueCat's API Integration with Stripe for One-Time Purchases

  • 7 March 2024
  • 1 reply
  • 48 views

Badge +3

I'm trying to connect RevenueCat with Stripe for one-time payments in my JavaScript web app, but I'm running into a problem. When I try to send information about one-time payments to RevenueCat, I get an error message saying there's an internal server error ({ code: 7110, message: 'Internal server error.' }). This issue doesn't happen with subscriptions; it's only with one-time payments. I've tried using different combination with/without Stripe product and price IDs but keep getting the same error. The instructions mentions to use the Stripe's Price objects in documentation, but there aren't clear details on how to do this in the API documentation. Here's the API request I've been using to send the payment information. I would really appreciate any help or advice on what I might be doing wrong or missing.

 

curl --location 'https://api.revenuecat.com/v1/receipts' \
--header 'X-Platform: stripe' \
--header 'Authorization: Bearer strp_xxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"app_user_id": "1023",
"fetch_token": "cs_live_b1wOpxxxxxxxQnr41VsP06qtVOjkwLYNDtHhFVwytYIJ8xwuWCUtun",
"price": 0,
"currency": "aud",
"product_id": "prod_xxxx"
}'

 


This post has been closed for comments

1 reply

Userlevel 5
Badge +9

Hi @unlcked,

Internal server error might be an issue on our end, but to eliminate some possibilities, can you try removing the price, currency, and product_id from the request payload? Those aren’t needed for Stripe purchases and I’m curious if that’s throwing off our server.