Skip to content

Commit 27c8416

Browse files
author
Ethan Carter
committed
Initial MakePay OpenAPI workspace
0 parents  commit 27c8416

19 files changed

Lines changed: 6268 additions & 0 deletions

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
indent_style = space
8+
indent_size = 2
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @makepayio

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: npm
4+
directory: /
5+
schedule:
6+
interval: weekly
7+
open-pull-requests-limit: 5

.github/workflows/validate.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: validate
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
validate:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: actions/setup-node@v4
18+
with:
19+
node-version: 22
20+
cache: npm
21+
- run: npm ci
22+
- run: npm run validate

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
node_modules/
2+
.DS_Store
3+
.env
4+
.env.*
5+
!.env.example
6+
coverage/
7+
dist/

.redocly.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
extends:
2+
- recommended
3+
4+
rules:
5+
operation-4xx-response: off

CONTRIBUTING.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Contributing
2+
3+
Thanks for helping improve the MakePay API artifacts.
4+
5+
## Development
6+
7+
```bash
8+
npm install
9+
npm run validate
10+
```
11+
12+
## Pull Requests
13+
14+
- Keep OpenAPI operation IDs stable unless an endpoint is intentionally
15+
replaced.
16+
- Add or update a Postman request when adding a new endpoint group.
17+
- Use example values only. Never commit live merchant credentials, webhook
18+
secrets, wallet private keys, customer data, or production payload dumps.
19+
- Keep compatibility with generators that consume OpenAPI 3.1.
20+
21+
## Release Checklist
22+
23+
- `npm run validate` passes.
24+
- The Postman collection imports without JSON errors.
25+
- New endpoint descriptions include authentication, idempotency, and webhook
26+
behavior where relevant.
27+
- Branch protection and required validation checks are enabled for `main`.

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 MakeCrypto
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
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`).

SECURITY.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Security Policy
2+
3+
## Supported Artifacts
4+
5+
The current supported artifacts are:
6+
7+
- `openapi/makepay.openapi.yaml`
8+
- `postman/makepay.postman_collection.json`
9+
- `postman/makepay.postman_environment.json`
10+
11+
## Reporting Vulnerabilities
12+
13+
Email security reports to `info@makepay.io`.
14+
15+
Do not include live API key secrets, webhook secrets, wallet private keys, or
16+
customer data in an issue or pull request. Use redacted examples and include
17+
enough detail to reproduce the problem safely.

0 commit comments

Comments
 (0)