> This page is for Afterpay Button Documentation.

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

# Sandbox Environment

We provide a Sandbox to facilitate development and testing. It is separate from the Afterpay or Clearpay (UK) production environment and is accessed via a different URL and uses a different Merchant ID than you’ll use in production.

* [Follow these instructions](https://afterpay.docs.buildwithfern.com/afterpay-online-developer/chinese/customer-accounts) to create Sandbox Customer Accounts. You will need a customer account to complete the Afterpay checkout flow.

> **How Can I Get Sandbox Credentials?**
>
> Speak to your account manager to obtain sandbox credentials for your region.
>
> **Sandbox Virtual Credit Cards**
>
> In the sandbox environment, a dummy credit card is returned in the Virtual Card Object. The card number returned can be configured by Afterpay or Clearpay (UK) so that it is accepted by your test payment environment.

Because the sandbox environment does not use real credit cards, Afterpay or Clearpay (UK) will not receive payment events such as Auth, Auth Reversal, Capture, and Refund through the credit card network.