Image Description Image Description

No Results

  • Support
Logo Logo v1.0
  • Basics
  • Getting started
  • Get authenticating user
  • Products
  • Create a Product
  • License Keys
  • Verify a License Key
  • Redeem a License Key
  • Refund a License Key
  • Subscriptions
  • Verify a Subscription
  • Webhooks
  • Basics
  • Subscribe
  • Unsubscribe
  • Webhook Events
  • New sale
  • New lead
  • New affiliate sign-up
  • New subscription
  • Subscription cancellation

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
    }