API Reference

Customer portal API

Generate signed MakePay customer portal URLs for stored customers.

Create a MakePay customer portal link from a stored MakePay customer profile. Generate the link only when the customer or merchant clicks into billing, then redirect or open the returned URL.

POST /api/partner/v1/makepay/customers/{customerId}/portal

customerId accepts the stored customer UUID or customer UID. The request body is empty.

curl
curl -X POST "https://www.makecrypto.io/api/partner/v1/makepay/customers/CUSTOMER_ID/portal" \
  -H "x-makecrypto-key-id: MAKEPAY_API_KEY_ID" \
  -H "x-makecrypto-key-secret: MAKEPAY_API_SECRET" \
  -H "Accept: application/json"

Authentication

Server integrations authenticate with a MakePay API key. Browser sessions can call the company-scoped dashboard route when the signed-in user has settings.manage on the selected team. API-key requests do not pass a company ID in the URL because the key already belongs to one company.

HeaderValueNotes
x-makecrypto-key-idMakePay API key IDStarts with mk_makepay_ for MakePay payment APIs.
x-makecrypto-key-secretOne-time API secretShown only when the key is created. Store it in your server-side secret manager.

Response

The route returns the customer object plus a signed urls.customerPortal link.

json
{
  "ok": true,
  "companyId": "acct_123",
  "customer": {
    "id": "b834dd77-69b8-41a9-a4b6-95bc9dd14c2d",
    "uid": "cus_01hzy4k6p4w9y2x7e2z7n8a2xm",
    "email": "buyer@example.com",
    "name": "Ada Lovelace",
    "clientId": "client_1042",
    "metadata": {
      "source": "api"
    },
    "createdAt": "2026-04-20T10:00:00.000Z",
    "updatedAt": "2026-04-20T10:00:00.000Z",
    "urls": {
      "customerPortal": "https://makepay.io/billing?company=acct_123&customer=cus_01hzy4k6p4w9y2x7e2z7n8a2xm&expires=1776765600&signature=8d1f..."
    }
  },
  "expiresAt": "2026-04-21T10:00:00.000Z"
}

Signed URL parameters

The returned portal URL has this shape:

https://{makepay-or-verified-merchant-domain}/billing?company={companyId}&customer={customerUid}&expires={unixSeconds}&signature={hexHmac}
ParameterNotes
companyMakeCrypto company account ID that owns the customer.
customerMakePay customer UID scoped to that company.
expiresUnix timestamp in seconds. Links are valid for 24 hours.
signatureHMAC signature over the version, company, customer, and expiry values.

MakePay verifies the signature and expiry before loading any portal data. Do not store portal URLs permanently. Regenerate a fresh link on each button click.

Portal scope

The portal shows only data that matches the signed company and customer:

  • Customer profile summary and editable display name.
  • Payment history matched by customer email or client ID.
  • Active or unpaid payment links with hosted MakePay URLs.
  • Subscriptions matched by customer email or metadata client ID.
  • Pause, reactivate, and cancel actions for supported subscription states.

Email, client ID, PDFs, payment methods, license keys, plan switching, and cancelled-subscription resume flows are not mutable in the first portal version.

Need partner setup help?

Open the payment link details view in MakeCrypto to copy the generated snippets for a real payment UID, or return to the portal to manage merchant settings.

Open portal