MagiaPay· Quickstart

Quickstart

Accept your first test payment in five steps — under 5 minutes.

1
Create an account

Sign up at /signup. You get instant sandbox credentials on signup; live keys arrive once KYB + activation fee are complete.

2
Grab your sandbox keys

After signup, your publishable + secret test keys are shown once on the dashboard welcome card. Copy both — especially sk_test_…, which won't be shown again.

3
Create a payment (test mode)
curl -X POST https://magiapay.innoserver.cloud/v1/payments \
  -H "Authorization: Bearer sk_test_..." \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 500.00,
    "currency": "PHP",
    "method": "gcash_qr",
    "description": "Order #1042",
    "return_url": "https://yoursite.com/thanks"
  }'

Response includes checkout_url. Redirect your customer there — they see a branded MagiaPay checkout with a real GCash-compatible QR code.

4
Complete the sandbox checkout

In test mode, the checkout shows a faux QR code and a Dev controls toggle. Use the toggle to force the payment to succeed / fail / expire. Each drives a real webhook callback — same code path as production.

5
Listen for webhooks

Register an endpoint at POST /v1/webhooks/endpoints or from the dashboard. MagiaPay sends signed POSTs for payment.succeeded, payment.failed, payment.expired, and more.

Incoming webhook
POST /your-webhook
X-MagiaPay-Signature: t=1776840100,v1=a3f8d2b19c5f...
X-MagiaPay-Event: payment.succeeded
Content-Type: application/json

{
  "id": "evt_2e599b29fc3203f06a63cc16",
  "type": "payment.succeeded",
  "created": 1776840100,
  "data": { "object": { "id": "pay_...", "status": "succeeded", "amount": 500.00, ... } }
}

Verify every delivery — see the Webhooks guide.