> ## Documentation Index
> Fetch the complete documentation index at: https://docs.avraapi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Gateway-wise Functions

> Choose a gateway by its real checkout, completion, and cross-SDK capabilities.

Every enabled gateway begins with the same server-side UPG flow: discover availability, create a payment session with `createOrder()`, and make the final decision with `completePayment()`. This section covers only the extra behavior that belongs to a particular gateway.

<Note>
  This is AvraAPI platform documentation, not PHP-only documentation. Each gateway page has PHP SDK, Laravel SDK, and Node.js SDK tabs. Laravel SDK 1.2.0 exposes the released PHP payment service through `AvraAPI::payment()`. Node.js SDK 1.2.0 exposes the matching server-only typed lifecycle through `client.payment()`, including the verified gateway-specific helpers shown on each page.
</Note>

## Capability matrix

| Gateway | Checkout modes | Gateway-specific SDK support | Payment Elements behavior |
| - | - | - | - |
| [PayHere](/universal-payment-gateway/gateway-wise-functions/payhere) | Redirect, overlay | PHP/Laravel/Node.js: retrieval, refunds, recurring, subscriptions, preapprovals, authorizations, token charges, captures. | Standard redirect or PayHere overlay. |
| [MarxPay](/universal-payment-gateway/gateway-wise-functions/marxpay) | Redirect | PHP/Laravel/Node.js: return verification, initiation, order-summary retrieval. | Separate method cards for configured tender variants. |
| [OnePay](/universal-payment-gateway/gateway-wise-functions/onepay) | Redirect, official SDK overlay | PHP/Laravel/Node.js: transaction-status lookup and callback/return payload wrappers. | Redirect or official OnePay overlay with safe fallback. |
| [WebXPay](/universal-payment-gateway/gateway-wise-functions/webxpay) | Redirect | PHP/Laravel/Node.js: Merchant-API status lookup and return wrapper. | Standard redirect hand-off only. |
| [KOKO](/universal-payment-gateway/gateway-wise-functions/koko) | Redirect | PHP/Laravel/Node.js: signed order-view lookup plus callback/return wrappers. | Standard redirect hand-off only. |
| [PayPlus](/universal-payment-gateway/gateway-wise-functions/payplus) | Redirect | PHP/Laravel/Node.js: status lookup and signed callback wrapper. | Standard redirect hand-off only. |
| [Stripe](/universal-payment-gateway/gateway-wise-functions/stripe) | Redirect | PHP/Laravel/Node.js: Stripe webhook and return payload wrappers. | Standard redirect hand-off only. |
| [DirectPay](/universal-payment-gateway/gateway-wise-functions/directpay) | Overlay, embedded | PHP/Laravel/Node.js: signed callback wrapper. | DirectPay overlay or embedded container. |

## Rules shared by every page

* Call gateway helpers only from your backend. Project credentials, Vault secrets, and `completionContext` never belong in browser code.
* Availability determines what a project can actually use. A card rendered in Payment Elements is not proof that the gateway, environment, tender, or UPG slot is valid at checkout time.
* Preserve the exact provider callback material where a gateway requires it. Do not rebuild signed raw bodies from parsed JSON or browser data.
* A browser return and an Elements event are only completion triggers. The final backend `completePayment()` result decides `succeeded`, `pending`, `failed`, `cancelled`, or review handling.
* Use the explicit idempotency key and confirmation flags required by PayHere refund, capture, charge, subscription retry, and cancellation calls.

## Choose the right guide

Start with the gateway selected by [availability](/universal-payment-gateway/advanced-setup/payment-initiation). If you only need a standard checkout, use [Quick Setup](/universal-payment-gateway/quick-setup) and the common completion guide. Open a provider page only when you need its special tender, callback, lookup, or advanced-payment behavior.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.