CartFreak OUTGOING API Documentation CartFreak has the ability to notify your remote servers of certain actions on a per product basis. To activate an API call from your CartFreak cart to a remote server / script all you need to do is set the "API URL" variable in the specific product's configuration. The API call is sent as a standard HTTP GET request to the configure API URL. Currently two notification methods are supported. They are "CREATE" and "REMOVE". A CREATE notification is sent when a new sale occurs for the specific product. A CREATE notification will also be sent when re-activating a previously deactivated recurring billing subscription. A REMOVE notification is sent when a recurring billing subscription has been deactivated - either by request or by billing failure. These calls are placed in a queue as soon as the required action is completed (ie, sale is authorized). The queue is processed every 5 minutes, so notifications are not sent immediately. This is by design as to not create lingering threads or processes tied to your cart so we can ensure maximum up time. Again, these calls are only queued to be sent if the product being referenced (either by sale or recurring billing subscription) has the API URL variable set. The following are variables sent to your API URL script upon a CREATE command. command - CREATE billing_id - Billing ID for the current subscription (if recurring) first_name - Customer first name last_name - Customer last name email - Customer email address address - Customer address address2 - Customer address line two city - Customer city state - Customer state or province zipcode - Customer postal code country - Customer country ** Same as address info above - only for shipping. Left blank if it's the same as above ** ship_address ship_address2 ship_city ship_state ship_zipcode ship_country phone - Customer phone number (with country code) product_id - Product ID purchased and/or subscribed to product_name - Product name amount - Order amount fee - Order fees total - Order total (amount - fees) order_id - Order ID order_hash - Order Hash (used for backend processing. ie, one click upsales) The following are variables sent to your API URL script upon a REMOVE command. command - REMOVE billing_id - Billing ID for the current subscription (if recurring) email - Customer email address All variables will be sent in standard format and properly url encoded. For example: http://www.yourdomain.com/script.php?command=REMOVE&billing_id=224&email=user%40domain.com |