Skip to main content
POST
Create a card session
The returned token is a browser session, not a portal token: keep the portal token on your server. scope is card:manage, and the token is accepted only on the card-management endpoints listed below. Every other /a/** endpoint returns 403 with browser_scope_forbidden (code 71211020), including any attempt to read transactions or customer data. /agent/** requires a portal token, so the gateway rejects this browser session there with 401. There are no body fields. The session is always created for the token’s customer. The default lifetime is 30 minutes. When the token expires, call this endpoint again; do not reuse an expired token.

Allowed endpoints

  • GET /a/cwallet/card/info: List the customer’s cards.
  • PUT /a/cwallet/card/setDefault: Set the default card.
  • DELETE /a/cwallet/card/delete: Delete a card.
  • GET /a/cwallet/get/countryAlpha2Code: Country code inferred from the caller’s IP, used to preselect the card form.
  • GET /a/cwallet/kms/public-key: Fetch the public key used by the in-page add-card form; submit the encrypted card via POST /a/cwallet/card/add in the same session.
  • POST /a/cwallet/card/add: Add a card; returns a 3-D Secure action when required.
  • POST /a/cwallet/redirect/callback: Complete the 3-D Secure callback for card add.
Adding a card is supported in this card session: card/add returns a 3-D Secure action when needed, and redirect/callback completes it. The callback can also advance a purchase authorization, so the token must stay in the customer’s own browser and must not be shared across customers. The Vault session (Create a Vault session) remains an optional hosted add-card path. No other card, transaction, or customer-data endpoint is open to this session.
Treat access_token as a credential. Do not write it to logs, share it between users, or send it to a model. Use it only in the customer’s own browser session, and request a new one for a different customer.

Authorizations

Authorization
string
header
required

Portal user token from POST /agent/cwallet/platform/portal/tokens. Reads require portal:read; writes require portal:write.

Response

Success

code
integer<int32>

200 on success.

Example:

200

msg
string

Result message.

Example:

"Success"

data
object