Payment Links
A payment link is a reusable, shareable URL that opens a MagiaPay-hosted checkout page. Share it by email, SMS, or chat — customers pay without you writing any checkout code. Each payment link can be used unlimited times; every use creates a normal payment object (so webhooks, events, and refunds all work exactly as documented elsewhere).
Dashboard feature — no public API
Payment links are a dashboard feature, not a /v1 API resource. There is no POST /v1/payment-links endpoint — you create and manage links through the MagiaPay dashboard at /dashboard/payment-links. The hosted checkout page lives at /pay/<link-id> and is public and unauthenticated (possession of the link URL is the access token, following the same model as Stripe Payment Links).
Creating a payment link
- In the dashboard, go to Payment Links (sidebar, under Commerce). Make sure you are in the correct environment (test or live) using the environment toggle.
- Click New link.
- Enter a description (required, shown to the customer on the checkout page).
- Choose an amount mode:
- Fixed amount — you set the amount (₱20–₱100,000); the customer cannot change it.
- Customer enters amount — the customer types the amount on checkout (must be ₱20–₱100,000).
- Click Create link. The link appears in your list immediately.
Click any link in the list to open its detail page. From there you can copy the shareable URL, open a preview, and deactivate or reactivate the link.
Fixed vs open amount
| Mode | Amount on checkout | Use case |
|---|---|---|
| Fixed | Pre-filled; customer cannot edit | Product deposits, fixed-price services, event tickets |
| Open (customer enters) | Customer types their own amount (₱20 min, ₱100,000 max) | Donations, consultations, variable-fee collection |
The hosted pay page
When a customer opens https://magiapay.innoserver.cloud/pay/<link-id>they see a branded checkout card with:
- The merchant's business name
- The link description
- The fixed amount (pre-filled), or an input field if the link is open-amount
- Optional merchant logo / image, if the link was created with one
When the customer submits, the page calls POST /api/pay/<link-id>/checkoutinternally. This creates a normal payment object stamped with the payment_link_id, then hands the customer off to the payment provider (QR, redirect, or card flow). You do not need to do anything — the entire flow is handled by the hosted page.
If the link is inactive or past its expiry date the page shows a "no longer active" screen and the checkout call returns HTTP 410.
Status and expiry
| Property | Values | How it's set |
|---|---|---|
status | active / inactive | active on creation. Toggle with Deactivate / Reactivate on the link detail page. |
expires_at | Unix timestamp or null | When present, checkout returns HTTP 410 after this time even if status is active. Links show Never when no expiry is set. |
An inactive or expired link cannot accept new payments. Existing payments that were already created from the link are unaffected.
Each checkout creates a normal payment
Every time a customer pays through a payment link, MagiaPay creates a standard payment object. That means:
- Webhooks fire —
payment.succeeded,payment.failed,payment.expired, etc. Register your endpoint from the dashboard just as you would for API-created payments. - Events are logged — visible in Events and pollable via
GET /v1/eventsfor reconciliation. - Refunds work — refund any succeeded payment from a link the same way you would any other payment (see Refunds).
- Ledger is credited — your balance updates exactly as it does for API-created payments.
The payment object carries metadata.payment_link_id so you can correlate webhook events back to the originating link.
Test vs live
Payment links belong to the environment you selected when creating them (test or live). A test link creates test payments; a live link creates live payments. Use the dashboard environment toggle to switch views. For testing guidance see Testing & Sandbox → Payment links.