I am trying to implement the HMS IAP refund API on my server side, but the API call doesn't work 100% of the time. I'm getting error: responseCode:"12"
This is the sample code I used.
POST /sub/applications/v2/purchases/returnFee
Content-Type: application/json; charset=UTF-8
Authorization: Basic QVQ6Q1YzQ1NPbVlBaGwrZUtRWExtMTBVV2pyWXZHTVF4MmYvcVMya1B0ZElLY3UwaFJrdFNTMmxwdk1FQkIyYldXWGt0REVaR3I4UjFUTTRLMVlmNXdwWU80RG04THdXQWxjaFhEYjBMUjBNTUJtWnFYcGFtazc3THN3UnFJbkhHK28xekdqRzNSMg==
Accept: application/json
Content-Length: 171
{
"purchaseToken": "00000173741056a37eef310dff9c6a86fec57efafe318ae478e52d9c4261994d64c8f6fc8ea1abbdx5347.5.3089",
"subscriptionId": "1581789719266.D40972AC.3089"
}
The weird part is that some refunds work and some don't. Not sure what's going on here. Could someone help me with this issue? Is it possible to use Huawei console to issue refund and confirm it instead?