| title |
Initialize repository |
| section |
api |
| sidebar |
true |
Create a Git repository for a payment request. Writes README and tags v1.
Guide: [How it works · Initialize]({{ '/guides/how-it-works/' | relative_url }})
| Field |
Type |
Description |
creator_user_id |
string |
Owner user id (must match auth) |
payment_request_id |
string |
Payment request id |
{
"repo_path": "/…/users/user-1/payment-requests/pr-100/repo",
"commit_sha": "a1b2c3d4…",
"version_tag": "v1"
}
- 400 — repository already exists
- 401 / 403 — auth / ownership
curl -sS -X POST "$BASE/repositories/init" \
-H "Authorization: Bearer $TOKEN" \
-H "X-User-Id: user-1" \
-H "Content-Type: application/json" \
-d '{"creator_user_id":"user-1","payment_request_id":"pr-100"}'