Purchase API

Use this API to push the purchase to thrive.

OAuthScope: Thrive.Referral.CREATE

HTTP Request

POST  https://thrive.zoho.com/thrive-publicapi/v1/${widget-code}/purchase

Parameter NameKeyDescription
Email*emailEmail Address of that transaction
Note: If the email address is not already mapped to the Affiliate or Loyalty program, this purchase will be rejected.
Amount*amountTranscation amount of that specific order.
Order ID*order_idUnique ID of that specific transaction.
Customer ID*zt_customer_idCustomer Unique ID associated with your system, which will not be changed.
Digest*thrive_digestHMAC generated from the combination of emailid, customerid and project key. Refer here
Widget Code*widgetcodeWidget code will be available on your Thrive -> Script page.
Product Group Nameproduct_group_nameProduct Category / Group is the advanced configuration.
Product IDproduct_idUnique product identifier, set manually by the admin while creating a product.
Product Payperiodproduct_payperiodA particular group of related products or products that meet similar needs.
Product Plan Nameproduct_plan_namePay plan based edition created for a particular product.

Success Response

  • For success 204.
  • If any mandatory params are missing then 404.

Sample Post Body

Copiedcurl --request POST \
  --url https://thrive.zoho.com/thrive-publicapi/v1/5bda3988d2d8d60313c647247a35696c845ff17ae15a2de100de4aa1b0a77333/purchase \
  --header 'Authorization: Bearer 1000.bde43b528b304341562a831b87d6889c.d9495c501be1f2c4a455f18ffe4b5b44' \
  --header 'Content-Type: application/json' \
  --data '
{
    "email": “peter.prescot@zylkar.com”,
    "amount" : "1456",
    "order_id" : "purchase_pd42119_3",
    "additional_details": { "coupon_code":"SAMPLE1"},
            "coupon_code":"SAMPLE1"
}'