Animica Pay docs 2.00% per successful payment

Integrations

WooCommerce plugin

Install, settings, what the plugin does, refunds and troubleshooting.

"Pay with ANM" next to your existing methods. WordPress is an API client only: it never touches an Animica RPC node, never counts confirmations, never handles reorgs and never holds a spending key.

Install #

  1. Plugins → Add New → Upload Plugin, choose animica-pay-for-woocommerce.zip, install, Activate.
  2. WooCommerce → Settings → Payments → Animica Pay.
  3. Set Mode to Test.
  4. Paste your Publishable API key (apk_test_…) and Secret API key (ask_test_…).
  5. Paste the Webhook signing secret, and register the webhook URL shown on that screen at pay.animica.dev.
  6. Enter your Merchant ANM address (anim1…). It is validated the same way the API validates it, so a 0x1002 address is rejected here too.
  7. Set Checkout expiration (default 10 minutes) and Order status after confirmed payment (default processing).
  8. Tick Enable, save, and place a test order.

The webhook URL your site exposes is:

text
https://your-shop.example/wp-json/animica-pay/v1/webhook

Settings reference #

SettingNotes
Enable/DisableOff by default.
TitleShown at checkout. Default "Pay with ANM".
DescriptionShown under the title.
ModeTest or Live. Test never moves real ANM.
Publishable keyapk_…. Safe in the page.
Secret keyask_…. Stored in WordPress options; server-side only.
Webhook signing secretUsed to verify inbound events.
Merchant ANM addressValidated as bech32m ML-DSA-65.
Checkout expiration2–60 minutes, default 10.
Order status after confirmationprocessing (default) or completed.

What the plugin does at checkout #

On process_payment it creates the intent with the order id as the idempotency key, so a retried checkout can never create two intents for one order:

php
<?php
$out = self::request( 'POST', '/api/v1/payment-intents', $body, 'woo_order_' . $order_id );

then redirects the shopper to checkout_url. Two integrations ship, because one is not enough for broad compatibility: the classic WC_Payment_Gateway (where WooCommerce still routes payment) and Checkout Block support via registerPaymentMethod() plus a server-side AbstractPaymentMethodType.

What it does on the webhook #

Verify the signature, then guard the side effect:

php
<?php
if ( ! $order->is_paid() ) {          // retries are normal; this is the guard
    $order->payment_complete( $transaction_hash );
}

It also writes the accounting onto the order so you can reconcile without leaving WordPress: gross, fee (2%), merchant amount, transaction hash and confirmations — the same numbers the dashboard shows.

Refunds #

The normal Refund button works, including partial refunds. Remember that a refund is a new ANM transaction, not a reversal, and that the 2% protocol fee is not returned. See Refunds.

Troubleshooting #

SymptomCause
"Pay with ANM" missing at checkoutNot enabled, or no secret key set.
Order stays pending after paymentWebhook not reaching your site, secret mismatch, or the 0.1.0 signature gap above.
401 in the logWrong key, revoked key, or a test key against live data.
Address rejected on saveNot bech32m anim1…, or a 0x1002 SPHINCS+ address, which cannot spend.
Two intents for one orderAn idempotency key was not sent. The plugin always sends one; a custom fork may not.