Skip to content

Order Metadata

When processing payments, the plugin stores metadata in WooCommerce orders.

Meta KeyDescription
_thepay_payment_uidUnique payment identifier from ThePay
_thepay_statusPayment status from ThePay
_thepay_methodPayment method used (e.g., card, platba24)
$order = wc_get_order( $order_id );
// Payment UID
$payment_uid = $order->get_meta( '_thepay_payment_uid' );
// Result: "q8yMSTmZsHgVdvgWGBWqgRF0Vp4VbfU3"
// Payment status
$status = $order->get_meta( '_thepay_status' );
// Result: "paid"
// Payment method
$method = $order->get_meta( '_thepay_method' );
// Result: "card"
StateDescription
paidPayment completed successfully
preauthorizedPayment is preauthorized (awaiting capture)
waiting_for_paymentAwaiting customer payment
waiting_for_confirmationAwaiting payment confirmation
expiredPayment link expired
preauth_cancelledPreauthorization was cancelled
preauth_expiredPreauthorization expired
refundedPayment was fully refunded
partially_refundedPayment was partially refunded

The plugin registers two REST API endpoints for communication with ThePay:

EndpointMethodDescription
/wpify-woo/v1/thepay/notifyPOST/GETReceives payment status notifications from ThePay
/wpify-woo/v1/thepay/resultGETHandles customer redirect after payment

These endpoints are used internally by the ThePay payment gateway and should not be called manually.

You can add custom functions either in your child theme’s functions.php or use the Code Snippets plugin.