Getting Started
This guide walks you through setting up OpenCheckout from scratch. By the end, you will have a running checkout server, a merchant account, and an API key you can use to create checkout sessions.
Step 1: Get an Open Payments Wallet
OpenCheckout needs an Open Payments wallet address to receive payments. If you already have one with developer keys, skip to Step 2.
For testing and development, the Interledger test network provides free wallets with play money:
- Go to wallet.interledger-test.dev
- Click Create account at the bottom-right
- Enter your email address, create a password, and confirm it
- Check your inbox for a verification email from
tech@interledger.organd click Confirm my email address - Log in with your credentials
- Complete the identity verification steps
- Once logged in, click New account from the dashboard
- Enter an account name (e.g., “My Store”), choose an asset (USD, EUR, etc.), and click Create account
- Select your new account and click Deposit to add play money
- Click Add wallet address, give it a name (e.g.,
mystore), and add a public display name - Go to Settings → Developer Keys, expand the menu for your wallet account, and click Generate public & private key
- Give the key a nickname and click Generate keys. A
private.keyfile will download automatically - Note the Key ID shown on the screen — you will need it
You now have:
- A wallet address URL:
https://ilp.interledger-test.dev/mystore - A private key file:
private.key - A key ID: a UUID like
60185f1c-e8a6-4b52-9ac1-e2fc1952cf76
The public key is automatically stored at your wallet’s JWKS endpoint at https://ilp.interledger-test.dev/mystore/jwks.json. OpenCheckout only needs the private key and key ID.
Step 2: Install OpenCheckout
git clone https://github.com/temidayoxyz/opencheckoutcd opencheckoutnpm installStep 3: Configure Environment Variables
Create a .env.local file in the project root:
DATABASE_URL=data/opencheckout.dbENCRYPTION_KEY=<your-64-character-hex-key>BASE_URL=http://localhost:3000Generate a secure encryption key:
openssl rand -hex 32The ENCRYPTION_KEY is used to encrypt your merchant private key in the SQLite database. Store it securely. If you lose it, you will not be able to decrypt your private key and will need to re-run the setup wizard.
Step 4: Run the Setup Wizard
The setup wizard creates your merchant record, encrypts your private key, and generates an API key:
npm run setupYou will be prompted for:
- Merchant name: The display name shown on your checkout page (e.g., “My Store”)
- Wallet address URL: Your full wallet address (e.g.,
https://ilp.interledger-test.dev/mystore) - Key ID: The key identifier from your wallet’s developer keys page
- Path to private key file: The path to the
private.keyfile you downloaded
The wizard outputs your API key:
Merchant ID: mer_xxxxxxxxxxxxAPI Key: sk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxCopy the API key now and store it securely. It is never displayed again.
If you need to convert your private key to PEM format (required by the Open Payments SDK), create a PEM file:
echo "-----BEGIN PRIVATE KEY-----" > private.pemcat private.key >> private.pemecho "-----END PRIVATE KEY-----" >> private.pemThen use private.pem as the path in the setup wizard.
Step 5: Start the Server
npm run devThe server starts at http://localhost:3000.
Step 6: Access the Dashboard
Open http://localhost:3000/dashboard in your browser. Sign in using the API key from the setup wizard.
The dashboard shows your transaction history, API key management, and webhook settings. Read the Dashboard Guide for a full walkthrough.
Step 7: Create Your First Checkout Session
curl -X POST http://localhost:3000/api/checkout/sessions \ -H "Authorization: Bearer sk_YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "mode": "payment", "line_items": [{ "price_data": { "currency": "usd", "product_data": { "name": "Test Product" }, "unit_amount": 500 }, "quantity": 1 }], "success_url": "https://example.com/success", "cancel_url": "https://example.com/cancel" }'The response includes a url field. Open that URL in your browser to see the checkout page.
Step 8: Complete a Test Payment
To test a full payment, you need two wallet addresses — one to receive (your merchant wallet) and one to send (a customer wallet). Create a second wallet address on the Interledger test network for the customer role.
- Open the checkout page URL from Step 7 in your browser
- Enter the customer’s wallet address (the second wallet you created)
- Click the payment button
- You will be redirected to the customer’s account provider to approve the payment
- Log in as the customer and approve the payment
- After approval, you see the OpenCheckout confirmation page
- After a few seconds, you are forwarded to your success URL
The payment appears in your dashboard at /dashboard and in both wallet account histories on the test network.
Next Steps
- Read the API Reference for complete endpoint documentation
- Follow the Integration Guide to integrate OpenCheckout into your application
- Learn about the Dashboard features
- Review Deployment for production setup
- Understand the Architecture and Security model