Each time a user first signs up for a recurring payment, send a $create_order event to capture as much info about the subscription as you can. Then, send a $transaction event for payment gateway interactions.
When it is time to charge the user for the subscription again, for example 1/3/6/12 months later, there is no need to send a $create_order event. Instead, just send a $transaction with the same $order_id and we'll tie them together. If you're concerned about the fraud risk, you can send a $transaction with "$transaction_status" : "$pending" and get a risk score in the response before determining whether to contact your payment gateway.
If the a charge fails, send a $transaction with "$transaction_status" : "$failure". Do not send subsequent retry failures. Only send another $transaction for this charge if it is successful.
Example
User initiates service:
- $create_account
- $create_order (ask for risk score to be returned in response)
- "$order_id" : “123”
- If score is not high enough to block, you'll proceed.
- $transaction
1/3/6/12 months later, when subscription renews:
- $transaction (get risk score in response)
- "$order_id" : “123”
- "$transaction_status" : "$pending"
- If you cancel the payment due to our fraud assessment, send another $transaction with all the same values but "$transaction_type" : "$void", "$transaction_status" : "$success" (A successful voiding of the pending transaction).
- If you proceed with the charge and it succeeds on the first try, send another $transaction with all the same values as the pending $transaction except for "$transaction_status" : "$success"
- Otherwise, if you proceed and it fails send:
- $transaction
- "$order_id" : “123”
- "$transaction_status" : "$failure"
- (Note that $transaction_id is not a required field as some businesses do not have a $transaction_id unless the charge succeeds.)
- If the transaction fails 1 to n more times - do not send a $transaction to Sift for any of these failures. If it ultimately succeeds, send:
- $transaction
- "$order_id" : “123”
- "$transaction_status" : "$success"