Payment Links
Payment Links allow institution admins and committee members to generate direct, shareable checkout links bound to specific campaigns.
PayMongo Payment Links Integration: Payment links interact directly with PayMongo's /v1/payment-links API. Every payment link MUST be bound to an institution and a campaign (campaign_id required). When paid, PayMongo fires the link.payment.paid webhook, which atomically creates a completed Donation record, increments campaign.raised_amount, and updates link usage metrics.
Donors never call our API to pay. The url/checkout_url returned on creation is PayMongo's own hosted checkout page — donors open that link directly and pay there. There is no mobile/app integration for the payment step, and none is needed. The /payment-links API surface documented below is institution-admin tooling for generating and managing links (create, list, archive); it is not a donor-facing surface.
Create Payment Link
Creates a new PayMongo payment link bound to a campaign.
Authentication: Required (institution_admin, system_admin, committee_member)
Request Body
- Name
campaign_id- Type
- integer
- Description
ID of the campaign receiving donations
- Name
internal_name- Type
- string
- Description
Internal identifier name for reporting
- Name
amount- Type
- number
- Description
Fixed amount in PHP (
decimal(12,2))
- Name
description- Type
- string
- Description
Public description displayed on PayMongo checkout page
- Name
remarks- Type
- string
- Description
Internal notes or reference tags
Request
{
"campaign_id": 5,
"internal_name": "Class of 2010 Alumni Gala Link",
"amount": 1000.00,
"description": "Donation for Engineering Building Fund"
}
Response
{
"status": "success",
"message": "Payment link created successfully",
"data": {
"id": 12,
"gateway_link_id": "link_abc123",
"institution_id": 3,
"campaign_id": 5,
"internal_name": "Class of 2010 Alumni Gala Link",
"amount": "1000.00",
"currency": "PHP",
"url": "https://pm.link/link_abc123",
"status": "active",
"completed_count": 0
}
}
List Payment Links
Lists payment links for the user's institution.
Authentication: Required
Request
curl https://batchmates-v2.revlv.com/api/v1/payment-links \
-H "Authorization: Bearer {token}"
Archive Payment Link
Archives a payment link both locally and on PayMongo.
Authentication: Required
Request
curl -X PATCH https://batchmates-v2.revlv.com/api/v1/payment-links/12/archive \
-H "Authorization: Bearer {token}"