Developerv1

CargaCell API

The same backend used by the web application is available over HTTP. Create an API key from your profile and authenticate server-to-server requests with the x-api-key header.

Base URLhttps://www.cargacell.com/api/v1
Get API key →

Quick start

API key authentication

Send your key in the x-api-key header on every request. JWT browser sessions still work in parallel for web clients.

curl -X GET \
  https://www.cargacell.com/api/v1/auth/me \
  -H "x-api-key: cc_live_your_key"

IP whitelist behavior

  • 0Every IP is allowed — default for new keys.
  • ≥1Only those exact addresses are accepted.
  • RevokeKey stops working immediately; create a new one.

Endpoint reference

All paths are relative to the base URL above.

Endpoints tagged Web only require a browser session token and reject x-api-key authentication.

Authentication

Validate the key and read or update the current account profile.

MethodPathDescriptionTags
POST/auth/loginEmail and password login
GET/auth/meGet current authenticated user
PATCH/auth/meUpdate profile and billing data

Catalog & cart

Browse operators and products, then build orders before checkout.

MethodPathDescriptionTags
GET/catalog/countriesList available countries
GET/catalog/operatorsList available operators
GET/catalog/recharge-productsRecharge catalog with filters
GET/cartGet current cart
POST/cart/itemsAdd a cart item
DELETE/cart/items/:itemIdRemove a cart item

Payments & wallet

Price and dispatch recharges using wallet balance. External checkout is web-session-only.

MethodPathDescriptionTags
POST/payments/quoteGet a price quote
POST/payments/prepareValidate web checkout inputs
Web only
POST/payments/checkoutComplete external web checkout
Web only
GET/payments/historyPayment history
GET/wallet/balanceCurrent wallet balance
POST/wallet/checkoutDispatch recharges funded by wallet
POST/api-access/b2b/rechargesB2B dedicated wallet-funded recharge
B2B

Administration

Admin accounts can use the same API-key mechanism for all back-office endpoints.

MethodPathDescriptionTags
GET/admin/summaryDashboard summary
Admin
GET/admin/usersUser management
Admin
GET/admin/rechargesRecharge operations
Admin
GET/admin/paymentsPayment operations
Admin
GET/admin/productsCatalog operations
Admin

Code examples

Live examples mirroring the current backend behavior. Toggle between Request and Response in each card.

Verify your key

Send a GET request to confirm authentication is working and inspect the account the key belongs to.

curl -X GET \
  https://www.cargacell.com/api/v1/auth/me \
  -H "x-api-key: cc_live_your_generated_key" \
  -H "Accept-Language: en"

List products with promo details

Fetch the recharge catalog. Products with active or scheduled promotions include full promo details (name, description, optional terms).

curl -X GET \
  "https://www.cargacell.com/api/v1/catalog/recharge-products?country=ES&limit=5" \
  -H "x-api-key: cc_live_your_generated_key" \
  -H "Accept-Language: en"

Add a cart item

Push a recipient line into the cart. Fetch the product catalog first to resolve a valid productId.

curl -X POST \
  https://www.cargacell.com/api/v1/cart/items \
  -H "Content-Type: application/json" \
  -H "x-api-key: cc_live_your_generated_key" \
  -d '{
    "sessionId": "agent-session-001",
    "productId": "12345",
    "recipientNumber": "+5355512345",
    "quantity": 2
  }'

B2B wallet recharge

Dedicated B2B endpoint — skips MONEI entirely and dispatches immediately from approved wallet balance.

curl -X POST \
  https://www.cargacell.com/api/v1/api-access/b2b/recharges \
  -H "Content-Type: application/json" \
  -H "x-api-key: cc_live_your_generated_key" \
  -d '{
    "items": [
      {
        "productId": "12345",
        "recipientNumber": "+5355512345",
        "quantity": 2
      }
    ],
    "baseCurrency": "EUR"
  }'

Generic wallet checkout

Standard wallet-funded checkout — works with both API keys and web sessions.

curl -X POST \
  https://www.cargacell.com/api/v1/wallet/checkout \
  -H "Content-Type: application/json" \
  -H "x-api-key: cc_live_your_generated_key" \
  -d '{
    "items": [
      {
        "productId": "12345",
        "recipientNumber": "+5355512345",
        "quantity": 1
      }
    ],
    "baseCurrency": "EUR"
  }'

List recharges (admin)

Admin API keys can call back-office endpoints using the same x-api-key header.

curl -X GET \
  "https://www.cargacell.com/api/v1/admin/recharges?page=1&limit=20" \
  -H "x-api-key: cc_live_admin_key"

Recharge flows

Three dispatch paths exist. Choose the one that fits your integration.

1

External payment checkout

Web only

The browser initiates a MONEI payment via POST /payments/prepare, then confirms after authorization via POST /payments/checkout. Requires a JWT web session. API keys are rejected.

2

Wallet checkout

Call POST /wallet/checkout with your items. The backend computes available balance from approved top-ups minus captured wallet payments and rejects if insufficient. Works with both API keys and web sessions.

3

B2B wallet recharge

B2B

Call POST /api-access/b2b/recharges. Uses the same wallet engine as path 2, but is purpose-built for API-key clients that must never interact with the MONEI flow. Dispatches immediately when balance is sufficient.

In all wallet-funded paths, successful payment creates queued recharge rows. Those are dispatched by the recharge processor, or marked as waitlisted when a DT One promo window applies.

Managing keys

All key operations are available in Dashboard → Profile.

1

Create

Create a named key for each integration or environment. The plaintext value is shown only once at creation time — copy it immediately.

2

Restrict

Add IP whitelist entries to lock a key to fixed infrastructure — office gateways, worker servers, or cloud function egress IPs.

3

Revoke

Revoke compromised or unused keys immediately. Revocation takes effect instantly. Never reuse old keys — generate a fresh one instead.