Within the /public folder, you'll find a number of example Flow integrations - each demonstrating different possible configurations.
-
In the project root, create a
.envfile. -
In .env:
-
Set
PUBLIC_KEYto your Checkout.com Sandbox API public key. -
Set
ACCESS_KEY_IDandACCESS_KEY_SECRETto your Checkout.com Sandbox access key pair (recommended), orSECRET_KEYto your Checkout.com Sandbox API secret key. -
Set
PROCESSING_CHANNEL_IDto your Checkout.com Sandbox processing channel ID.
# Checkout.com PUBLIC_KEY="pk_sbox_..." ACCESS_KEY_ID="ack_..." ACCESS_KEY_SECRET="..." PROCESSING_CHANNEL_ID="pc_..."
-
Warning
Some features, such as standalone 3DS authentication, are not supported when using a static SECRET_KEY.
- Set
BASE_URLto your client-specific Checkout.com Sandbox API base URL. - To test stored card flows, set
CUSTOMER_IDto your Checkout.com Sandbox customer ID. - To test credential forwarding, set your external provider Sandbox API credentials.
# Override default base URL (https://api.sandbox.checkout.com)
BASE_URL="https://[prefix].api.sandbox.checkout.com"
# Stored card payments
CUSTOMER_ID="cus_..."
# ------ Supported forward destinations ------
# Stripe
STRIPE_SECRET_KEY="sk_test_..."
# Adyen
ADYEN_API_KEY="..."
ADYEN_MERCHANT_ACCOUNT="..."
# Global Payments
GLOBAL_PAYMENTS_APP_ID="..."
GLOBAL_PAYMENTS_APP_KEY="..."- Build the server:
npm install- Run the server:
npm start- Go to http://localhost:3000/.
Tip
Don't like 3000? Set your own PORT in .env.
To test Apple Pay in Sandbox, you need to:
- Have an
httpsdomain with valid TLS certificate. - Complete domain verification.
- Sign in with a Sandbox Tester Apple ID to add test cards to your device wallet.
To load different payment methods you need to:
- Ensure they are enabled on your Sandbox account.
- Send any required data in the payment session request. You can check requirements for each payment method here.