How can we help?

Ask a question or search our knowledge base:

 

 

$create_order and $transaction

The $create_order and $transaction events should be mapped to two separate actions on your site. The $create_order event should be used when your users initiate something that they will end up paying for, whether immediately or in the future. Examples include signing up for a service or checking out in an e-commerce store. The $transaction event should be used to send the results of a payment attempt, such interactions with a payment gateway, a user redeeming a voucher or accumulated points, or even a cash payment. One $transaction event should be sent for every $payment_method in the corresponding $create_order event.

  • The $create_order event is the ideal place to specify whether the customer requested expedited shipping as well as add additional custom fields to capture differences in behavior between good and bad users.  Filling in any details about the service or good (whether digital or physical) in the $items list is strongly encouraged.
  • The $transaction event contains fields for specifying whether the payment attempt was successful, including avs, cvv, paypal, and stripe response codes when relevant.

Let's take the example where a customer wants to buy an 11 inch Holly Wand from you, and is going to pay for the wand with a credit card and a gift card:

After the customer enters their credit card information and the gift card code and completes checkout, You should send Sift Science a $create_order event with 1 item (11 inch holly wand) and 2 $payment_methods (one for the credit card, and one for the gift card).  After you attempt to charge the gift card, send Sift Science a $transaction event with the gift card information in the $payment_method field and all other pertinent fields.  After you attempt to charge the credit card, send Sift Science another $transaction event with the credit card information in the $payment_method field and all other pertinent fields.

Have more questions? Submit a request