Skip to content

stephen-gilbert-cko/flow-samples

Repository files navigation

Flow Samples

Within the /public folder, you'll find a number of example Flow integrations - each demonstrating different possible configurations.

Get started

  1. In the project root, create a .env file.

  2. In .env:

    • Set PUBLIC_KEY to your Checkout.com Sandbox API public key.

    • Set ACCESS_KEY_ID and ACCESS_KEY_SECRET to your Checkout.com Sandbox access key pair (recommended), or SECRET_KEY to your Checkout.com Sandbox API secret key.

    • Set PROCESSING_CHANNEL_ID to 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.

Optional

  • Set BASE_URL to your client-specific Checkout.com Sandbox API base URL.
  • To test stored card flows, set CUSTOMER_ID to 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="..."
  1. Build the server:
npm install
  1. Run the server:
npm start
  1. Go to http://localhost:3000/.

Tip

Don't like 3000? Set your own PORT in .env.

Apple Pay

To test Apple Pay in Sandbox, you need to:

Payment method availability

To load different payment methods you need to:

  1. Ensure they are enabled on your Sandbox account.
  2. Send any required data in the payment session request. You can check requirements for each payment method here.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published