Question

Cannot validate Stripe Web Payment subscription

  • 10 February 2022
  • 1 reply
  • 84 views

Badge +5

Hi,

 

I have successfully running RevenueCat in-app subscriptions and now integrating another subscription method - Stripe Web Payments.

 

I have created Products in Stripe and have created Products in RevenueCat using product ID from Stripe as product key in RevenueCat. I also have tried to create RevenueCat products using price id from Stripe.

 

After I make a purchase in Stripe, I want to validate receipt so purchase appears in RevenueCat by making a POST request to API:

curl --location --request POST 'https://api.revenuecat.com/v1/receipts' \

--header 'X-Platform: Stripe' \

--header 'Authorization: Bearer *** MY_STRIPE_KEY ***' \

--header 'Content-Type: application/json' \

--data-raw '{

"app_user_id": "iLxQ2wdl26",

"fetch_token": "sub_1KRgPlGOGvcC5HQI5pE"

}'

But no matter of the configuration, I get this in response:

{

"code": 7103,

"message": "The receipt is not valid."

}

 

Maybe anyone has any tips that I might be missing?

 

Cheers,

Daniels


1 reply

Userlevel 3
Badge +7

Hey @Daniels Pitkevics  :wave:

 

Looking over your curl request in the line --header 'Authorization: Bearer *** MY_STRIPE_KEY ***' \ are you using a secret key or your public stripe API key ?

If you’re able to share some App User IDs here I can look in our logs to see if there are any other errors surfacing. If you would rather not share the information in our open forum I can escalate this to a Zendesk ticket. 

Reply