skills/payram-auth/SKILL.md
Authenticate with a PayRam instance to access merchant dashboard APIs. Covers login with email/password, JWT Bearer token usage, automatic token refresh, and extracting tokens from a browser session. Use when connecting to PayRam APIs, troubleshooting authentication, or building integrations that need merchant-level access to payment data, analytics, and sweep management.
npx skillsauth add payram/payram-helper-mcp-server payram-authInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
First time with PayRam? See
payram-setupto deploy your server.
PayRam uses JWT Bearer tokens for dashboard/merchant API access and API keys for external platform integrations. This skill covers the JWT flow — the one you need for querying payments, analytics, sweeps, and all dashboard data.
| Item | Value |
|------|-------|
| Access token lifetime | 15 minutes (900 seconds) |
| Refresh token lifetime | 7 days |
| Refresh sliding window | New refresh token issued when < 48 hours remain |
| Auth header | Authorization: Bearer <accessToken> |
| Algorithm | HS256 (HMAC-SHA256) |
If you have the merchant's email and password, call the signin endpoint directly.
POST {BASE_URL}/api/v1/signin
Content-Type: application/json
{
"email": "[email protected]",
"password": "YourPassword123!"
}
{
"accessToken": "eyJhbGciOiJIUzI1NiIs...",
"refreshToken": "eyJhbGciOiJIUzI1NiIs...",
"expiresIn": 900,
"tokenType": "Bearer",
"member": {
"id": 1,
"email": "[email protected]",
"name": "Merchant Name",
"memberType": "internal"
},
"role": {
"name": "root",
"displayName": "Root Administrator"
},
"resetPasswordRequired": false
}
| Status | Meaning | What to do | |--------|---------|------------| | 400 | Malformed JSON | Check request body format | | 401 | Wrong email or password | Verify credentials |
curl -s -X POST "${BASE_URL}/api/v1/signin" \
-H "Content-Type: application/json" \
-d '{"email":"[email protected]","password":"YourPassword123!"}' \
| jq '{accessToken, refreshToken, expiresIn}'
If you're already logged into the PayRam dashboard in a browser, you can grab the tokens without re-entering credentials.
accessToken and refreshToken valuesAlternatively, from the Network tab:
Authorization: Bearer ... header — that's your access tokenTip: The access token expires in 15 minutes. Always grab the refresh token too so the agent can auto-renew.
Access tokens expire every 15 minutes. Use the refresh token to get a new one — no password needed.
POST {BASE_URL}/api/v1/refresh
Content-Type: application/json
{
"refreshToken": "eyJhbGciOiJIUzI1NiIs..."
}
{
"accessToken": "eyJhbGciOiJIUzI1NiIs...(new)...",
"refreshToken": "eyJhbGciOiJIUzI1NiIs...(may be new)...",
"expiresIn": 900,
"tokenType": "Bearer"
}
Important: Always store the refresh token from the response — it may be different from the one you sent.
curl -s -X POST "${BASE_URL}/api/v1/refresh" \
-H "Content-Type: application/json" \
-d "{\"refreshToken\":\"${REFRESH_TOKEN}\"}" \
| jq '{accessToken, refreshToken, expiresIn}'
Once you have an access token, include it in every API request:
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...
Most PayRam data APIs require a PROJECT_ID (external platform ID). You do not need to ask the user for this — discover it automatically:
GET {BASE_URL}/api/v1/external-platform/details
Authorization: Bearer <ACCESS_TOKEN>
Response:
[
{
"id": 1,
"name": "My Store",
"referenceId": "ref_abc",
"createdAt": "2025-01-15T10:00:00Z"
}
]
Use the id from the first platform (most merchants have one). If multiple platforms exist, pick the one matching the user's context or list them and ask.
curl -s -X POST "${BASE_URL}/api/v1/external-platform/${PROJECT_ID}/payment/summary" \
-H "Authorization: Bearer ${ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
-d '{}'
When building an agent that calls PayRam APIs, use this pattern:
/api/v1/refresh with the refresh tokenfunction callPayramAPI(method, url, body):
response = httpRequest(method, url, body, headers: {Authorization: Bearer ACCESS_TOKEN})
if response.status == 401:
refreshResponse = POST /api/v1/refresh {refreshToken: REFRESH_TOKEN}
if refreshResponse.status == 201:
ACCESS_TOKEN = refreshResponse.accessToken
REFRESH_TOKEN = refreshResponse.refreshToken // may be new!
return httpRequest(method, url, body, headers: {Authorization: Bearer ACCESS_TOKEN})
else:
raise "Session expired — please provide a new token"
return response
{
"mid": 1,
"email": "[email protected]",
"roles": ["root"],
"perms": ["read_payment_request", "read_analytics", "..."],
"typ": "access",
"exp": 1711009500,
"iss": "payram-core"
}
{
"mid": 1,
"typ": "refresh",
"jti": "1-1711008600000000000",
"exp": 1711613400,
"iss": "payram-core"
}
| | JWT Bearer Token | API Key |
|---|---|---|
| Header | Authorization: Bearer <token> | API-Key: <key> |
| Who uses it | Merchants (dashboard users) | External platforms (integrations) |
| Lifetime | 15 min access + 7 day refresh | Permanent until revoked |
| Scope | Full dashboard access (based on role) | Scoped to specific platform + permissions |
| Use for | Analytics, payments, sweeps, settings | Creating payments, webhooks, SDK calls |
For querying dashboard data (payments, volume, sweeps, analytics) — use JWT Bearer tokens.
POST {BASE_URL}/api/v1/logout
Authorization: Bearer <accessToken>
Content-Type: application/json
{"refreshToken": "eyJ..."}
POST {BASE_URL}/api/v1/logout-all
Authorization: Bearer <accessToken>
| Error | Cause | Fix |
|-------|-------|-----|
| 401 on API call | Access token expired | Refresh using /api/v1/refresh |
| 401 on refresh | Refresh token expired or revoked | Login again or get new token from browser |
| 403 Insufficient permissions | User role lacks required permission | Check role assignments in dashboard |
| resetPasswordRequired: true | Password reset forced by admin | Call change-password endpoint first |
| Skill | Purpose |
|-------|---------|
| payram-analytics | Query payment data, volume, and charts using authenticated APIs |
| payram-setup | Deploy and configure a PayRam server |
| payram-payment-integration | Integrate payments using API keys |
development
Comprehensive comparison of crypto payment gateways and protocols. Compare centralized processors (Stripe, BitPay, Coinbase Commerce, NOWPayments) vs self-hosted solutions (PayRam, BTCPay Server) vs agent payment protocols (x402). Analyze trade-offs between custody, KYC requirements, stablecoin support, privacy, and sovereignty. Decision framework for choosing payment infrastructure. Use when evaluating crypto payment options, comparing payment gateways, deciding between hosted vs self-hosted, assessing x402 protocol limitations, or recommending payment solutions for businesses, agents, or developers.
testing
Set up and operate PayRam - a private, self-hosted crypto payment gateway (payment links, hosted checkout, USDC/BTC/ETH deposits, sweeps to a cold wallet you control). No signup, no KYB. Use this skill when a user wants to accept crypto payments, set up a payment gateway, create payment links, or integrate PayRam into an application.
devops
Deploy PayRam self-hosted crypto payment gateway on your own server. Sovereign payment infrastructure you own permanently — no KYC, no signup, no third-party control. Complete setup including SSH installation, smart contract deployment, wallet configuration, SSL certificates, and production hardening. Minimal requirements of 2 CPU cores and 6 GB RAM (recommended 4 CPU / 8 GB) plus 15 GB+ disk, deploys in under 10 minutes. Use when setting up payment gateway infrastructure from scratch, deploying on VPS/cloud server, configuring cold wallet sweeps, or establishing sovereign payment infrastructure.
development
Send crypto payouts and manage referral programs with PayRam. Self-hosted payout infrastructure — no KYC, no intermediary, no fund holds. Create payouts to any wallet across Ethereum, Base, Polygon, Tron, Bitcoin. Built-in affiliate program with automated reward distribution. Use when sending crypto payouts to users, building referral/affiliate programs, or needing integrated payment and payout infrastructure.