Skip to main content
Solved

Refund and revoke a Google Subscription returns "code":7227,"message":"Content-Type not application/json"

  • November 24, 2021
  • 9 replies
  • 419 views

Forum|alt.badge.img+4

Hi, 

 

I'm trying to use this endpoint but it always returns the same error. 

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

I tried a few options of the Content-Type but nothing changed. 

curl --request POST \

     --url https://api.revenuecat.com/v1/subscribers/****/subscriptions/****/revoke \

     --header 'Accept: text/plain' \                                   

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

     --header 'Content-Type: text/plain'



Thanks in advance.

Best answer by tina

Hey @Cadu Thiesen !

In your headers Accept and Content-Type these would need to be application/json . You can reference the example request in the REST API documentation: https://docs.revenuecat.com/reference#receipts 

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

9 replies

tina
RevenueCat Staff
Forum|alt.badge.img+10
  • RevenueCat Staff
  • 338 replies
  • Answer
  • December 8, 2021

Hey @Cadu Thiesen !

In your headers Accept and Content-Type these would need to be application/json . You can reference the example request in the REST API documentation: https://docs.revenuecat.com/reference#receipts 


Forum|alt.badge.img+4
  • Author
  • New Member
  • 3 replies
  • December 8, 2021

Hi @tina . Thanks for the reply.

But, I tried a few different options (the first one being as the documentation says) and unfortunately nothing worked :/

 


tina
RevenueCat Staff
Forum|alt.badge.img+10
  • RevenueCat Staff
  • 338 replies
  • December 8, 2021

Hey @Cadu Thiesen 

When you tried utilizing application/json was there a new error message that you saw? 


Forum|alt.badge.img+4
  • Author
  • New Member
  • 3 replies
  • December 8, 2021

Hi @tina .

No, always the same error. Which prompted me to try other content-types. 


Forum|alt.badge.img+2

Hi @Cadu Thiesen have you found a solution mate? ran into this trouble also 


Forum|alt.badge.img+4
  • Author
  • New Member
  • 3 replies
  • January 27, 2022

Hi @Dean Villamia. Unfortunately, no… I ended up doing it in the customer history page. 
Clicking in "View detail" on the customer history "Started subscription" and them in refund on the event details header.

 


Forum|alt.badge.img+2

I see, thanks for the quick reply!! 


Forum|alt.badge.img
  • New Member
  • 2 replies
  • January 18, 2023

I am still seeing this error on the RC API web client https://www.revenuecat.com/reference/receipts - the headers are set in the example request, but the response is always 

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

 


Forum|alt.badge.img+4

Same here, I am executing the sample code in the revenue cat documentation using the “try it” button and this is the result:

 


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