Skip to main content
Answer

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

  • November 24, 2021
  • 9 replies
  • 464 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 

This post has been closed for comments

9 replies

tina
RevenueCat Staff
Forum|alt.badge.img+10
  • RevenueCat Staff
  • 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
  • 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
  • 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
  • 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
  • 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
  • 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: