When to use PayPlus
Use PayPlus for a hosted redirect checkout in LKR or USD. The sharedcreateOrder() function creates the provider session from your backend and returns a public redirect URL. A signed PayPlus notification is the payment evidence; your backend preserves its exact body and authorization header before requesting shared completion.
The shared UPG lifecycle—availability,
createOrder(), and completePayment()—is documented in Quick Setup. This page covers only the released PayPlus standard hosted checkout.SDK Functions
- PHP SDK
- Laravel SDK
- Node.js SDK
Retrieve a PayPlus payment status
Usestatus() from your backend when you need a read-only observation for a pending order or operational diagnosis. It queries the configured PayPlus status endpoint for the stored order ID and maps only its safe summary. It is not browser-side payment proof.
- PHP SDK
- Laravel SDK
- Node.js SDK
PayPlusStatus:$status->orderId, $status->providerStatus, $status->timestamp, and $status->requestId. timestamp is the provider value when supplied; the current status contract represents an absent value as an empty string. This lookup intentionally omits raw provider data, session tokens, payment rails, and customer/card details.Preserve a signed PayPlus callback
PayPlus signs the exact callback body. Read the original body and Authorization header on your backend before any JSON, Base64, or string transformation. The wrapper does not parse or verify the callback itself; it preserves the evidence for shared completion.- PHP SDK
- Laravel SDK
- Node.js SDK
PayPlusCallbackPayload::toArray():Complete a verified PayPlus callback
Pass the stored completion context and the payload wrapper to the shared completion API. By default, a verified successful callback is also reconciled through the PayPlus status endpoint. The status observation can confirm, conflict with, or be temporarily unavailable relative to the signed callback.- PHP SDK
- Laravel SDK
- Node.js SDK
PaymentCompletionResult:$result->paymentStatus, $result->verified, and $result->reconciliation to decide your order state. A status lookup outage makes a formerly successful callback unknown with retry_recommended: true; do not fulfil until a later backend retry returns a verified succeeded result.Payment Elements
PayPlus presents the payment rails enabled for the merchant account on its hosted page. Payment Elements should render one redirect card and must not advertise individual cards, wallets, QR rails, or other provider features that your PayPlus profile may not enable.Gateway-specific options
The released standard checkout exposes only these backend-controlledproviderOptions during order creation:
is_nic_editable— boolean; defaults totrue.plugin_version— optional identifier, defaulting to1.0.0.source— optional source label, defaulting toAVRAAPI.- Customer information and configured callback/return URLs are validated by the backend; credentials, merchant secret, hosted-session token, and buyer-controlled status values are never options.
Completion, webhooks, and safety
The notification callback is authoritative evidence only after HMAC verification, Base64 decoding, and binding its order ID, amount, and currency to the stored completion context. A browser return merely returns the customer to your application; it does not complete payment. Keep the defaultreconcileProvider: true for successful callbacks. A final result can be succeeded, pending, failed, cancelled, or unknown; fulfil only a verified succeeded result. Handle a non-final result with bounded, idempotent backend retry rather than showing a provider status as success.