User History and License Recovery

Request an email to a user with their order and license history.

Recovering User Licenses

There are numerous cases where-by a user may wish to have their purchased licenses confirmed, they’ve changed machine for example.

The order history and license recovery email can be triggered to a user via Paddle.js or directly via a checkout API.

Via Paddle JS

An easy way to set up a form on your website for users to retrieve licenses, for example.

// Set the 2nd parameter to a product_id to additionally filter the response by product.
Paddle.User.History(email, null, function(response) {					
  if(response.success) {
    // Let the user know they'll receive an email with their 
    // order history and license codes if their email was matched.
  } else {
    // Likely a formatting error in the email, vendorID, or ProductID.
  }
});

Via the Checkout API

  • HTTP Method GET
  • Endpoint: https://checkout.paddle.com/api/2.0/user/history
  • Parameters:
    • email (the user’s email address) - Required.
    • vendor_id (your vendor ID) – Required if product_id isn’t specified.
    • product_id (a specific product ID) - Required if vendor_id isn’t specified.

Example

curl -X GET 'https://checkout.paddle.com/api/2.0/user/history?email=jane@paddle.com&vendor_id=1234'

API Responses

The API will return a simple JSON success response and a message indicating that the user has been emailed their history and license details if the supplied email is valid (but in order to prevent data mining we don’t confirm in the response whether a user exists with that email in our system).

{"success": true, "message": "We've sent details of your past transactions, licenses and downloads to you via email."}

If the email format is invalid then the API will return a JSON response indicating an error.

{"success":false,"error":{"code":107,"message":"A valid email address is required, please try again"}}

If the vendor ID is invalid then the API will return the following.

{"success":false,"error":{"code":109,"message":"The vendor_id provided is invalid, please try again"}}

If the product ID is invalid then the API will return the following.

{"success":false,"error":{"code":108,"message":"The product_id provided is invalid, please try again"}}

If the combination of email, vendor ID, and product ID are invalid then the API will return the following.

{"success":false,"error":{"code":110,"message":"We were unable to find any past transactions, licenses or downloads matching that email address."}}