Solved

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

  • 24 November 2021
  • 7 replies
  • 160 views

Badge +3

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.

icon

Best answer by tina 8 December 2021, 01:22

View original

7 replies

Userlevel 5
Badge +10

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 

Badge +3

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 :/

 

Userlevel 5
Badge +10

Hey @Cadu Thiesen 

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

Badge +3

Hi @tina .

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

Badge +1

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

Badge +3

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.

 

Badge +1

I see, thanks for the quick reply!! 

Reply