|
| 1 | +# MakePay OpenAPI and Postman |
| 2 | + |
| 3 | +Canonical OpenAPI and Postman artifacts for MakePay partner, hosted checkout, |
| 4 | +webhook, Simple Shop, subscription, POS, product, branding, and bookkeeping |
| 5 | +APIs. |
| 6 | + |
| 7 | +## Contents |
| 8 | + |
| 9 | +- `openapi/makepay.openapi.yaml` - OpenAPI 3.1 description for MakePay. |
| 10 | +- `postman/makepay.postman_collection.json` - Postman collection with common |
| 11 | + merchant, checkout, and bookkeeping workflows. |
| 12 | +- `postman/makepay.postman_environment.json` - Postman environment variables. |
| 13 | +- `docs/ROADMAP.md` - planning and ownership notes for this integration. |
| 14 | +- `docs/REPOSITORY_PROTECTION.md` - required GitHub repository settings. |
| 15 | + |
| 16 | +## Quick Start |
| 17 | + |
| 18 | +```bash |
| 19 | +npm install |
| 20 | +npm run validate |
| 21 | +``` |
| 22 | + |
| 23 | +Import the collection and environment into Postman, then set: |
| 24 | + |
| 25 | +- `makepayKeyId` |
| 26 | +- `makepayKeySecret` |
| 27 | +- `paymentLinkUid` after creating a test payment link |
| 28 | +- `sessionId` after quoting a public checkout session |
| 29 | + |
| 30 | +## Authentication |
| 31 | + |
| 32 | +Server-side partner API calls use API key headers: |
| 33 | + |
| 34 | +```http |
| 35 | +X-MakeCrypto-Key-Id: <key id> |
| 36 | +X-MakeCrypto-Key-Secret: <key secret> |
| 37 | +``` |
| 38 | + |
| 39 | +The API also accepts `X-MakePay-Key-Id` / `X-MakePay-Key-Secret` and |
| 40 | +`X-Api-Key` / `X-Api-Secret` aliases for compatible integrations. |
| 41 | + |
| 42 | +Never expose key secrets in browser code, mobile apps, public repositories, or |
| 43 | +client-side logs. |
| 44 | + |
| 45 | +## Webhooks |
| 46 | + |
| 47 | +MakePay sends signed webhook events with: |
| 48 | + |
| 49 | +```http |
| 50 | +X-MakePay-Signature: t=<unix timestamp>,v1=<hmac sha256 hex digest> |
| 51 | +``` |
| 52 | + |
| 53 | +Verify the signature against: |
| 54 | + |
| 55 | +```text |
| 56 | +<timestamp>.<raw request body> |
| 57 | +``` |
| 58 | + |
| 59 | +using the merchant webhook secret. Reject stale timestamps, compare signatures |
| 60 | +in constant time, and deduplicate deliveries by `deliveryId`. |
| 61 | + |
| 62 | +## Publishing |
| 63 | + |
| 64 | +This repository is intended to be published as `makecryptoio/makepay-openapi`. |
| 65 | +The `main` branch should require the `validate` GitHub Actions workflow before |
| 66 | +merge. |
| 67 | + |
| 68 | +Maintainer: Ethan Carter (`makepayio`). |
0 commit comments