API Reference
Accept payments from any e-wallet or bank that supports QRPh and InstaPay, including GCash and Maya, through a single unified API.
Getting Started
Quick Start
sk_test_ keys for development./v1/orders with the amount. We return a unique pay_amount for your customer to send.payment.confirmed event the moment payment is detected.Authentication
All API requests require an API key sent in the X-API-Key header.
| Key Type | Prefix | Usage |
|---|---|---|
| Publishable | pk_live_ | Frontend: read-only (get order, QR) |
| Secret | sk_live_ | Backend: full access |
| Test publishable | pk_test_ | Frontend, test mode |
| Test secret | sk_test_ | Backend, test mode (no real payments) |
Keep sk_live_ keys on your server only. Never expose them in client-side code or public repos.
Test Mode
Use sk_test_ and pk_test_ keys to build and test your integration without touching real money. Test orders are completely isolated from live data.
POST /v1/orders/{id}/simulate-payment with your test secret key. Webhooks fire exactly as in production.
Switch to live keys when you're ready to go live. No other code changes needed.
Payment Links No-Code
No API, no code. Create a shareable payment link from your dashboard and send it to your customer via chat or SMS. They open the link, scan the QR, and pay.
Create a link
Enter amount and description in the dashboard.
Share it
Copy the link and send via Messenger, Viber, or SMS.
Get paid
Customer scans the QR and pays. You see it in your dashboard.
Create a payment order. Returns a pay_amount — instruct your customer to send this exact amount via GCash or InstaPay.
Request Body
| Parameter | Type | Description |
|---|---|---|
| order_idstring, required | Your unique order identifier | |
| amountnumber, required | Amount in PHP (e.g. 500.00) | |
| descriptionstring, optional | What the customer is paying for | |
| metadataobject, optional | Custom key-value data attached to the order |
Response
| Field | Description |
|---|---|
| pay_amount | Exact amount (with centavo offset) the customer must send |
| qr_url | URL to the QR image — display this to your customer |
| status | pending | paid | expired | cancelled |
Get the status and details of an order. Use this to poll for payment confirmation, or to verify a webhook notification before fulfilling.
| Field | Description |
|---|---|
| status | pending | paid | expired | cancelled |
| pay_amount | Exact amount the customer was asked to send |
| fee | Platform fee deducted (populated after payment) |
| net | Amount credited to your balance after fee |
| paid_at | ISO 8601 timestamp of payment confirmation |
List your orders with optional filters and pagination.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| statusstring, optional | Filter: pending, paid, expired, cancelled | |
| limitinteger, optional | 1–100 (default 50) | |
| offsetinteger, optional | Pagination offset |
Cancel a pending order. Only works on orders with pending status. Returns the updated order object.
Create a hosted checkout page. Redirect your customer to the returned checkout_url. ArgonarPay displays the QR code and polls for payment — your customer sees a clean payment page.
Request Body
| Parameter | Type | Description |
|---|---|---|
| order_idstring, required | Your order ID | |
| amountnumber, required | Amount in PHP | |
| descriptionstring, optional | Shown on the checkout page | |
| success_urlstring, required | Redirect here after payment | |
| cancel_urlstring, required | Redirect here on cancel or expiry |
Simulate a payment on a test order. Only works with sk_test_ keys. Triggers your webhook exactly as a real payment would — useful for testing your fulfillment logic end-to-end.
Get your current balance and lifetime earnings summary.
| Field | Description |
|---|---|
| balance | Available balance awaiting settlement |
| total_earned | Lifetime gross earnings |
| total_fees | Lifetime platform fees deducted |
| total_settled | Lifetime amount paid out to you |
| fee_percent | Your current fee rate (e.g. 1.5) |
Settlements
Settlements are payouts of your balance sent to your registered bank account or e-wallet. ArgonarPay sends your earnings automatically within 1 business day — no action needed on your part.
List your settlement history.
Settlement Statuses
| Status | Meaning |
|---|---|
| pending | Being processed — will be sent within 1 business day. |
| completed | Funds have been sent to your payout account. |
| failed | Could not be sent. Funds are returned to your balance. |
Health check endpoint. Returns API version and, if authenticated, your merchant info and order counts. No authentication required — useful for uptime monitoring.
Webhook Events
When a payment is confirmed, ArgonarPay POSTs a payment.confirmed event to your webhook URL. Set your URL in Dashboard → Settings.
Event Payload
| Field | Description |
|---|---|
| id | Unique event ID (evt_...) |
| type | Always payment.confirmed |
| created | Unix timestamp |
| data.order_id | Your original order ID |
| data.pay_amount | Exact amount the customer sent |
| data.sender_name | Partial sender name from GCash |
| data.paid_at | ISO 8601 payment timestamp (PHT) |
Your endpoint must return a 2xx status within 10 seconds. Failed deliveries are retried up to 3 times (5 min then 30 min delay).
Verify Payment
When your webhook endpoint receives a notification, confirm the order is actually paid before fulfilling. Use the order ID from the webhook payload to call the API.
GET /v1/orders/{order_id} and check that status === "paid" before taking any fulfillment action.
Error Codes
| HTTP Status | Meaning |
|---|---|
| 400 | Bad request — missing or invalid parameters |
| 401 | Unauthorized — invalid or missing API key |
| 403 | Forbidden — key doesn't have permission for this endpoint |
| 404 | Not found — order or resource doesn't exist |
| 409 | Conflict — order ID already exists |
| 500 | Internal error — contact support |
| 502 | Bank API unreachable — temporary, retry after a moment |
All error responses include: {"error": "message describing what went wrong"}. Log the full response body for debugging.
PHP SDK
Drop-in PHP class. No Composer, no dependencies — just include the file.
| Method | Description |
|---|---|
| new ArgonarPay($secretKey) | Initialize the client |
| createOrder($id, $amount, $desc) | Create a payment order |
| getOrder($id) | Get order status and details |
| createCheckout($id, $amount, $desc, $ok, $cancel) | Create a hosted checkout session |
| getBalance() | Get merchant balance |
| listOrders($params) | List orders with filters |