Skip to main content
This page covers the developer surface added by TeraWallet Pro. For the core plugin’s hooks and API, see the free Hooks Reference and REST API Reference.

Hooks

Each name below was verified against the Pro plugin source.
HookTypeModulePurpose
woo_wallet_withdrawal_loadedactionWithdrawalFires when the withdrawal module is ready.
woo_wallet_withdrawal_payment_gatewaysfilterWithdrawalRegister or remove payout gateways.
woo_wallet_withdrawal_payment_gateway_settingsfilterWithdrawalModify a gateway’s settings fields.
woo_wallet_withdrawable_amountfilterWithdrawalControl how much a user is allowed to withdraw.
woo_wallet_withdrawal_gateway_chargefilterWithdrawalOverride the calculated per-gateway processing fee.
woo_wallet_coupons_loadedactionCouponFires when the coupon system is initialized.
woo_wallet_current_balancefilterCredit ExpiryCore filter the expiry module uses (priority 999) to exclude expired/redeemed credit.
woo_wallet_import_batch_sizefilterImporterAdjust the number of CSV rows processed per batch.
woo_wallet_rest_check_permissionsfilterImporterOverride the capability check on Pro REST endpoints.
affwp_payout_methodsfilterAffiliateWPInject the “Wallet Payout” method into AffiliateWP.

Example: cap the withdrawable amount

add_filter( 'woo_wallet_withdrawable_amount', function( $amount, $user_id ) {
    // Never allow withdrawing more than 500 at a time.
    return min( (float) $amount, 500 );
}, 10, 2 );

REST API

Pro adds endpoints under two namespaces. Verify exact routes/args against the plugin source before building against them.

Coupons — terawallet/v1/coupons

Full CRUD plus bulk create and code generation for wallet coupons. Used by the in-admin bulk generator and available for your own automation. Requires the appropriate management capability.

Importer — woo-wallet-pro/v1/import

RoutePurpose
POST /woo-wallet-pro/v1/import/uploadUpload a CSV; returns an import_id (attachment id). File paths never travel through the client.
POST /woo-wallet-pro/v1/import/processProcess the next batch of rows for an import session.
GET /woo-wallet-pro/v1/import/messagesFetch progress/result messages for a session.
GET /woo-wallet-pro/v1/import/currenciesList valid currencies for the currency column.
Every import route requires manage_options (filterable via woo_wallet_rest_check_permissions), and sessions are pinned to the uploading user.

Withdrawal webhooks — terawallet/v1

Asynchronous payout webhooks for Stripe, PayPal, Razorpay, Cashfree and Paystack live under the terawallet/v1 namespace, with provider signature verification and replay protection. The Stripe endpoint is POST /wp-json/terawallet/v1/stripe/webhook (set the webhook secret in the gateway’s settings to enable it).