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

# Mojo Payments API

> Connect your own systems to Mojo Payments: invoices, deposits, card payments and locations, and the reseller portfolio.

The Mojo Payments API lets your own software, such as your accounting package or ERP, work with your Mojo Payments
account without anyone signing in to the portal.

| You are | You can |
| - | - |
| A **merchant** | Create and send invoices and see them paid, read your deposits line by line for your books, read your card payments, locations and MIDs. |
| A **reseller partner** | Read the merchants in your portfolio and the merchant applications submitted through you. |

Point-of-sale systems taking card-present payments use a different API: the [POS Gateway API](/api/overview).

## The basics

* **Address:** every request goes to `https://api.paymentsmojo.com`, over HTTPS.
* **JSON** in and out ([Requests and responses](/developers/requests)).
* **Authentication:** an [API key](/developers/authentication), exchanged for a token that lasts 10 minutes.
* **Lists come a page at a time** ([Pagination](/developers/pagination)).
* **Errors** explain themselves in plain words ([Errors](/developers/errors)).

## Quick start

<Steps>
  <Step title="Create an API key">
    In the portal, an Owner or Admin opens **Settings → API keys**, names the key, ticks what it can do and selects
    **Create key**. Copy the key id and secret: the secret is shown only once.
  </Step>

  <Step title="Get a token">
    ```bash theme={null}
    curl https://api.paymentsmojo.com/oauth/token \
      -d grant_type=client_credentials \
      -d client_id=mk_… \
      -d client_secret=ms_…
    ```

    ```json theme={null}
    { "access_token": "eyJ…", "token_type": "Bearer", "expires_in": 600, "scope": "payments.view", "organization_id": "0b8f…" }
    ```
  </Step>

  <Step title="Call the API">
    ```bash theme={null}
    curl https://api.paymentsmojo.com/payment-requests?status=Open \
      -H "Authorization: Bearer eyJ…"
    ```
  </Step>
</Steps>

## Next

* [Authentication](/developers/authentication): keys, tokens and permissions.
* [Invoices](/developers/invoices), [Deposits](/developers/deposits), [Payments and locations](/developers/payments-and-locations)
  and [Reseller portfolio](/developers/reseller-portfolio): what each part of the API is for.
* The **API reference** lists every endpoint, its fields and its answers, and lets you try them.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.