Merchant docs only
DGEN Payments API Reference
Store-scoped API docs for checkout orders, products, payment links, wallets, GCash Android automation, public checkout helpers, and signed outbound webhooks.
Endpoint groups
Jump to the part you need.
These docs intentionally exclude internal platform, cron, global, and provider-webhook endpoints. This page only lists endpoints a merchant integration or customer checkout can use.
Authentication API KEY
All /api/v1/* endpoints require Authorization: Bearer pdgen_live_.... Use Idempotency-Key on create endpoints when retrying from your backend.
curl -H 'Authorization: Bearer pdgen_live_xxx' https://payments.decentralizedgen.com/api/v1/store
Store API v1 - store API KEY
/api/v1/store Confirm auth and read store status, provider toggles, payout currency, and owner profile. { "id":"store_...", "status":"approved",
"providers": { "stripe_enabled":true, "gcash_enabled":true },
"owner": { "id":"usr_...", "email":"owner@example.com" } } Store API v1 - orders API KEY
/api/v1/orders Create a one-shot checkout order. Pass a product id or a custom amount. Supports Idempotency-Key, metadata, return/cancel URLs, and custom expiry. { "currency":"USD", "amount_minor":1999,
"customer": { "email":"a@b.com", "name":"Alice", "phone":"+639..." },
"metadata": { "reference":"invoice_123" } } /api/v1/orders List orders. Filters: status, customer_email, product_id, payment_link_id, provider, from, to, limit. { "data":[{ "id":"ord_...", "status":"paid", "provider":"gcash" }], "limit":50 } /api/v1/orders/:id Read one order including customer, product, link, fees, metadata, GCash, UPI, Stripe, and refunds. { "id":"ord_...", "provider":"gcash", "gcash": { "paid_minor":11248 } } /api/v1/orders/:id/cancel Cancel a pending order. { "ok": true } /api/v1/orders/:id/refund Refund all or part of a paid Stripe order. GCash is not refunded through this API because money goes to your own GCash account. { "amount_minor":500, "reason":"duplicate" } Store API v1 - products API KEY
/api/v1/products List products. Use ?archived=1 to include archived products. { "data":[{ "id":"prd_...", "name":"VIP", "prices":[...] }] } /api/v1/products Create a product and auto-generate its permanent payment link. { "name":"VIP", "base_currency":"USD", "base_amount_minor":1999 } /api/v1/products/:id Read one product. If its default link is missing, DGEN self-heals it. { "id":"prd_...", "payment_link": { "checkout_url":"https://..." } } /api/v1/products/:id Update name, description, and price table. { "name":"VIP v2" } /api/v1/products/:id/payment-link Get or create the product's default permanent payment link. { "id":"plk_...", "created":false, "checkout_url":"https://..." } Store API v1 - payment links API KEY
/api/v1/payment-links Create a product-bound or custom permanent link. Supports metadata and idempotency. { "currency":"USD", "amount_minor":4900, "description":"Consult" } /api/v1/payment-links List links. Filters: product_id, active, limit. { "data":[{ "id":"plk_...", "checkout_url":"https://..." }] } /api/v1/payment-links/:id Read one link. { "id":"plk_...", "active":true, "metadata":{} } /api/v1/payment-links/:id Update description, metadata, or active state. { "active": false } /api/v1/payment-links/:id Delete link. Product auto-links self-heal on next product read. { "ok": true } Store API v1 - user wallets API KEY
/api/v1/wallets Create a per-customer wallet. Requires at least one of email, phone, or Discord id. { "name":"Juan", "email":"juan@example.com", "phone":"+639..." } /api/v1/wallets List wallets for the store. { "data":[{ "id":"uwl_...", "gcash_balance_minor":0 }] } /api/v1/wallets/:id Read one wallet. { "id":"uwl_...", "topup_link_id":"plk_..." } /api/v1/wallets/:id/balance Read Stripe and GCash wallet balances plus top-up checkout URL. { "stripe": { "balance_minor":5000 }, "gcash": { "balance_minor":0 } } /api/v1/wallets/:id/ledger Newest-first wallet ledger entries. { "data":[{ "kind":"topup_gcash", "delta_minor":1999 }] } GCash Android app + notifications API KEY
The DGEN GCash Android app uses these endpoints after the merchant enters a Store API key and grants notification/background permissions.
/api/v1/gcash/heartbeat Device heartbeat. Upserts the device row by store and hardware id. { "hwid":"abc123", "phone_number":"+639...",
"device_model":"Pixel", "os_version":"Android",
"app_version":"1.0.0" } /api/v1/gcash/notifications Forward a receive notification. DGEN dedupes by dedupe_id, then matches exact amount or partial amount by phone. { "full_notification":"You received PHP 499.00...",
"sender":"GCash", "from_number":"0917...", "amount":499,
"reference_no":"0041073634750", "dedupe_id":"gcash-ref-0041073634750",
"hwid":"abc123", "device_phone":"+639..." } /api/v1/gcash/store-info Compatibility smoke test for the Android app. Redirects to /api/v1/store. 301 redirect
/api/v1/gcash/notifications Read recent inbound GCash notifications. Filter by match_type=exact|partial|unmatched. { "data":[{ "id":"gcn_...", "match_type":"exact" }] } /api/v1/gcash/notifications/:id Read one notification row. { "id":"gcn_...", "reference_no":"004107..." } Public checkout PUBLIC
/api/checkout/:token Hydrate hosted checkout page state. { "kind":"order", "status":"pending", "available_providers":{...} } /api/checkout/:token/quote?currency=EUR Currency quote for checkout currency selection. { "currency":"EUR", "amount_minor":1830, "fx_rate":0.929 } /api/checkout/:token/customer Submit customer details for a one-shot order or permanent link visit. { "email":"a@b.com", "name":"Alice", "phone":"+639..." } /api/checkout/:token/select-provider Choose stripe, crypto, gcash, or upi where available. { "provider":"gcash" } /api/checkout/:token/intent Create/reuse Stripe PaymentIntent. { "client_secret":"pi_..._secret_..." } /api/checkout/:token/status Poll paid/partial/failed status. { "status":"partial", "remaining_minor":5000 } /api/checkout/:token/gcash-phone Save customer GCash phone for SMS matching. { "phone":"+639..." } /api/checkout/:token/gcash-reconcile Checkout-side reconcile helper for GCash pending/partial orders. { "ok": true } /api/checkout/:token/upi-utr Submit UPI UTR/reference for checkout-side tracking. { "utr":"123456789012" } /api/checkout/:token/wallet-pay Pay from a customer wallet balance where available. { "wallet_id":"uwl_...", "balance":"gcash" } /api/checkout/:token/reset-customer Clear customer details and provider. { "ok": true } /api/checkout/:token/reset-provider Clear selected provider only. { "ok": true } /api/checkout/:token/fail Mark expired checkout as failed after countdown. { "ok": true, "status":"failed" } Payment-link URL params PUBLIC
Append these to any /pay/<token> URL returned by the Store API.
?email=alice@example.com&name=Alice&phone=%2B639... &reference=invoice_123 &metadata[paymenter_invoice_id]=123 &autosubmit=0
Outbound webhook payloads SIG
Configured merchant webhook URLs receive X-DGEN-Signature: t=<unix>,v1=<hmac>.
order.paid Stripe, GCash, UPI, or wallet order captured. Includes metadata and top-level reference. { "event":"order.paid", "data":{ "order_id":"ord_...", "reference":"invoice_123" } } order.refunded Refund total increased on a Stripe order. { "event":"order.refunded", "data":{ "order_id":"ord_...", "refunded_delta_minor":500 } } order.failed Checkout expired or failed. { "event":"order.failed", "data":{ "order_id":"ord_...", "reason":"expired" } } payout.sent A merchant payout request was marked sent. { "event":"payout.sent", "data":{ "payout_id":"pay_...", "amount_minor":50000 } }