Skip to main content
Solved

When I try to Create a Purchase via REST API, I got 7227 error.

  • January 11, 2022
  • 1 reply
  • 196 views

Forum|alt.badge.img+3

https://docs.revenuecat.com/reference/receipts

On this link, I’ve tried post request with my sample data.

But I got this error.

{
  "code": 7227,
  "message": "Content-Type not application/json"
}

How can I resolve it?

Thanks

Best answer by ryan

The body of the POST requests should be encoded in JSON and have the 'Content-Type' header set to 'application/json'.

Content-type: “application/json”

 

Adding that header should resolve the error.

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

1 reply

ryan
RevenueCat Staff
Forum|alt.badge.img+9
  • RevenueCat Staff
  • 391 replies
  • Answer
  • January 12, 2022

The body of the POST requests should be encoded in JSON and have the 'Content-Type' header set to 'application/json'.

Content-type: “application/json”

 

Adding that header should resolve the error.


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