Sample Code

Step-by-step PHP snippets for key transaction flows

Calls from Merchant

MethodDescription
PurchaseInitiates the payment process by redirecting the customer to enter card details.
Purchase (No Card)Requests a card token without a cart.
In-App PurchaseStarts the in-app payment flow by requesting card details.
In-App StoreCardStores a customer’s card. Requires PCI SAQ-D compliance.
In-App StoreCard UpdateTriggered when a customer cancels the payment. Redirects to URL_Cancel.
RefundInitiates a refund for a previously completed payment.
Request MoneyRequests a direct transfer from a myPOS customer wallet.
Mandate ManagementRegister or cancel a mandate reference for recurring charges.
Get Payment StatusRetrieves the transaction status for a completed payment.
Pre-AuthorizationStarts a pre-auth process by asking the customer for card details.
In-App Pre-AuthorizationInitiates pre-auth without redirecting from the external app.
Pre-Auth StatusRetrieves the status of an existing pre-authorization.
Pre-Auth CompletionCompletes a pre-authorization.
Pre-Auth CancellationCancels a pre-authorization.
AuthorizationReserves funds using a stored card without capturing the amount.
Authorization ListLists all authorizations not yet captured or reversed.
Authorization CaptureCaptures an existing authorization for a specified amount.
Authorization ReverseReverses an existing authorization partially or fully.
Recurring PaymentsAutomates billing for subscriptions or recurring services.

Calls to Merchant

MethodDescription
Purchase NotifyNotifies the merchant of a successful payment with all transaction data (via URL_Notify).
Purchase OKRedirects the customer to URL_OK after a successful payment.
Purchase CancelNotifies the merchant of a canceled payment (via URL_Cancel).
Purchase RollbackNotifies the merchant of a payment reversal and advises updating the order status to unpaid.