@api-emulator/truemed
v0.2.2
Published
Truemed provides HSA/FSA payment APIs for checkout sessions, payment tokens, qualification sessions, product catalog eligibility, captures, voids, and refunds.
Downloads
76
Readme
@api-emulator/truemed
Truemed provides HSA/FSA payment APIs for checkout sessions, payment tokens, qualification sessions, product catalog eligibility, captures, voids, and refunds.
Use this emulator for local tests, CI, and offline agent runs. It keeps your tests separate from the production API.
Start the emulator
- Install the package.
npm install @api-emulator/truemed- From this registry, start the emulator.
npx -p api-emulator api --plugin ./providers/@truemed/api-emulator.mjs --service truemedThe emulator uses the local URL that api-emulator prints. Set your client base URL to this local URL.
Supported API
POST /payments/v1/create_payment_sessionGET /payments/v1/payment_session/:businessIdGET /payments/v1/payment_sessionsPOST /payments/v1/payment_session/:businessId/capturePOST /payments/v1/payment_session/:businessId/cancelPOST /payments/v1/payment_session/:businessId/voidPOST /payments/v1/refundPOST /api/v1/payment_tokens/createGET /api/v1/payment_tokens/:paymentTokenGET /api/v1/payment_tokensPOST /api/v1/payment_tokens/:paymentToken/updatePOST /api/v1/payment_tokens/:paymentToken/deleteGET /api/v1/payment_tokens/provision_request/:provisionTokenRequestIdGET /api/v1/qualification_session/:qualificationSessionIdGET /api/v1/qualification_sessionsPOST /api/v1/product_catalog/truemed_checkout_methodPOST /api/v1/product_catalog/items/createPOST /api/v1/product_catalog/items/updatePOST /api/v1/product_catalog/items/detailGET /inspect/contractGET /inspect/state
Coverage
- Level:
smoke-only - Meaning: A smoke test starts the emulator and checks its main behavior.
- Evidence: a direct smoke test exists, but a conformance manifest does not exist.
Credentials
Use a fixed bearer token or API key in each test. The emulator does not send these credentials to the provider.
Test data
Add repeatable test data to the provider configuration.
truemed:
# Add provider-specific seed state here.