WP Manifestindependent plugin directory
manifest / ecommerce / cppay-wordpress-plugin

CPPay WordPress Plugin

A WordPress plugin by CPPay to accept crypto payments, enable token-based monetization (x402), and power on-chain commerce.

★ 2stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/springmint/cppay-wordpress-plugin/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Create and query crypto payments in WordPress via the CPPay API without exposing your API key on the frontend.

中文文档

Installation

Reference: https://www.cppay.finance/docs/zh/guide/wordpress-plugin.html

Features

  • Configure API key from the WooCommerce payment settings via the Manage button
  • Register a WooCommerce payment gateway so CPPay appears at checkout
  • Create OTT after order placement and redirect to the hosted page: https://www.cppay.finance/payment/{ott}
  • Provide a WooCommerce webhook callback endpoint and automatically update order status after payment
  • Support shortcode-based payment component insertion
  • Support one-time payment "instant" and subscription payment "subscription"

WooCommerce Checkout Flow

After enabling the gateway, CPPay appears as a payment method at checkout.

Settings page URL examples:

  • wp-admin/admin.php?page=wc-settings&tab=checkout (legacy)
  • wp-admin/admin.php?page=wc-settings&tab=checkout&section=cppay_gateway (gateway manage page)
  • wp-admin/admin.php?page=wc-settings&tab=payments (new UI)

Checkout behavior:

  • Customer selects CPPay
  • Plugin calls POST /api/payment/ott/create with Authorization: ApiKey {api_key}
  • Customer is redirected to https://www.cppay.finance/payment/{ott}
  • Thank You page keeps the OTT link as fallback
  • On webhook callback, the plugin verifies payment status and updates WooCommerce order to completed or failed

Shortcode

[cppay_payment plain="instant" amount="10" order_prefix="blog" title="Pay with Crypto"]

Subscription example:

[cppay_payment plain="subscription" amount="9.99" interval_days="30" order_prefix="sub"]

API Alignment with cppay-sdk

The plugin PHP client aligns with interfaces in cppay-sdk/src/assets/request.ts:

  • GET /api/payment/token
  • POST /api/payment/create
  • GET /api/payment/query
  • POST /api/subscription/create
  • GET /api/subscription/query

It also maps response fields to SDK-style names such as paymentId, subscriptionId, paymentAmount, expireAt, and status.