What happens to store credit if a transaction fails



1 comment

  • Official comment
    Tunc Ekiz

    Hey Mike,


    Following flow applies for Checkout call where credit card transaction and store credits are combined.


    1. Agility Ecommerce checks if useStoreCredits = true
    2. If useStoreCredits is true, Agility Ecommerce sums up the balance of store credits applied to the order and creates a list of transactions to be applied to the order. This is not committed yet.
    3. Agility Ecommerce calculates, if there is a balance left on the order after the sum of store credit balances. If there is no balance left, transactions in step 2 are committed and status of the order is set to PaymentProcessed, otherwise see step 4
    4. After the sum of balance on store credits applied to the order, any balance on the order is charged to the card. In the event that the payment is not processed, an exception is thrown and process ends here.
    5. If the credit card transaction goes through, only then transactions for store credits in step 2 are committed to the database and the status of the order is set to payment processed.

    If you have further questions, please feel free to contact me and I will be happy to walk you through the flow.


Please sign in to leave a comment.