# Getting Started with the EnKash Payment Gateway API

The EnKash Payment Gateway offers a comprehensive set of RESTful APIs for managing authentication, orders, payments, refunds, and settlements. Use the appropriate base URL and API key depending on your environment.

## <span style="color:#7b2cbf">Base URL</span>

| Environment | Base URL                           |
| ----------- | ---------------------------------- |
| Test        | `https://olympus-pg-uat.enkash.in` |
| Live        | `https://olympus-pg.enkash.in`     |

## <span style="color:#7b2cbf">Setup</span>


  :::highlight purple
**Test Environment:**
  After registering, you will receive sandbox API keys at your registered email.
:::

:::highlight purple
**Live Environment:**
  Production API keys are shared upon successful completion of integration testing and approval by EnKash.
:::
 ## <span style="color:#7b2cbf">API Categories and Endpoints</span>

<Container>

<span style="color:#7b2cbf">Authorization APIs</span>

Used to manage authentication and secure access to all other API calls.

| API Name                 | Function                                                     |
| ------------------------ | ------------------------------------------------------------ |
| Get Authentication Token | Retrieve an access token required for all secured API calls. |
| Payment Modes Details    | Retrieve list of all payment modes and their status. |

</Container>


<Container>
  <span style="color:#7b2cbf">Order APIs</span>

Used to create, track, and manage orders and payment initiation data.

| API Name               | Function                                                               |
| ---------------------- | ---------------------------------------------------------------------- |
| Create Order           | Create a new payment order.                                            |
| Get Order Status       | Retrieve the current status of an order.                               |
| Get BNPL Payment Modes | Fetch available BNPL payment options based on mobile number.           |
| Get Dynamic QR Code    | Generate a dynamic UPI QR code for a specific order.                   |
| UPI Intent Link        | Generate a deep link to launch a UPI app with pre-filled payment data. |

</Container>


<Container>
  <span style="color:#7b2cbf">Payment APIs</span>


Manage the full lifecycle of a payment including submission, tracking, and user verification.

| API Name               | Function                                            |
| ---------------------- | --------------------------------------------------- |
| Submit Payment         | Submit user payment details to initiate processing. |
| Get Payment Status     | Retrieve the status of a submitted payment.         |
| Validate OTP           | Verify OTP entered by the user (if applicable).     |
| Resend OTP             | Trigger re-sending of OTP to the user.              |
| Payment Notify Request | Send or retrieve a payment notification manually.   |

</Container>

<Container>
  <span style="color:#7b2cbf">Refund APIs</span>


Enable full or partial refunds for completed payments.

| API Name        | Function                                    |
| --------------- | ------------------------------------------- |
| Initiate Refund | Initiate a refund for a successful payment. |

</Container>



<Container>
  <span style="color:#7b2cbf">Settlement APIs</span>

Retrieve and search settlement reports for reconciliation and reporting.

| API Name                     | Function                                             |
| ---------------------------- | ---------------------------------------------------- |
| Get Settlement Details By ID | Fetch settlement details using a specific ID.        |
| Search For A Settlement      | Search settlements based on date range, status, etc. |

</Container>



