Markuce
Developers

API-first.
No surprises.

REST API over HTTPS, JSON everywhere, predictable errors, HMAC-signed webhooks, and a TypeScript SDK with full autocomplete.

quickstart.ts
// 1. Install
$ npm install @markuce/sdk
import { Markuce } from '@markuce/sdk'
// 2. Create client
const mkc = new Markuce({ apiKey: process.env.MARKUCE_KEY })
// 3. Create checkout
const session = await mkc.checkout.create(({)
amount: 4900, // $49
currency: 'usd',
})
// 4. Redirect
redirect(session.checkout_url)

Base URL

https://api.markuce.com/v1

Authentication

Bearer token via Authorization header using your sk_live_* key

Response format

{ success, data, error, meta } — consistent across all endpoints

API endpoints

POST/v1/checkout/sessions

Create a hosted checkout session

Body

{ product_id, customer_email?, metadata? }

Returns

{ session_id, checkout_url, expires_in }
GET/v1/checkout/sessions/:id

Retrieve a session by ID

POST/v1/products

Create a product

Body

{ name, price_minor, currency, description?, recurring? }

Returns

{ id, payment_link_url }
GET/v1/transactions

List merchant transactions

POST/v1/webhooks

Configure webhook endpoint

Body

{ url, enabled_events[] }

Returns

{ id, webhook_secret }
Webhooks

Signed. Retried.
Reliable.

Every webhook is HMAC-SHA256 signed with your webhook_secret. Verify the Markuce-Signature header on every request. Failed deliveries are retried 5 times with exponential backoff (10s → 1m → 5m → 30m → 2h).

Signature header format
Markuce-Signature: t=1718000000,v1=abc123…
// Verify in Node.js
const payload = `${t}.${rawBody}`
const sig = hmac(secret, payload)
const valid = sig === header.v1

Available events

payment.completed

A payment was successfully confirmed (card or crypto)

payment.failed

A payment failed or was cancelled

checkout.expired

A checkout session expired without payment

subscription.created

A new subscription was created

subscription.updated

Subscription status changed (e.g. past_due)

subscription.ended

Subscription was cancelled or expired

payout.completed

A bank or crypto payout was processed

refund.issued

A refund was issued to the customer