CardInfo SDK · Sandbox

The sandbox lets you integrate the CardInfo SDK without touching production. Same payload schema, same flow — but the card data is fake and no credentials are validated against a real backend.

⚠ This is a test environment. Cards returned here are demo PANs (e.g. 4111 1111 1111 1111). Never use real customer data in your requests.

Endpoints

MethodURLPurpose
POSThttps://sandbox-cardapi.codegotech.com/getCardInfoRequest a viewer token for a test card
GEThttps://sandbox-cardview.codegotech.com/v/<token>Open the iframe viewer (embed in your UI)
GEThttps://sandbox-cardapi.codegotech.com/signupGet a free sandbox API key

Get a sandbox key

Sandbox is free and self-service. Sign up here with your email — you'll receive your sk_sbx_… key instantly. No credit card, no signup approval queue.

Authentication (identical to production)

The sandbox accepts the exact same payload shape as cardapi.codegotech.com. Authentication uses two fields:

FieldWhat it isSandbox value
authkeyTenant API key (gate string)Any non-empty string (e.g. "anything")
authekeyBasic credentials, base64-encoded username:passwordbase64("sandbox:<your sk_sbx_… key>")

Build authekey from your sandbox key with any base64 helper. Example with the key sk_sbx_abc123…:

# bash
printf 'sandbox:sk_sbx_abc123def456...' | base64
# → c2FuZGJveDpzal9zYnhfYWJjMTIzZGVmNDU2Li4u

// node
Buffer.from('sandbox:sk_sbx_abc123def456...').toString('base64');

// python
import base64; base64.b64encode(b'sandbox:sk_sbx_abc123def456...').decode()

When you go to production, the same field carries your real bank_bassapikey credentials (base64(username:password) from the Codego admin panel). Your code doesn't change.

Test cards

Send cid in the request body to pick which test card is returned.

cidBrandPANCVVExpiryResult
1VISA4111 1111 1111 111112312/29✅ approved
2Mastercard5555 5555 5555 444445612/29✅ approved
3Amex3782 822463 10005789012/29✅ approved
4VISA4000 0000 0000 000200012/29❌ declined (API returns status:false)

Example: request a token

curl -X POST https://sandbox-cardapi.codegotech.com/getCardInfo \
  -H "Content-Type: application/json" \
  -d '{
    "authkey": "anything",
    "authekey": "<base64(any:sk_sbx_xxx)>",
    "whitelabel_id": "demo-wl",
    "user_id": "user_42",
    "web_token": "any-token",
    "cid": "1"
  }'

Response (success)

{
  "status": true,
  "token": "f5b3...c801",
  "image_url": "https://sandbox-cardview.codegotech.com/v/f5b3...c801",
  "card_brand": "VISA",
  "expires_in": 300,
  "sandbox": true
}

Response (declined / cid=4)

{
  "status": false,
  "message": "Card declined (sandbox)",
  "code": "CARD_DECLINED",
  "sandbox": true
}

Embed the viewer

Once you have a token, drop the image_url into an iframe:

<iframe src="https://sandbox-cardview.codegotech.com/v/f5b3...c801"
        width="350" height="220"
        frameborder="0"
        sandbox="allow-same-origin allow-scripts"></iframe>

The viewer auto-clears after 60 seconds. Tokens are one-time use and expire after 5 minutes.

Going to production

When you're ready to integrate the live API:

  1. Contact us at [email protected] with your IPs and origins
  2. You'll receive a production authkey + tenant whitelabel_id
  3. Switch base URL from sandbox-cardapi.codegotech.comcardapi.codegotech.com
  4. Same payload schema — your sandbox code works in prod with zero changes

Get sandbox key →