Oney by Thunes Refund Workflow {#thunes-intro-flow-refund}
==========================================================

This workflow describes the sequence of events that comprises a successful Oney refund.

#### Figure:

Oney by Thunes Refund Workflow ![](/content/dam/documentation/cybs/en-us/topics/payments-processing/altpay/thunes/graphics/thunes-flow-oney-refund.svg/jcr:content/renditions/original)

1. The customer chooses the Oney payment method from among the available payment methods shown on the merchant's checkout page.
2. The merchant sends the create a session API request to `Cybersource`. The session service creates a unique customer session. See [Create a Session](/docs/cybs/en-us/thunes/developer/all/rest/thunes/thunes-oney-intro/thunes-session-intro.md "").
3. `Cybersource` responds with `PENDING` status, a URL to redirect the customer, and a pre-approval token.
4. The merchant sends the customer to the redirect URL page.
5. The customer completes the checkout on the redirection page within 20 minutes.
6. The merchant sends an authorization API request to `Cybersource` with the pre-approval token and any optional details. See [Authorize a Payment](/docs/cybs/en-us/thunes/developer/all/rest/thunes/thunes-auth-intro.md "").
7. `Cybersource` responds to the merchant with one of these statuses:
   * `AUTHORIZED`: The payment is successfully authorized.
   * `PENDING`: Either the authorization is being audited by Oney or the customer has not completed the checkout using the redirection URL. The merchant should send a check status API request to retrieve status updates. See [Check a Transaction Status](/docs/cybs/en-us/thunes/developer/all/rest/thunes/thunes-status-intro.md "").
8. The merchant sends a capture API request to `Cybersource` with the authorized amount, currency, and original authorization request ID. See [Capture an Authorized Payment](/docs/cybs/en-us/thunes/developer/all/rest/thunes/thunes-capture-intro.md "").
9. `Cybersource` responds to the merchant with a `SETTLED` status.
10. The customer decides to return the purchase, and the merchant sends a refund API request to `Cybersource`. See [Refund a Payment](/docs/cybs/en-us/thunes/developer/all/rest/thunes/thunes-refund-intro.md "").
11. `Cybersource` responds with a successful `REFUNDED` status to the merchant.

