Sample app reference
Thesample-app/ directory in the Blink repository contains a working end-to-end integration. It demonstrates:
- Checkout SDK initialization and
requestDeposit()call (seesrc/PaymentPage.tsx) - A local dev signer endpoint via Vite middleware (see
vite.config.ts) - Environment configuration (see
env.example)
Local development signer
For local testing, you can use the mock signer pattern from the sample app. The Vite dev server middleware handlesPOST /api/mock-sign-payment-link and signs requests using a private key from .env.local.
Environment variables for the local signer:
| Variable | Purpose | Example |
|---|---|---|
SAMPLE_APP_MERCHANT_ID | Your merchant UUID | 11111111-1111-4111-8111-111111111111 |
SAMPLE_APP_MERCHANT_PRIVATE_KEY | PEM-encoded private key | "-----BEGIN PRIVATE KEY-----\n..." |
End-to-end verification
Follow this sequence to verify your integration:Generate a key pair
Use the instructions in Key Generation.
Register the merchant
Provide your public key to Blink (Merchant Registration).
Staging environment
For staging and shared environments:- Deploy your signer as a server endpoint or serverless function (e.g., AWS Lambda).
- Store the private key in a secrets manager (e.g., AWS Secrets Manager).
- Point the Checkout SDK’s
signerconfig at your deployed signer URL. - Set
webviewBaseUrlto the Blink staging URL:https://pay-staging.tryblink.xyz.
Debug mode
Enable debug logging to trace the full SDK lifecycle during development:console.debug with the [BlinkCheckout] prefix.