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 Name | Key | Description |
---|---|---|
Email* | Email 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* | amount | Transcation amount of that specific order. |
Order ID* | order_id | Unique ID of that specific transaction. |
Customer ID* | zt_customer_id | Customer Unique ID associated with your system, which will not be changed. |
Digest* | thrive_digest | HMAC generated from the combination of emailid, customerid and project key. Refer here |
Widget Code* | widgetcode | Widget code will be available on your Thrive -> Script page. |
Product Group Name | product_group_name | Product Category / Group is the advanced configuration. |
Product ID | product_id | Unique product identifier, set manually by the admin while creating a product. |
Product Payperiod | product_payperiod | A particular group of related products or products that meet similar needs. |
Product Plan Name | product_plan_name | Pay 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"
}'