> For the complete documentation index, see [llms.txt](https://pivot-payment.gitbook.io/pivot-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pivot-payment.gitbook.io/pivot-docs/for-developers/security.md). Agents can also search and read this documentation through its [MCP server](https://pivot-payment.gitbook.io/pivot-docs/~gitbook/mcp).

# Security

Secure your Pivot API integration

Anyone who holds your Client ID and an API key can move money on your account. Pivot secures the platform; you secure where your credentials live, what they can do and who can reach them. Five practices close most of the gap, and each one takes only a few minutes in **Settings ›** [**Developer Setting**](https://dashboard.pivot-payment.com/setting/developer-setting/credentials):

1. **Lock the API to your servers.** Only your server IP addresses can call Pivot.
2. **Scope every key.** Each API key can do only what its integration needs.
3. **Rotate keys on a schedule.** Use multiple API keys to switch without downtime.
4. **Review activity and access.** Check API Logs, Audit Logs and dashboard roles every month.
5. **Verify every callback.** Check <mark style="color:orange;">`X-API-Key`</mark> and confirm the status with the API before you act on it.

## 1. Allow API calls only from your servers

Pivot rejects any API request that does not come from an address on your IP Whitelist. A leaked key is then useless from anywhere else, as long as the list holds only your own servers.

Set it under **Settings › Developer Setting ›** [**IP Whitelist**](https://dashboard.pivot-payment.com/setting/developer-setting/ip-whitelist). Only the Admin and Developer roles can add, edit or delete entries. Sandbox and Production run on different domains and keep separate whitelists, so set up each one.

<figure><img src="https://2718617217-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiHesjp5kAF7oHjPhNYfo%2Fuploads%2FaxB0L5E51HbMEIAJ8cy9%2FScreenshot%202026-11-12%20at%2014.55.17.png?alt=media&amp;token=54dc9791-5fc4-4bb6-94ec-7a9121baaf6b" alt=""><figcaption></figcaption></figure>

**Do**

* Add only the public outbound (egress) IP addresses of the servers that call Pivot.
* If your servers sit behind a cloud load balancer or autoscaling group, route outbound traffic through a NAT gateway with a static IP and whitelist that one address.
* Remove an address the day its server is retired or you change hosting provider.

**Don't**

* Don't add office networks, home connections, VPN exits or developer laptops.
* Don't add shared ranges, such as a whole cloud region or a CI provider's pool.
* Don't call the Pivot API from a browser, mobile app or any client-side code. Your Client ID and API keys belong on your server only.

## 2. Give each API key only the scopes it needs

Every API key carries a set of scopes, and it can call only the endpoints those scopes allow. A key that only reads payments cannot send a payout, even if it leaks: Pivot rejects any call outside a key's scopes with <mark style="color:orange;">`403 INSUFFICIENT_SCOPE`</mark>.

Create keys under **Settings › Developer Setting › Credentials ›** [**New API Key**](https://dashboard.pivot-payment.com/setting/developer-setting/credentials/api-keys/new):

<figure><img src="https://2718617217-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiHesjp5kAF7oHjPhNYfo%2Fuploads%2FV48wbVp9FmU1IBKexUQZ%2FScreenshot%202026-11-12%20at%2014.57.07.png?alt=media&amp;token=fe3517a4-a4de-45cf-884d-2003d660b95f" alt=""><figcaption></figcaption></figure>

* **One key per integration.** Give your checkout, your payout system and your reporting job a key each, so you can rotate or delete one without touching the others.
* **Name it after the system and environment**, for example <mark style="color:orange;">`checkout-prod`</mark> or <mark style="color:orange;background-color:orange;">`payout-worker-prod`</mark>. Names are unique, up to 50 characters, and can be changed later.
* **Tick only the scopes the integration calls.** Use **Select all** on a group only when the integration truly needs every action in it.
* **Write scopes need their read scope.** For example, <mark style="color:orange;">`payments:write`</mark> requires <mark style="color:orange;">`payments:read`</mark>, and <mark style="color:orange;">`payouts:write`</mark> requires <mark style="color:orange;">`payouts:read`</mark>, <mark style="color:orange;">`inquiry_account:read`</mark> and <mark style="color:orange;">`inquiry_account:write`</mark>. The form lists each dependency under the scope.

<figure><img src="https://2718617217-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiHesjp5kAF7oHjPhNYfo%2Fuploads%2F3cUmfvkyRMBBvsZDRZYd%2FScreenshot%202026-11-12%20at%2015.01.56.png?alt=media&amp;token=4298d1b3-f207-403a-9b9e-0a86ab2816e2" alt=""><figcaption></figcaption></figure>

| Integration                                 | Scopes to grant                                                                                                                                                                                                              |
| ------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Checkout that creates and captures payments | <mark style="color:orange;">`payments:read`</mark>, <mark style="color:orange;">`payments:write`</mark>                                                                                                                      |
| Back-office tool that issues refunds        | <mark style="color:orange;">`refunds:read`</mark>, <mark style="color:orange;">`refunds:write`</mark>                                                                                                                        |
| Subscription billing                        | <mark style="color:orange;">`recurring:write`</mark>                                                                                                                                                                         |
| Payout system that sends disbursements      | <mark style="color:orange;">`payouts:read`</mark>, <mark style="color:orange;">`payouts:write`</mark>, <mark style="color:orange;">`inquiry_account:read`</mark>, <mark style="color:orange;">`inquiry_account:write`</mark> |
| Reconciliation or reporting job             | Read scopes only, for example <mark style="color:orange;">`payments:read`</mark>, <mark style="color:orange;">`refunds:read`</mark>, <mark style="color:orange;">`payouts:read`</mark>                                       |

You can edit a key's scopes after creation with the settings icon under Options. When an integration stops using an action, remove that scope from its key there.

## 3. Rotate API keys regularly

Rotate each API key at least every 90 days, and right away when someone who could see it leaves your team. Your account can hold up to 10 API keys at once, so the new key goes live before the old one is removed and no request fails.

To rotate a key without downtime:

1. **Create the replacement.** Under Credentials, click [**New API Key**](https://dashboard.pivot-payment.com/setting/developer-setting/credentials/api-keys/new), give it the same scopes as the old key, and name it with the date, for example <mark style="color:orange;">`checkout-prod-2026-11`</mark>.
2. **Store it in your secrets manager** next to the old key.
3. **Deploy your integration with the new key.** It sends the new key in the <mark style="color:orange;">`X-MERCHANT-SECRET`</mark> header when it requests its next access token; tokens already issued expire within 15 minutes.
4. **Confirm the switch.** In the API Keys list, the new key's **Last Used** updates and the old key's stops. Check **API Logs** for any errors.
5. **Delete the old key** with the bin icon under **Options**. This revokes its access tokens at once, so do it only after step 4 confirms the switch.

Between rotations, keep keys out of harm's way:

* Keep keys in a secrets manager or encrypted environment variables. Never commit them to source control, paste them into chat or tickets, or write them to logs.
* Sandbox and Production are separate environments on different domains, each with its own API keys. Never reuse a key across them.
* Limit who can view keys in the dashboard. **View API Key** is available to the Admin and Developer roles; give those roles only to people who need them.

## 4. Review activity and dashboard access every month

A monthly review catches what the first three practices miss: a key nobody uses, an address nobody recognises, or a former employee who can still log in. An Admin can do it in about 15 minutes.

| What to review    | Where                                                                                                          | What to look for                                                                                                                |
| ----------------- | -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| API traffic       | Developer Setting › [API Logs](https://dashboard.pivot-payment.com/setting/developer-setting/api-logs)         | Spikes in 401 or 403 responses, calls at unusual hours, volume you can't explain. Filter by HTTP status, product and time range |
| API keys          | Developer Setting › [Credentials](https://dashboard.pivot-payment.com/setting/developer-setting/credentials)   | Keys whose **Last Used** is blank or months old: delete them. Keys you can't match to a live integration                        |
| IP Whitelist      | Developer Setting › [IP Whitelist](https://dashboard.pivot-payment.com/setting/developer-setting/ip-whitelist) | Addresses you don't recognise or servers you have retired                                                                       |
| Dashboard actions | Settings › [Audit Logs](https://dashboard.pivot-payment.com/activity-log)                                      | Unexpected API key creation or viewing, IP Whitelist or callback URL changes, new members, role changes                         |
| Team members      | Settings › [Team Members](https://dashboard.pivot-payment.com/setting/team-members)                            | People who have left or changed jobs: deactivate them the same day                                                              |
| Roles             | Settings › [Role & Permissions](https://dashboard.pivot-payment.com/setting/roles)                             | The Developer and Admin roles held only by people who need credentials. No custom role that can both create and approve payouts |

Role changes take effect at the user's next login, not during a session they already have open. To remove someone's access, deactivate them under Team Members: this ends their open session at once.

## 5. Secure your callback endpoints

Your callback URL is public, so anyone can send it a fake "payment paid" or "payout succeeded" event. Treat every callback as unverified until your server has checked it. The checks below are your protection.

Register callback URLs, one per product, under **Settings › Developer Setting ›** [**Callbacks**](https://dashboard.pivot-payment.com/setting/developer-setting/callbacks). Only the Admin and Developer roles can register or change them.

1. **Check&#x20;**<mark style="color:orange;">**`X-API-Key`**</mark>**&#x20;on every delivery.** Pivot sends your Callback API Key, shown on the Callbacks page, in the <mark style="color:orange;">`X-API-Key`</mark> header. Compare it in constant time and reject the request with 401 if it is missing or wrong.
2. **Confirm before you fulfil.** Before you ship goods, release funds or credit a balance, fetch the payment or payout from the Pivot API and act on the status the API returns.
3. **Use HTTPS only.** Register <mark style="color:orange;">`https://`</mark> URLs with a valid certificate.
4. **Process each event once.** Pivot retries up to six times, at intervals from 5 minutes to 12 hours, when your endpoint returns 5xx, 408 or 429, and failed callbacks can be resent from **Callback History**. Record the payment or payout ID with its status, and ignore an event you have already handled.
5. **Reply quickly, work later.** Return 2xx as soon as the event is stored, and do the slow work in a background job, so Pivot does not time out and retry.
6. **Keep the Callback API Key secret.** Store it in your secrets manager next to your API keys. Never log the `X-API-Key` header, and don't log full payloads that carry customer data. You can regenerate it on the Callbacks page, but the old key stops working at once, so deploy the new value to your endpoint immediately.

<figure><img src="https://2718617217-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiHesjp5kAF7oHjPhNYfo%2Fuploads%2FFr1Ehn00MZe7ocnggkHo%2FScreenshot%202026-11-12%20at%2015.20.10.png?alt=media&amp;token=04a37946-fe17-4a64-87d1-359d69851c9c" alt=""><figcaption></figcaption></figure>

Check [**Callback History**](https://dashboard.pivot-payment.com/setting/developer-setting/callback-history) for failed deliveries, and watch **Audit Logs** for callback URL changes. Anyone who can change your callback URL can redirect your payment events.

## If you think a key is exposed

Act at once. Accept a short interruption rather than wait for a smooth switch.

1. **Delete the exposed key** under Credentials. This revokes its access tokens at once. Then create a replacement with the same scopes and deploy it.
2. **Check API Logs** from the time the key may have leaked, for requests you did not make.
3. **Check the IP Whitelist and Audit Logs** for changes you did not make.
4. **Email** [**helpdesk@pivot-payment.com**](mailto:helpdesk@pivot-payment.com) if you see suspicious transactions. Pivot can suspend activity on your account and investigate with you.

## Security checklist

* [ ] &#x20;IP Whitelist holds only the outbound IPs of our production servers
* [ ] &#x20;Each integration has its own API key, named after its system and environment
* [ ] &#x20;Each key has only the scopes its integration calls
* [ ] &#x20;Keys and the Callback API Key live in a secrets manager, never in code, logs or chat
* [ ] &#x20;Every key rotated within the last 90 days
* [ ] &#x20;Unused keys deleted
* [ ] &#x20;Callback endpoints use HTTPS and reject requests without a valid `X-API-Key`
* [ ] &#x20;Fulfilment waits for the status returned by the Pivot API, not the callback alone
* [ ] &#x20;Duplicate callbacks are ignored
* [ ] &#x20;Admin and Developer roles held only by people who need them
* [ ] &#x20;Leavers deactivated under Team Members
* [ ] &#x20;API Logs, Audit Logs and Callback History reviewed this month
