# Afterpay setup for PopMCP

You paste your Merchant ID and Secret Key from the Afterpay Business Hub. PopMCP works out whether they are live or sandbox by trying them.

- Auth: API credentials
- Setup time: 3 min
- API base URL: Live: https://global-api.afterpay.com. Sandbox: https://global-api-sandbox.afterpay.com. Both serve every region, including Clearpay. PopMCP picks the right one.
- Credentials screen: https://hub.us.afterpay.com/settings
- Provider docs: https://developers.cash.app/afterpay/api-reference/reference/introduction/authentication

## Approval required before this works

You need an approved Afterpay merchant account. Afterpay reviews a business before opening one, and a merchant building its own integration gets production credentials after Afterpay's certification.

- Typical wait: Afterpay publishes no turnaround.
- Cost: No fee for API access. Afterpay's own fees apply to payments, under your agreement with Afterpay.
- Blocked until approved: The whole connection, since the Merchant ID and Secret Key come from an approved account.
- Works meanwhile: Nothing on your own. Sandbox credentials come from your Afterpay account manager.

## Before you begin

- An approved Afterpay merchant account, or Clearpay in the UK.
- A Business Hub login with the Hub Admin role. Other roles can see the Merchant ID but not the Secret Key.

## Get your credentials

### 1. Open Settings in the Business Hub

Sign in to the Business Hub as a Hub Admin and open the Settings tab. The direct link is `hub.us.afterpay.com/settings`. UK merchants use `hub.clearpay.co.uk/settings`. If you are not a Hub Admin, you will see the Merchant ID but not the Secret Key, so ask one for help.

Screen: https://hub.us.afterpay.com/settings

### 2. Copy your Merchant ID and Secret Key

Copy both values. Each region has its own pair, so if you sell in two regions, connect each one on its own. Keep the Secret Key private: it reaches everything your merchant account can do.

Screen: https://hub.us.afterpay.com/settings

### 3. Paste them into PopMCP

Open Afterpay in PopMCP, paste your Merchant ID and Secret Key, and connect. There is nothing else to fill in: PopMCP tries the pair on Afterpay's live system and then on its sandbox, and reads your limits and currency, which changes nothing.

### 4. Allow writes only if you want them

New connections start read-only, so the AI can find orders and read disputes but cannot change anything. Allow writes on the connection if you want it to capture, refund, void or answer disputes. On live details those move real money, so ask it to confirm first.

### 5. To use the sandbox

Most people skip this. Sandbox credentials come from your Afterpay account manager, who can also give you access to the sandbox Business Hub at `portal.sandbox.afterpay.com/merchant/`. Connect them in the same way. PopMCP recognises them as sandbox, and no money moves.

## Fields PopMCP asks for

- Merchant ID (merchantId) [required]: From the Settings tab of your Afterpay Business Hub. Each region has its own.
- Secret Key (secretKey) [required]: From the Settings tab of your Afterpay Business Hub, next to the Merchant ID. Stored encrypted, used server-side only.

## Verify

PopMCP shows Afterpay as Verified, named with your Merchant ID, your region, and live or sandbox. Ask for an overview: afterpay_account_overview answers with the system, your order limits, your latest orders and the disputes waiting on you.

## Troubleshooting

### "Afterpay did not accept this Merchant ID and Secret Key"

Cause: One of the values was copied incompletely, or they belong to a different region.

Fix: Copy both again from Settings in the Business Hub, as a Hub Admin, and check they are for the region you mean.

### "Afterpay knows this Merchant ID but refused it"

Cause: The account may not be active.

Fix: Check the account in the Business Hub, or ask your Afterpay account manager.

### I can see the Merchant ID but not the Secret Key

Cause: Only a Hub Admin can see the Secret Key.

Fix: Ask a Hub Admin on your account to copy it, or to change your role.

### On file tools answer feature_not_enabled

Cause: On file payments need separate approval from Afterpay.

Fix: Ask your Afterpay account manager. The rest of the connection works without it.

### A checkout does not appear as an order

Cause: A checkout is only a link. No order exists until the customer confirms and the checkout is finished.

Fix: After the customer returns, finish it with afterpay_capture_full_payment or afterpay_authorize_payment.

---

Source: https://www.docs.popmcp.com/docs/integrations/afterpay/