CODi by Thunes Transaction Workflow {#thunes-intro-flow-codi}
=============================================================

This workflow describes the sequence of events that comprises a successful CODi payment and refund.

#### Figure:

CODi Transaction Workflow  
![](/content/dam/documentation/cybs/en-us/topics/payments-processing/altpay/thunes/graphics/thunes-flow-codi-600x425.svg/jcr:content/renditions/original)

1. The customer begins to checkout on your website and chooses the CODi payment method.{#thunes-intro-flow-codi_step1}
   {#thunes-intro-flow-codi_step1}
2. You send a sale API request to `Cybersource`. For more information, see [Process a Sale](/docs/cybs/en-us/thunes/developer/all/so/thunes/thunes-codi-intro/thunes-codi-sale-intro.md "").{#thunes-intro-flow-codi_step2}
   {#thunes-intro-flow-codi_step2}
3. `Cybersource` responds to you with a `PENDING` status, CODi redirect URL, and sale request ID.{#thunes-intro-flow-codi_step3}
   {#thunes-intro-flow-codi_step3}
4. You redirect the customer to the CODi URL.{#thunes-intro-flow-codi_step4}
   {#thunes-intro-flow-codi_step4}
5. The customer completes the checkout using CODi and is redirected to your website.{#thunes-intro-flow-codi_step5}
   {#thunes-intro-flow-codi_step5}
6. You send a check status API request to `Cybersource`. For more information, see [Check a Status](/docs/cybs/en-us/thunes/developer/all/so/thunes/thunes-codi-intro/thunes-codi-status-intro.md "").{#thunes-intro-flow-codi_step6}
   {#thunes-intro-flow-codi_step6}
7. `Cybersource` responds to you with a `SETTLED` status.{#thunes-intro-flow-codi_step7}
   {#thunes-intro-flow-codi_step7}
8. You confirm the payment to the customer.{#thunes-intro-flow-codi_step8}
   {#thunes-intro-flow-codi_step8}

