> ## Documentation Index
> Fetch the complete documentation index at: https://developers.ligdicash.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Visa payment flow

> How a Visa card payment unfolds via LigdiCash — from invoice creation to confirmation.

A Visa payment on LigdiCash follows the **same technical flow as a hosted payin**. The difference is on the customer side: instead of choosing a mobile money operator and entering a phone number, the customer enters their card information and validates via 3D Secure.

<Note>
  The Visa flow is not available in direct payin mode. The LigdiCash-hosted payment page is mandatory to handle the secure entry of card information.
</Note>

## Flow overview

<Steps>
  <Step title="Create the invoice">
    Your backend calls `POST /pay/v01/redirect/checkout-invoice/create` with the usual parameters — this is exactly the same endpoint as for mobile money.

    LigdiCash returns a `token` and a `payment_url`.
  </Step>

  <Step title="Redirect the customer">
    Open `payment_url` in the same tab, a new tab, or a popup. The customer lands on the LigdiCash payment page, which shows the methods available on your account — including Visa if activation is in place.

    <Warning>
      Iframes are blocked for this flow. Do not embed `payment_url` in an iframe — payment will not work. See [Redirect the customer](/en/payment-api/hosted-payin/redirect-customer) for supported opening methods.
    </Warning>
  </Step>

  <Step title="The customer enters card details">
    On the LigdiCash page, the customer selects Visa and enters:

    * Card number
    * Expiration date
    * CVV

    <Warning>
      The card must have **3D Secure enabled**. If it does not, the payment will be declined. The customer must contact their bank to enable this option.
    </Warning>
  </Step>

  <Step title="3D Secure authentication">
    LigdiCash automatically triggers the 3D Secure process. The customer is redirected to their bank's authentication page (SMS code, banking app, etc.) to confirm the transaction.

    See [3D Secure](/en/payment-api/visa-cards/3d-secure) for the details of this step.
  </Step>

  <Step title="Return to your site">
    After validation (or failure), the customer is redirected to your `return_url` (success or cancellation) or `cancel_url`.

    Call `confirm` from your backend with the token stored at creation to verify the actual status before fulfilling the order.
  </Step>

  <Step title="Callback">
    LigdiCash sends a callback to your `callback_url` as soon as the status is finalized. Always re-verify the status with `confirm` before triggering your business logic.
  </Step>
</Steps>

## Merchant side — no technical change

The Visa flow uses exactly the same API calls as the mobile money hosted payin:

| Step               | Endpoint                                                               |
| ------------------ | ---------------------------------------------------------------------- |
| Create the invoice | `POST /pay/v01/redirect/checkout-invoice/create`                       |
| Verify the status  | `GET /pay/v01/redirect/checkout-invoice/confirm/?invoiceToken={TOKEN}` |

Headers, body, and response format are identical. Visa automatically appears as a payment option on the LigdiCash page if your account has it enabled.

## Customer side — expected experience

On the LigdiCash page, the customer sees a "Visa card" option alongside the available mobile money operators. After entering card details, they are redirected to their bank for 3D Secure, then return to your site.

The full flow typically lasts 1 to 2 minutes if the customer has their card information at hand and 3D Secure proceeds normally.

## Visa callback

The callback payload is identical to a mobile money payin callback. The `operator_name` field will be `"VISA"`.

See [Payin callback payload](/en/payment-api/callback/payin-payload) for the full structure.

## Related pages

* [Create an invoice](/en/payment-api/hosted-payin/create-invoice) — endpoint and full parameters
* [Redirect the customer](/en/payment-api/hosted-payin/redirect-customer) — methods to open the payment link
* [3D Secure](/en/payment-api/visa-cards/3d-secure) — details of the authentication step
* [Verify the status](/en/payment-api/hosted-payin/verify-status) — call `confirm` after payment
* [Callback — security](/en/payment-api/callback/security) — mandatory re-verification
