> ## 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.

# POS Gateway API

> The HTTPS API every POS integration uses.

Every request goes to:

```
https://posgateway.paymentsmojo.com/Links/<Action>
```

* **HTTPS only**, port 443.
* **POST** the request for the action, in JSON or XML ([Formats](/api/formats)).
* **Authenticate** with the register's key in the request's `CardPointeUsername` (the key id) and `CardPointePassword`
  (the secret) fields ([Keys](/api/keys)).
* The MID in the request (`MerchantId`, or `MerchId` for voids, refunds and captures) says which merchant account to
  use. It must be linked to the key's location.

## Example: a sale on the terminal

```bash theme={null}
curl https://posgateway.paymentsmojo.com/Links/AuthorizeXml \
  -H "Content-Type: application/json" \
  -d '{"merchantId":"496100000000","hsn":"<terminal serial>","amount":"5.00","orderId":"R1-1042",
       "cardPointeUsername":"pgk_…","cardPointePassword":"pgs_…"}'
```

The terminal asks the customer to pay; the response comes back once they have (or the sale is declined or
cancelled):

```json theme={null}
{ "respStat": "A", "retRef": "277127012209", "amount": "5.00", "authCode": "PPS112" }
```

## What a location controls

How the terminal behaves (tips, signatures, PIN debit, CVV and ZIP prompts) is set per location in the portal, not in
the request: see [Terminal settings](/api/terminal-settings).

## Next

* [Actions](/api/actions): everything the gateway does.
* [Errors](/api/errors): what each message means.


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