Skip to main content
Get a 200 OK from the Merchant API v1 using the official TypeScript SDK.

Prerequisites

  • Node.js 18+
  • A Morapay merchant account with TEST API keys (pk_test_* / sk_test_*)
  • Keys created under Dashboard → Developers → API keys
The SDK is server-side only. Never embed sk_* in browsers, mobile apps, or checkout bundles.
1

Install the SDK

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

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:
See Authentication for signing details and Error handling for the full error envelope.

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.