/jpm-payments-skills:jpm-oauthfrom jpm-payments-skills
Generates J.P. Morgan Payments OAuth authentication modules (JWT signing + IDAnywhere token exchange) for Node/TypeScript, Python, or Java. Includes built-in token caching and environment-aware configuration.
Ships in jpm-payments-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Generate JWT-signing + access-token-exchange code that follows JPM's IDAnywhere OAuth contract. The generated module caches the access token until just before its server-set expiry, so the merchant's app reuses one token across many API calls instead of regenerating per request.
This skill is typically invoked from the end of jpm-integrations-get-started (its Step 4). When run standalone, it gathers the same inputs interactively.
The merchant must have all four of:
CC-123456-D12992-232222-TEST).cer from JPM)If you arrived from jpm-integrations-get-started, these are already in conversation context — use them.
If invoked standalone:
.env, or in conversation.jpm-integrations-get-started first and exit. Do not invent placeholder values.Ask:
Do not prompt the user for the resource_id. The generated module reads it from the JPM_RESOURCE_ID environment variable at runtime, and the intake skill's .env.example already includes that key with a comment pointing the user at the JPM onboarding email (where the value lives). Just remind the user in your wrap-up to fill JPM_RESOURCE_ID in their .env before running the auth module — and that CAT and PROD have different resource_id values, so the right one must be in the .env for the environment they're targeting.
Show the user this guidance verbatim before asking the TTL question:
Two TTLs to know about:
Access token TTL — set by JPM's IDAnywhere server, returned as
expires_in(seconds) in every token response. The generated module reads this value and reuses the access token across requests until shortly before it expires. Don't treat it as fixed — server-side defaults can change.JWT TTL — client-controlled (you pick). The JWT is the credential you hand to IDAnywhere to get an access token.
Anti-pattern to avoid: generating a fresh JWT and a fresh access token on every API call (think of it like running a card auth on a brand-new payment instrument every transaction — wasteful and slow). The access token is reusable until expiry. The generated module caches it in memory and only refreshes it when within ~30s of expiry. Call
getAccessToken()once per outbound request and let the cache do its job.
Then ask:
If "Custom", prompt free text. Accept forms like 30m, 8h, 3600s. Convert to seconds before generating code.
If you arrived from jpm-integrations-get-started Step 4, the language and HTTP / JWT libraries the merchant chose are in conversation context. Confirm in one sentence ("Generating Python with httpx and pyjwt — sound right?") and proceed. If they say no, re-ask.
If invoked standalone, run the same detection logic the intake skill uses: look in the user's CWD for package.json, pyproject.toml/requirements.txt, pom.xml, build.gradle*, go.mod, Cargo.toml, Gemfile, composer.json, *.csproj. If a manifest is found and contains an HTTP client and a JWT library, just announce. Otherwise prompt for the gaps only.
Ask the user where the auth module should live:
src/auth/jpmAuth.ts for Node/TS, <project_pkg>/auth/jpm.py for Python, src/main/java/<pkg>/auth/JpmAuth.java for Java). Confirm the exact path with the user before writing../jpm-auth/. Useful for keeping the integration cleanly separated from the rest of the codebase.Always echo the final path back to the user and wait for confirmation before any Write call.
references/algorithm.md (always — it's the canonical spec).references/<language>.md if one exists for the target language. Bundled: node.md, python.md, java.md. For other languages, translate the algorithm idiomatically using the user's chosen libs.getAccessToken() function (or language-equivalent name) with built-in caching and an in-flight mutex.example.<ext> file if the user prefers that layout.<DEFAULT_TTL_SEC> placeholders in the reference code with the actual TTL chosen in Step 3, expressed in seconds (e.g. 28800 for 8h).If "Both" was chosen in Step 2, the generated code reads JPM_RESOURCE_ID from the environment so the same binary works in CAT or PROD by swapping the .env. There's no per-environment branching in the source.
The generated module reads these env vars at runtime:
JPM_CLIENT_IDJPM_PRIVATE_KEY_PATHJPM_CERT_THUMBPRINT (SHA-1 hex; colons OK — code strips them)JPM_RESOURCE_IDJPM_JWT_TTL_SEC (optional — defaults to the value baked into the generated code)Plus optionally JPM_CERT_PATH if anything else in the project also reads the cert directly.
Look in the user's CWD for .env.example and .env. The intake skill's 3b branch typically created .env.example with only the first three credential vars; this step fills in the rest.
.env.example exists: for each of JPM_CERT_THUMBPRINT, JPM_RESOURCE_ID, JPM_JWT_TTL_SEC whose key is not already present, append a placeholder line (<KEY>=). Don't write real values into .env.example — keep it a template. Tell the user which keys were added.
.env exists (and .env.example does not, or the user wants both updated): ask AskUserQuestion ("Append missing keys to .env?" / "Yes, append placeholders" / "No, I'll handle it"). If yes, append only keys that are missing — never overwrite existing values.
Neither file exists: skip the file edit and just list the variable names in the wrap-up message so the user can wire them into whatever config mechanism they use.
Whenever you mention these vars to the user, surface the actual values you have from this conversation — the SHA-1 thumbprint computed by the intake skill and the JWT TTL chosen in Step 3 — so they can copy-paste rather than re-derive. Show the thumbprint in the no-colons uppercase form the JWT header expects. For JPM_RESOURCE_ID, point the user at the comment already in .env.example (it explains that the value comes from the JPM onboarding email and that CAT and PROD differ) — don't ask them for it.
Show the user:
const token = await getAccessToken();).Then proceed to Step 8.
Auth is now wired up. Ask whether the user wants to keep going into API integration in this same session:
If Yes, invoke the jpm-merchant-integrations skill via the Skill tool. It picks up from here using the auth module path and credentials context already in conversation, so the user won't be re-asked anything they've already answered.
If No, exit cleanly. The user can run jpm-merchant-integrations later when they're ready.
kid header — JPM's IDAnywhere expects uppercase hex with no separators.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub jpmorgan-payments/ai --plugin jpm-payments-skills5 skills in this plugin
/jpm-csrGenerate a Certificate Signing Request (CSR) and matching private key for JPM Payments API onboarding. Use this skill when a merchant needs to create a CSR to send to their JPM Relationship Manager (RM) for client ID provisioning via IDAHO/IDAnywhere, when generating a new key pair for JPM/Chase Orbital API authentication, or when preparing credentials before completing JPM onboarding. Supports CAT, PROD, or both environments at once and enforces the JPM rule that the CN must differ between CAT and PROD./jpm-integrations-get-startedTriage and credential intake for merchants starting with J.P. Morgan Payments APIs. Use this skill when the user wants to migrate from another payment provider to JPM or start a new JPM integration from scratch. Sets up a .env file (generated fresh or updated in place) with the clientId, certificate path, and private key path that downstream skills will read at runtime. Does not persist credential contents./jpm-merchant-integrationsImplement J.P. Morgan Payments API integrations in a merchant project once OAuth authentication is in place. Use this skill after a merchant has completed JPM onboarding and wired up authentication (typically right after `jpm-oauth`) and is ready to integrate one of the supported APIs — Checkout, Online Payments, Tokenization, 3-D Secure, Account Updater, or Reporting. For inbound webhook handling, use the companion `jpm-notifications` skill instead. Recommends implementing one API at a time, reusing the credentials and auth module already wired into the project./jpm-notificationsImplement and manage J.P. Morgan Payments Notifications (webhook) integrations in a merchant project once OAuth authentication is in place. Use this skill after jpm-oauth when the merchant wants to discover notification types, build a webhook receiver, create or inspect notification subscriptions, configure webhook security preferences, test delivery, retrieve notifications, or verify webhook signatures (X-Signature). Reuses the auth module generated by jpm-oauth — it does not implement its own OAuth. Delivery is WEBHOOK-first. Triggers include notifications, webhook, subscribe to notifications, notification types, callback URL, X-Signature, public keys, verify signature, payout/dispute/payment notifications, retry, dead letter.Other plugins' skills for the same job