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: Onboard new merchants with Afterpay

  • Capabilities: Manage Afterpay capabilities and enable or disable Afterpay product features on a per-merchant basis

  • Rates: Manage available buy rates that can be assigned to specific merchants later

  • Settlements: 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.

  • 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