Language

2Checkout Documentation

Hosted Checkout Testing

Testing our Inline Checkout and Standard Checkout in the sandbox area is as easy as creating a sandbox account and following our checkout documentation using the sandbox test credit card information. The switch from production to sandbox is as easy as swapping the production hosted checkout URL:

https://www.2checkout.com/checkout/purchase

With the sandbox hosted checkout URL:

https://sandbox.2checkout.com/checkout/purchase

Example Sandbox Form

<form action='https://sandbox.2checkout.com/checkout/purchase' method='post'>
  <input type='hidden' name='sid' value='901248156' />
  <input type='hidden' name='mode' value='2CO' />
  <input type='hidden' name='li_0_type' value='product' />
  <input type='hidden' name='li_0_name' value='invoice123' />
  <input type='hidden' name='li_0_price' value='25.99' />
  <input type='hidden' name='card_holder_name' value='Checkout Shopper' />
  <input type='hidden' name='street_address' value='123 Test Address' />
  <input type='hidden' name='street_address2' value='Suite 200' />
  <input type='hidden' name='city' value='Columbus' />
  <input type='hidden' name='state' value='OH' />
  <input type='hidden' name='zip' value='43228' />
  <input type='hidden' name='country' value='USA' />
  <input type='hidden' name='email' value='example@2co.com' />
  <input type='hidden' name='phone' value='614-921-2450' />
  <input name='submit' type='submit' value='Checkout' />
</form>

Please Note: The sandbox hosted checkout currently only supports the credit card payment option.

Return Process

The return process in the sandbox works exactly the same as the return process for a live sale in a production account, so you can simply follow the instructions to set it up and validate the return.


Sandbox Sale Tools

Sale Tool

The sandbox sale tools provide the ability to test the life of a sale from end to end.

Testing Recurring

When a new recurring sale is placed in the sandbox, the following Recurring Installment options will be available on the sale detail page.

  • Bill Installment - Success: Creates a new invoice on the sale and sends the Recurring Installment Success notification.
  • Bill Installment - Credit Card Decline: Changes the sale recurring status to declined and sends the Recurring Installment Failed notification.
  • Bill Final Installment: Creates the final invoice on the sale and sends the Recurring Complete notification.

Testing Fraud Review

Place a new sale using the fraud buyer data, the fraud status will be set to wait and the Initiate Fraud Response options will be provided on the sale detail page.

  • Pass: Passes the sale and sends the Fraud Status Changed notification with a “fraud_status=pass”.
  • Fail: Fails and refunds the sale and sends the Fraud Status Changed notification with a “fraud_status=fail”.
  • Bill Final Installment: Creates the final invoice on the sale and sends the Recurring Complete notification.