flattr-extension
flattr-extension copied to clipboard
Check API response body for subscription state
Background
Due to the upcoming changes with subscription handling, the Flattr API will no longer return the response code 402 which means that we'll no longer be able to detect subscription changes this way.
Instead, we now need to find this information in the response body. For example:
{"status":"success","subscription":{"active":false},"sandboxed":true}
What to change When submitting flattrs, check the API response's body to determine whether the user has an active subscription and change the subscription state accordingly.