{"_id":"@ambulando/yellowcard-sdk","_rev":"8-0dd13c35d9b07fd5211307ec47b25aab","name":"@ambulando/yellowcard-sdk","dist-tags":{"beta":"1.0.0-beta.4","latest":"1.3.3"},"versions":{"1.0.0-beta.4":{"name":"@ambulando/yellowcard-sdk","version":"1.0.0-beta.4","_id":"@ambulando/yellowcard-sdk@1.0.0-beta.4","maintainers":[{"name":"ambulando","email":"massi@ambulando.net"}],"dist":{"shasum":"0b97f2002d668ac6e027a60eec68ab335ce49319","tarball":"https://registry.npmjs.org/@ambulando/yellowcard-sdk/-/yellowcard-sdk-1.0.0-beta.4.tgz","fileCount":27,"integrity":"sha512-VqE+g5YwpuI0FQmewr55t50bUYcYENrVSDzss0FXo1+T3HXA9cLiSG0nkgefjouOj8Aja9I/IW8ujos7MiSBfg==","signatures":[{"sig":"MEUCICcKj4FA7uUsW+nCd0QZ+luo38VoJ2rz4Ekd5KeSYAxZAiEAx6YtVacTmto4BDVt8s7EtHXFPF/nDMOWZQKQilbALLw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":49694},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"a8b9f94e002574daa079f4ab3aa6f7de69adec79","scripts":{"test":"NODE_OPTIONS=--experimental-vm-modules jest","build":"tsup","typecheck":"tsc --noEmit","test:watch":"NODE_OPTIONS=--experimental-vm-modules jest --watch"},"_npmUser":{"name":"ambulando","email":"massi@ambulando.net"},"_npmVersion":"11.11.0","description":"TypeScript client for the YellowCard API","directories":{},"_nodeVersion":"25.8.1","_hasShrinkwrap":false,"devDependencies":{"jest":"^30.4.2","tsup":"^8.0.0","ts-jest":"^29.4.11","crypto-js":"^4.2.0","typescript":"^5.0.0","@types/jest":"^30.0.0","@types/node":"^20.0.0","@types/crypto-js":"^4.2.2"},"_npmOperationalInternal":{"tmp":"tmp/yellowcard-sdk_1.0.0-beta.4_1781168548397_0.9547504126364097","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"@ambulando/yellowcard-sdk","version":"1.0.0","_id":"@ambulando/yellowcard-sdk@1.0.0","maintainers":[{"name":"ambulando","email":"massi@ambulando.net"}],"dist":{"shasum":"0ff62a80e07eb88b776b2f0ed3f3403c982f7381","tarball":"https://registry.npmjs.org/@ambulando/yellowcard-sdk/-/yellowcard-sdk-1.0.0.tgz","fileCount":9,"integrity":"sha512-ZBQbGXM2tUPpOtA0otpByUIPoN+QFuEZgQwRxCJ0ncuU3nN/T3rnQDjlmeOlJAZbzijxHddwL+UXhvreRZ1C6w==","signatures":[{"sig":"MEUCIAH0JehpyRzGzyUxgb+xq9tz1tsYkxdYbt6WbEuEkuV6AiEAmrrKMEYqRjvbh1Zyrmarc8QNjSk5Ga5fcUxajHg0hfY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1243857},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"d6ecd99cf720e30087ee45f1d34f2b69642a0acf","scripts":{"test":"NODE_OPTIONS=--experimental-vm-modules jest","build":"tsup","typecheck":"tsc --noEmit","test:watch":"NODE_OPTIONS=--experimental-vm-modules jest --watch"},"_npmUser":{"name":"ambulando","email":"massi@ambulando.net"},"_npmVersion":"11.11.0","description":"TypeScript client for the YellowCard API","directories":{},"_nodeVersion":"25.8.1","_hasShrinkwrap":false,"devDependencies":{"jest":"^30.4.2","tsup":"^8.0.0","ts-jest":"^29.4.11","crypto-js":"^4.2.0","typescript":"^5.0.0","@types/jest":"^30.0.0","@types/node":"^20.0.0","@types/crypto-js":"^4.2.2"},"_npmOperationalInternal":{"tmp":"tmp/yellowcard-sdk_1.0.0_1781169341042_0.33797172958296695","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@ambulando/yellowcard-sdk","version":"1.1.0","_id":"@ambulando/yellowcard-sdk@1.1.0","maintainers":[{"name":"ambulando","email":"massi@ambulando.net"}],"dist":{"shasum":"44fb8b67db80fb5b37e4ea03eae54d4075b24585","tarball":"https://registry.npmjs.org/@ambulando/yellowcard-sdk/-/yellowcard-sdk-1.1.0.tgz","fileCount":9,"integrity":"sha512-FmKvyGUNjGTY5kaaSUT/I4rhLVo0Uyqk9la4Lx4IRJHk4U1KRN2WN9WovZqLH+9ZbFCD/whjxkKpGIyleRc10A==","signatures":[{"sig":"MEUCIQD++L0Nn70HHSWwcDgDgfW+cMQrKGXtoUR23sq6SuM10QIgCJQuG60YinPeDQ4V6a4gDOP08vmGOPRxQ7RQ0Ubh3tI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1252182},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"190d4a1791dfba5553b124cece4280e8fcb024bf","scripts":{"test":"NODE_OPTIONS=--experimental-vm-modules jest","build":"tsup","typecheck":"tsc --noEmit","test:watch":"NODE_OPTIONS=--experimental-vm-modules jest --watch","publish:public":"npm publish --access public"},"_npmUser":{"name":"ambulando","email":"massi@ambulando.net"},"_npmVersion":"11.11.0","description":"TypeScript client for the YellowCard API","directories":{},"_nodeVersion":"25.8.1","_hasShrinkwrap":false,"devDependencies":{"jest":"^30.4.2","tsup":"^8.0.0","ts-jest":"^29.4.11","crypto-js":"^4.2.0","typescript":"^5.0.0","@types/jest":"^30.0.0","@types/node":"^20.0.0","@types/crypto-js":"^4.2.2"},"_npmOperationalInternal":{"tmp":"tmp/yellowcard-sdk_1.1.0_1781171770614_0.697689223622588","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@ambulando/yellowcard-sdk","version":"1.2.0","_id":"@ambulando/yellowcard-sdk@1.2.0","maintainers":[{"name":"ambulando","email":"massi@ambulando.net"}],"dist":{"shasum":"84a7c61957811ed3db4433dd62e693fdb7b51167","tarball":"https://registry.npmjs.org/@ambulando/yellowcard-sdk/-/yellowcard-sdk-1.2.0.tgz","fileCount":9,"integrity":"sha512-oL9NJY7WBxw8na3kjk7fn03RLcfQeg/pa4zqs4a+utApGp3nCFn1VOjZ4iBjyAJI5jlWRvJ8CXguxfvCvwZN1w==","signatures":[{"sig":"MEQCIEMALjZ141J5t8btB3FtMXKXSX+ChM+AT7s3te0ElW+cAiAt2Q7uRPO+rr5ck0ygJBTQbbRGVMCfQ7FnsbCqXK1jhA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1256563},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"b28525661619244a4978164dcc794d3f355d9eb8","scripts":{"test":"NODE_OPTIONS=--experimental-vm-modules jest","build":"tsup","typecheck":"tsc --noEmit","test:watch":"NODE_OPTIONS=--experimental-vm-modules jest --watch","publish:public":"npm publish --access public"},"_npmUser":{"name":"ambulando","email":"massi@ambulando.net"},"_npmVersion":"11.16.0","description":"TypeScript client for the YellowCard API","directories":{},"_nodeVersion":"26.3.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^30.4.2","tsup":"^8.0.0","ts-jest":"^29.4.11","crypto-js":"^4.2.0","typescript":"^5.0.0","@types/jest":"^30.0.0","@types/node":"^20.0.0","@types/crypto-js":"^4.2.2"},"_npmOperationalInternal":{"tmp":"tmp/yellowcard-sdk_1.2.0_1784730522635_0.5649685616137954","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"name":"@ambulando/yellowcard-sdk","version":"1.3.0","_id":"@ambulando/yellowcard-sdk@1.3.0","maintainers":[{"name":"ambulando","email":"massi@ambulando.net"}],"dist":{"shasum":"92c9f1755c86f69cb86350c5d603fee614ef26f3","tarball":"https://registry.npmjs.org/@ambulando/yellowcard-sdk/-/yellowcard-sdk-1.3.0.tgz","fileCount":9,"integrity":"sha512-VsjLt5MSeMJn5C6J+VQIcRryQK+ORY0OVTzZCSUEX1LYp08sMPw5gIZov3xKP7HC2soJ2qzZ55ZD8qqTc8ckPw==","signatures":[{"sig":"MEUCIEJbE999c8cAofiG1ghCBAQ815cuaBZSnVoplt1xJS6KAiEAvzpWVWMby0UYY/s8lLw54ns/QwP6DA0Om63baP927LI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1279420},"main":"./dist/index.cjs","type":"module","_from":"file:ambulando-yellowcard-sdk-1.3.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"test":"NODE_OPTIONS=--experimental-vm-modules jest","build":"tsup","typecheck":"tsc --noEmit","test:watch":"NODE_OPTIONS=--experimental-vm-modules jest --watch","publish:public":"npm publish --access public"},"_npmUser":{"name":"ambulando","email":"massi@ambulando.net"},"_resolved":"/private/var/folders/1q/yncx74450bj39m7_m81shv080000gn/T/c46e47f9b394c6ee35156b2dd6ec320f/ambulando-yellowcard-sdk-1.3.0.tgz","_integrity":"sha512-VsjLt5MSeMJn5C6J+VQIcRryQK+ORY0OVTzZCSUEX1LYp08sMPw5gIZov3xKP7HC2soJ2qzZ55ZD8qqTc8ckPw==","_npmVersion":"11.16.0","description":"TypeScript client for the YellowCard API","directories":{},"_nodeVersion":"26.3.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^30.4.2","tsup":"^8.0.0","ts-jest":"^29.4.11","crypto-js":"^4.2.0","typescript":"^5.0.0","@types/jest":"^30.0.0","@types/node":"^20.0.0","@types/crypto-js":"^4.2.2"},"_npmOperationalInternal":{"tmp":"tmp/yellowcard-sdk_1.3.0_1785439665426_0.002234706449912638","host":"s3://npm-registry-packages-npm-production"}},"1.3.1":{"name":"@ambulando/yellowcard-sdk","version":"1.3.1","_id":"@ambulando/yellowcard-sdk@1.3.1","maintainers":[{"name":"ambulando","email":"massi@ambulando.net"}],"dist":{"shasum":"315352672f4ee89eea623118a2516c0332bdc34b","tarball":"https://registry.npmjs.org/@ambulando/yellowcard-sdk/-/yellowcard-sdk-1.3.1.tgz","fileCount":9,"integrity":"sha512-BJUbt9pkNfsVIBxlbrlfPdhXUDzMR2YSlkc4FuJSHIl66L42kxQfv4scS2Gikog2m4LUmTSAbk6ZYwt9vp+TlQ==","signatures":[{"sig":"MEUCIAgpcz7JEf66+9D+3d+hYnpUMupZsW7yPgIm1ApNuvQ7AiEAv0uSioZzM/dz/HFhKYBZLvOGsTDg/fY3QFIQwSRihnA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1280070},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"efe97a29ae779e04b15656e5c32ff375e6d68491","scripts":{"test":"NODE_OPTIONS=--experimental-vm-modules jest","build":"tsup","test:live":"NODE_OPTIONS=--experimental-vm-modules jest --config jest.live.config.js","typecheck":"tsc --noEmit","test:watch":"NODE_OPTIONS=--experimental-vm-modules jest --watch","publish:public":"npm publish --access public"},"_npmUser":{"name":"ambulando","email":"massi@ambulando.net"},"_npmVersion":"11.16.0","description":"TypeScript client for the YellowCard API","directories":{},"_nodeVersion":"26.3.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^30.4.2","tsup":"^8.0.0","ts-jest":"^29.4.11","crypto-js":"^4.2.0","typescript":"^5.0.0","@types/jest":"^30.0.0","@types/node":"^20.0.0","@types/crypto-js":"^4.2.2"},"_npmOperationalInternal":{"tmp":"tmp/yellowcard-sdk_1.3.1_1786615547934_0.49230980112769673","host":"s3://npm-registry-packages-npm-production"}},"1.3.2":{"name":"@ambulando/yellowcard-sdk","version":"1.3.2","_id":"@ambulando/yellowcard-sdk@1.3.2","maintainers":[{"name":"ambulando","email":"massi@ambulando.net"}],"dist":{"shasum":"f64c8eaec57be6210b4d85dbd439e16d2b64ef43","tarball":"https://registry.npmjs.org/@ambulando/yellowcard-sdk/-/yellowcard-sdk-1.3.2.tgz","fileCount":9,"integrity":"sha512-5PLieMOyjh0lAueOkfcrg9bOyvYdSef3wgHyYnJdUdr0ykgz4yMgaV0PENETR1qILbskZ02A9LcgjT+sCA0p2g==","signatures":[{"sig":"MEYCIQDu95UI+GiFQu0Qn8t/WmVdIVpY2oghvfGCByJ+fnUr7gIhAJipmwChRtfyKOqo0VWNUrbvQfOCrjy88L6r2pqxwRu7","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1280222},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"345b61f9b4c537049de9fd8d00e87ff84b5aded1","scripts":{"test":"NODE_OPTIONS=--experimental-vm-modules jest","build":"tsup","test:live":"NODE_OPTIONS=--experimental-vm-modules jest --config jest.live.config.js","typecheck":"tsc --noEmit","test:watch":"NODE_OPTIONS=--experimental-vm-modules jest --watch","publish:public":"npm publish --access public"},"_npmUser":{"name":"ambulando","email":"massi@ambulando.net"},"_npmVersion":"11.16.0","description":"TypeScript client for the YellowCard API","directories":{},"_nodeVersion":"26.3.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^30.4.2","tsup":"^8.0.0","ts-jest":"^29.4.11","crypto-js":"^4.2.0","typescript":"^5.0.0","@types/jest":"^30.0.0","@types/node":"^20.0.0","@types/crypto-js":"^4.2.2"},"_npmOperationalInternal":{"tmp":"tmp/yellowcard-sdk_1.3.2_1786618756181_0.7656543657463009","host":"s3://npm-registry-packages-npm-production"}},"1.3.3":{"name":"@ambulando/yellowcard-sdk","version":"1.3.3","description":"TypeScript client for the YellowCard API","type":"module","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"build":"tsup","test":"NODE_OPTIONS=--experimental-vm-modules jest","test:watch":"NODE_OPTIONS=--experimental-vm-modules jest --watch","test:live":"NODE_OPTIONS=--experimental-vm-modules jest --config jest.live.config.js","typecheck":"tsc --noEmit","publish:public":"npm publish --access public"},"engines":{"node":">=18.0.0"},"devDependencies":{"@types/crypto-js":"^4.2.2","@types/jest":"^30.0.0","@types/node":"^20.0.0","crypto-js":"^4.2.0","jest":"^30.4.2","ts-jest":"^29.4.11","tsup":"^8.0.0","typescript":"^5.0.0"},"gitHead":"c2c8df2454a3a68d3cd7e977337be99a7c08c078","_id":"@ambulando/yellowcard-sdk@1.3.3","_nodeVersion":"26.3.0","_npmVersion":"11.16.0","dist":{"integrity":"sha512-fl3lIunmR7OIHRvPLWH4DDmmeRqU4ksSmWoWFmR5J2XDEDYMPuwQpC5o97nTomMEFb68VvWofwlyLwjwmSlzTw==","shasum":"2116fa17315946947b841d3e0d2d31ac9219232c","tarball":"https://registry.npmjs.org/@ambulando/yellowcard-sdk/-/yellowcard-sdk-1.3.3.tgz","fileCount":9,"unpackedSize":1280232,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDNmtxj7o5ccCYE3GvBCT0xU6bx6FozNeC/Sfip+RxdbAIgb47VNDCqW1AV2xLqdqUEWrRkFyd8FLLUoVK1zxHG4rc="}]},"_npmUser":{"name":"ambulando","email":"massi@ambulando.net"},"directories":{},"maintainers":[{"name":"ambulando","email":"massi@ambulando.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/yellowcard-sdk_1.3.3_1786639084302_0.3558423489422382"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-11T09:02:28.263Z","modified":"2026-08-13T16:38:04.654Z","1.0.0-beta.4":"2026-06-11T09:02:28.521Z","1.0.0":"2026-06-11T09:15:41.231Z","1.1.0":"2026-06-11T09:56:10.806Z","1.2.0":"2026-07-22T14:28:42.860Z","1.3.0":"2026-07-30T19:27:45.600Z","1.3.1":"2026-08-13T10:05:48.095Z","1.3.2":"2026-08-13T10:59:16.339Z","1.3.3":"2026-08-13T16:38:04.484Z"},"description":"TypeScript client for the YellowCard API","maintainers":[{"name":"ambulando","email":"massi@ambulando.net"}],"readme":"# @ambulando/yellowcard-sdk\n\nTypeScript SDK for the [YellowCard API](https://docs.yellowcard.engineering/) — a crypto exchange and payment platform serving African markets.\n\n## Requirements\n\n- Node.js 18+\n\n## Installation\n\n```bash\nnpm install @ambulando/yellowcard-sdk\n```\n\n## Quick start\n\n```ts\nimport { YellowCard } from '@ambulando/yellowcard-sdk';\n\nconst client = new YellowCard('your-api-key', 'your-secret-key');\n```\n\nUse the sandbox environment for development:\n\n```ts\nconst client = new YellowCard('your-api-key', 'your-secret-key', { sandbox: true });\n```\n\n## Services\n\n### Rates\n\n```ts\n// List rates, optionally filtered by currency\nconst rates = await client.rates.list('USD');\n```\n\n### Networks & Channels\n\n```ts\n// List supported networks (optionally filter by country code)\nconst networks = await client.networks.list();\nconst ngNetworks = await client.networks.list('NG');\n\n// List payment channels (optionally filter by country code)\nconst channels = await client.networks.channels();\nconst ghChannels = await client.networks.channels('GH');\n```\n\n### Payments (receive)\n\n```ts\n// Create a receive payment\nconst payment = await client.payments.create({\n  sequenceId: 'order-12345',\n  amount: 100,\n  currency: 'NGN',\n  channelId: 'your-channel-id',\n  recipient: {\n    name: 'Jane Doe',\n    phone: '+233241234567',\n    country: 'GH',\n  },\n  reason: 'salary',\n});\n\n// Retrieve a payment\nconst payment = await client.payments.get('payment-id');\nconst payment = await client.payments.getBySequenceId('order-12345');\n\n// List payments with optional filters\nconst result = await client.payments.getAll({\n  startDate: '2024-01-01',\n  endDate: '2024-12-31',\n  perPage: 20,\n  orderBy: 'desc',\n});\n\n// Lifecycle actions\nawait client.payments.accept('payment-id');\nawait client.payments.deny('payment-id');\nawait client.payments.cancel('payment-id');\nawait client.payments.refund('payment-id');\n```\n\n### Accounts\n\n```ts\n// List all business accounts and balances\nconst accounts = await client.accounts.list();\n```\n\n### Vaults (custody)\n\nThe `vaults` service manages custody vaults and deposit addresses:\n\n```ts\n// Create a vault and list them\nconst vault = await client.vaults.create('Main Treasury Vault');\nconst all = await client.vaults.getAll();\n\n// Fetch a single vault, including its per-asset balances\nconst single = await client.vaults.get(vault.id!);\n\n// Supported assets and their networks (e.g. USDC on ERC20, SOL, XLM…)\nconst assets = await client.vaults.getAssetConfig();\n\n// Generate a deposit address for a currency/network pair\nconst address = await client.vaults.createAddress({ token: 'USDC_SOL', vaultId: vault.id! });\n```\n\n### Webhooks\n\n```ts\nimport { HttpClient } from '@ambulando/yellowcard-sdk/client';\nimport { PaymentsService as WebhookService } from '@ambulando/yellowcard-sdk/services/webhook';\n\nconst http = new HttpClient('your-api-key', 'your-secret-key');\nconst webhooks = new WebhookService(http);\n\nawait webhooks.create({ url: 'https://example.com/hook', active: true });\nawait webhooks.update({ id: 'wh-1', active: false });\nawait webhooks.remove('wh-1');\nconst list = await webhooks.list();\n```\n\n## Error handling\n\nAll API errors throw an `APIError` with `statusCode`, `code`, and `message` fields:\n\n```ts\nimport { YellowCard, APIError, isNotFound, isUnauthorized } from '@ambulando/yellowcard-sdk';\n\ntry {\n  const payment = await client.payments.get('unknown-id');\n} catch (err) {\n  if (isNotFound(err)) {\n    console.error('Payment not found');\n  } else if (isUnauthorized(err)) {\n    console.error('Check your API credentials');\n  } else if (err instanceof APIError) {\n    console.error(`API error ${err.statusCode} (${err.code}): ${err.message}`);\n  }\n}\n```\n\n## Authentication\n\nEvery request is signed with HMAC-SHA256. The SDK handles this automatically — no configuration required beyond passing your API key and secret to the constructor.\n\nHeaders sent on every request:\n\n| Header | Description |\n|--------|-------------|\n| `Authorization` | `YcHmacV1 {apiKey}:{signature}` |\n| `X-YC-Timestamp` | ISO 8601 timestamp of the request |\n\nThe signature covers `timestamp + path + method + SHA256(body)`.\n\n## Configuration\n\n`ClientOptions` (third argument to `YellowCard`):\n\n| Option | Type | Description |\n|--------|------|-------------|\n| `sandbox` | `boolean` | Point to `https://sandbox.api.yellowcard.io` |\n| `baseURL` | `string` | Override the base URL entirely |\n| `fetch` | `typeof fetch` | Custom fetch implementation (useful for testing or proxying) |\n\n## Development\n\n```bash\nnpm test\nnpm run test:watch\nnpm run build\nnpm run typecheck\n```\n\n## Publishing\n\nBuild and verify the package contents:\n```bash\nnpm run build\nnpm pack --dry-run\n```\n\nBump the version and publish:\n```bash\nnpm version patch\nnpm publish --access public\n```\n\n> `--access public` is required for scoped packages (`@ambulando/...`) on first publish.\n\nFor a pre-release: `npm version 1.0.0-beta.1 && npm publish --tag beta`\n","readmeFilename":"README.md"}