When connecting to a payment gateway, it is always recommended to test the gateway using a sandbox or developer account to ensure that transactions are working correctly, without having to use actual money. This document will walk you through testing with a 2Checkout Sandbox account.

Setting up your 2Checkout sandbox account

In order to properly test 2Checkout using Give’s Test Mode you first need to sign up for a 2Checkout sandbox account at https://sandbox.2checkout.com/. This is an environment designed to mimic a live 2checkout environment, without having to use real money/credit cards.

Screenshot of the sandbox.2checkout.com signup/login page
The 2Checkout Sandbox (login page pictured) allows for test donations without real money.

Once you sign up for an account and log in, navigate to the “API” tab at the top right of the page.

If it’s the first time, you will need to accept the terms and conditions of using their API, at which point you will be directed to this page:

Screenshot of the API section of the 2checkout page, with instructions to first click the API tab, then copy paste the keys.
Click API in the top right and then copy the keys automatically generated.

From there, you will copy those keys, and (in a separate browser tab/window) paste them into the Give Payment Gateway settings at Donations > Settings > Payment Gateways (tab) > 2Checkout (section)

Screenshot of the Payment Gateway setting with the keys filled in, but the account number blank.
Paste the sandbox API keys temporarily into the 2Checkout settings.

The only remaining step is to get the 2Checkout account number. Back in the 2Checkout sandbox area, click the “mystery user” icon in the top right, and copy the account number, pasting it into the remaining field in the Give settings.

Screenshot of the method for obtaining the sandbox account number within 2checkout.
Copy the Account number from the sandbox temporarily to test transactions.

Once that is set up, you are ready to make test donations. Ensure Give is in Test Mode, and using the 2Checkout test data, you can process donations without using real money, but still ensuring that the gateway is properly connected.

Note that these steps are necessary for testing, but once you’ve confirmed that donations are correctly processing in the sandbox, you need to switch out the keys to live keys. The process is remarkably similar in getting live keys. See the primary 2Checkout add-on documentation for more detail.