Prerequisites
- Node.js 18+
- A Morapay merchant account with TEST API keys (
pk_test_*/sk_test_*) - Keys created under Dashboard → Developers → API keys
1
Install the SDK
- npm
- yarn
- pnpm
2
Initialize Morapay
Only API keys are required.
baseUrl and checkoutBaseUrl default to production hosts.3
Create a payment link
The SDK uses a callable resource pattern: list with
(), get with (id).4
Expected responses
- API
- SDK
Every response is JSON with a
success flag. Signed requests include Morapay-Key, Morapay-Timestamp, and Morapay-Signature headers.Success for POST /api/v1/merchant/links:Next steps
Native UI components
Render errors and checkout UI without boilerplate.
Webhooks
Receive real-time payment and payout events.
Payment links
Deep dive into links, products, and checkout sessions.
Error handling
Consultant-grade errors with
requestId and UI hints.API reference
REST endpoints for catalog, disbursement, and payout rails.

