flowglad/pay-skills/card-sessions
- community
Checking that the SKILL.md file is still in the repository.
Create and redeem Flowglad Pay card sessions to securely access virtual card details (PAN, CVV, expiry). Use this skill when an agent or application needs to retrieve card numbers through the scoped-token security model.
Install
npx vskill@latest install flowglad/pay-skills/card-sessionsSKILL.md
Card Sessions
Abstract
Card sessions are the secure mechanism for accessing virtual card details (number, CVV, expiry) in Flowglad Pay. A session is created against a payment method, which returns a short-lived scoped JWT token. That token is then used to redeem the session and retrieve card details. This two-step flow ensures card details never leak into MCP tool contexts or long-lived API key scopes.
Table of Contents
- Security Model — CRITICAL
- Create a Card Session — CRITICAL
- Redeem a Card Session — CRITICAL
- Check Session Status — MEDIUM
- Audit Redemptions — MEDIUM
- Session Lifecycle — LOW
1. Security Model
Impact: CRITICAL — misunderstanding this causes auth failures
Card details are never returned by:
- Standard API key authenticated endpoints
- MCP tools (intentionally omitted from AI context windows)
Instead, card details require a scoped redeem token — a short-lived HS256 JWT with:
scope:card-session:redeem:{paymentMethodId}sub: user ID- Expiry matching the session TTL
The token is returned when creating a session and must be passed via the X-Scoped-Token header when redeeming.
2. Create a Card Session
Creates a session and returns a scoped redeem token.
REST API
Request body:
| Field | Type | Required | Default | Validation | |
|---|---|---|---|---|---|
paymentMethodId | string | Yes | — | Must start with pm_ | |
ttlSeconds | integer | No | 300 | 30–3600 | |
maxRedeemCount | integer | No | 1 | 1–10 |
Response (200):
CLI
MCP Tool
Important: The MCP tool returns session metadata and a hint, but does NOT return card details. You must use the REST API redeem endpoint with the scoped token.
3. Redeem a Card Session
Exchanges a scoped token for card details. This is the only way to get card PAN/CVV/expiry.
REST API
No request body required. Authentication is via the scoped token only (not the API key).
Response (200):
CLI
Shortcut: Create + Redeem in One Step
The fgp card command creates a session and immediately redeems it:
If using an agent-scoped API key, this automatically resolves the agent's payment method ID.
Error Responses
| Status | Code | Meaning | |
|---|---|---|---|
| 401 | UNAUTHORIZED | Missing or invalid scoped token | |
| 403 | FORBIDDEN | Token scope doesn't match session's payment method | |
| 404 | NOT_FOUND | Session not found | |
| 409 | CONFLICT | Session expired, exhausted, or invalid status |
4. Check Session Status
REST API
Response: Same session object as create (without redeemToken).
CLI
MCP Tool
5. Audit Redemptions
List all redemption records for a session, including IP addresses and timestamps.
REST API
Response:
CLI
MCP Tool
6. Session Lifecycle
Sessions progress through these statuses:
- active: Can be redeemed (redeemCount < maxRedeemCount, not past expiresAt)
- redeemed: All redemptions used, card details still in vault temporarily
- expired: TTL elapsed, no further redemptions possible
- scrubbed: Card details permanently purged from vault
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/card-sessions/SKILL.md
Popularity
- Repository stars
- 1
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/flowglad/pay-skills/card-sessions)