Skip to main content
Solved

I'm getting a 400 Error "Invalid Platform" when updating Stripe tokens to RevenueCat


Forum|alt.badge.img+4
When calling the  https://api.revenuecat.com/v1/receipts endpoint I’m getting a 400 error as if I’m not sending the X-Platform header 

 

const revenueCatBaseUrl = 'https://api.revenuecat.com/v1/';

const url = `${revenueCatBaseUrl}receipts`;
const headers = {
                'Authorization': `Bearer ${revenueCatApiKey}`,
                'X-Platform': 'stripe',
                'Content-Type': 'application/json'
};
const data = {app_user_id: uid, fetch_token: subscription}
const response = await axios.post(url, data, {headers: headers});
return response.status === 200;

{code: 7000, message: "Invalid Platform."}

Is anyone else experiencing similar issues?
 

Best answer by MarcosC

@Paulo Taylor are you using the correct API key? you should be using the stripe application public key

View original
Did this post help you find an answer to your question?
This post has been closed for comments

2 replies

MarcosC
RevenueCat Staff
Forum|alt.badge.img+7
  • RevenueCat Staff
  • 167 replies
  • Answer
  • April 23, 2024

@Paulo Taylor are you using the correct API key? you should be using the stripe application public key


Forum|alt.badge.img+4
  • Author
  • New Member
  • 2 replies
  • April 23, 2024

@MarcosC Thank you! That did it!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings