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

# Gateway Discovery

> Discover which payment gateways are available for your store before creating orders.

# Gateway Discovery

Before creating any order, you need to know which payment gateways are active for your store and what fields each gateway requires from the buyer.

## Why this step matters

Each store has different payment gateways enabled depending on their configuration. The gateway discovery endpoint returns the exact list of available gateways, their IDs, and the required fields — so your integration adapts automatically without hardcoding gateway details.

## Request

```bash theme={null}
curl -X GET "https://api.wava.co/v1/orders/paymentGateways" \
  -H "merchant-key: YOUR_MERCHANT_KEY"
```

## Response

The response includes an array of available gateways with their configuration:

```json theme={null}
{
  "data": [
    {
      "id_payment_gateway": 1,
      "name": "Nequi",
      "required_fields": ["phone_number"],
      "icon": "https://wava-assets.s3.us-east-1.amazonaws.com/payment-gateways/nequi-icon.png"
    },
    {
      "id_payment_gateway": 2,
      "name": "Daviplata",
      "required_fields": ["document_type", "document_number"],
      "icon": "https://wava-assets.s3.us-east-1.amazonaws.com/payment-gateways/daviplata-icon.png"
    }
  ]
}
```

## How to use the response

<Steps>
  <Step title="Call the endpoint">
    Make a `GET /v1/orders/paymentGateways` request with your `merchant-key` header.
  </Step>

  <Step title="Display available gateways">
    Show the buyer only the gateways returned in the response. Use the provided `icon` URLs for gateway logos.
  </Step>

  <Step title="Collect required fields">
    Based on the buyer's gateway selection, collect the fields listed in `required_fields` — for example, `phone_number` for Nequi or `document_type` + `document_number` for Daviplata.
  </Step>

  <Step title="Create the order">
    Pass the `id_payment_gateway` and collected fields to `POST /v1/orders`. See [Creating Orders](/orders/creating-orders) for the full request format.
  </Step>
</Steps>

## Gateway-specific required fields

| Gateway   | `id_payment_gateway` | Required buyer fields              |
| --------- | -------------------- | ---------------------------------- |
| Nequi     | Returned by endpoint | `phone_number`                     |
| Daviplata | Returned by endpoint | `document_type`, `document_number` |
| Breb      | Returned by endpoint | `document_type`, `document_number` |
| Stripe    | Returned by endpoint | Configured via dashboard           |

<Warning>
  Do not hardcode `id_payment_gateway` values. Always use this endpoint to discover them dynamically — IDs may differ between environments and stores.
</Warning>

<Note>
  For gateway-specific payment flows (push notifications, OTP, QR codes), see [Payment Flows](/payment-flows/overview).
</Note>
