Refund a License Key
License keys can be marked as refunded/invalidated via this endpoint.
Endpoint
POST /licensekeys/refund
Required parameters
license_key
- The license key supplied by your buyer that you want to redeem
Example request
curl -X POST https://api.zylvie.com/licensekeys/refund \
-h "Authorization: Bearer e97f0aafe4884bc380c81fdb2347dc55" \
-d "license_key=8ab6e448-825d-4f03-8e94-2e0ece7c855b" \
Example response
A successful redemption of a non-refunded license key returns a response like this:
{
"key": "8ab6e448-825d-4f03-8e94-2e0ece7c855b",
"created": 1690952000, //UTC timestamp
"redeemed": true,
"redeemed_at": 1790952000, //UTC timestamp
"refunded": true,
"refunded_at": 1890952000, //UTC timestamp
}
If the license key was already refunded, you'll receive a response like this:
{
"error": "Already refunded",
"refunded_at": 1790952000, //UTC timestamp
}