Skip to main content
Answer

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

  • January 11, 2022
  • 1 reply
  • 221 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.

This post has been closed for comments

1 reply

ryan
RevenueCat Staff
Forum|alt.badge.img+9
  • RevenueCat Staff
  • 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.