> This page is for Afterpay Partner API.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.afterpay.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.afterpay.com/_mcp/server.

# Introduction

## Partner API Overview

Afterpay provides the Partner API for payment service providers (PSPs) to onboard and manage new Afterpay merchant accounts. The Partner API has four main components:

* [**Onboarding**](/afterpay-partner-api/guides/technical-guides/onboarding): Onboard new merchants with Afterpay

* [**Capabilities**](/afterpay-partner-api/guides/technical-guides/capabilities): Manage Afterpay capabilities and enable or disable Afterpay product features on a per-merchant basis

* [**Rates**](/afterpay-partner-api/guides/technical-guides/rates/overview): Manage available buy rates that can be assigned to specific merchants later

* [**Settlements**](/afterpay-partner-api/guides/technical-guides/settlements/overview): Review settlement batches and retrieve associated settlement batch files

## API Fundamentals

### Making Requests

The Afterpay API follows standard, RESTful JSON API conventions; if you have integrated with a JSON API before, it should look familiar. All communication must be over **HTTPS** using TLS 1.2 or above...

### API Environments

Afterpay provides production, staging, and sandbox environments for API clients to make requests with. Credentials for each environment are unique and are provided by the Afterpay team.

* Production: `https://agencyapi.afterpay.com`

* Sandbox: `https://agencyapi.sandbox.afterpay.com`

### Required Headers

All requests to Afterpay require certain headers to authenticate your API client with the Afterpay API:

* `X-Afterpay-Request-Signature`: This is a request signature generated by the client. More information [here](/afterpay-partner-api/guides/technical-guides/welcome/request-signing).

* `X-Afterpay-Request-Date`: This is an epoch timestamp set to the current time. No more than 60 seconds should elapse between this timestamp and the time the request is made

* `X-Afterpay-Request-Apikey`: This is an API key provided by the Afterpay team and is environment specific