=== Caravel Pay ===
Contributors: caravelpay
Tags: woocommerce, payments, usdc, apple pay, google pay
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Requires Plugins: woocommerce
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Accept card, Apple Pay and Google Pay in WooCommerce and receive USDC on Polygon in your own wallet, minus a flat 2%.

== Description ==

Caravel Pay adds a hosted checkout to WooCommerce. Buyers pay by card, Apple Pay or Google Pay (or with USDC, USDC.e or POL on Polygon), and each paid order is sent straight to your own Polygon wallet, minus a flat 2% fee. There is no account to create and nothing to withdraw.

* Paste your payout wallet and save. The plugin connects your store and keeps its API credentials for you; there is nothing else to copy.
* Works with the classic checkout and the Checkout block, and with High-Performance Order Storage (HPOS).
* Orders update themselves from signed webhooks: Processing (or Completed for virtual and downloadable orders) when paid, On hold when underpaid or under review, Cancelled when the checkout expires.
* Every order note for a paid order shows the payout amount, the token and a link to the Polygon transaction.
* Moving from the PayGate plugin? "Import from PayGate plugin" copies your checkout title, description and icon and shows your PayGate payout wallet. The PayGate plugin is only read, never changed.

Requirements: a self-hosted WordPress site with WooCommerce served over HTTPS, the store currency set to US dollar (USD), and a Polygon address you control.

Full guide: https://caravelpay.app/docs/woocommerce.html

== External services ==

This plugin connects to the Caravel Pay API (https://api.caravelpay.app) to create payments and confirm them. It is required: the plugin can't take payments without it. The plugin sends data only at these moments:

* **When you save the settings for the first time, change the payout wallet, or click Reconnect**: your site address, your payout wallet address, your WordPress admin email address (used only for operational notices, never for a login), the platform name ("woocommerce") and the plugin version. Caravel Pay answers with a merchant ID and secret, which the plugin stores in your database and never displays. Replaced credentials are kept for 7 days so payments that were already started can still be confirmed.
* **On the plugin's settings page**, and at most every 10 minutes when checkout is shown: a signed request for your connection status (merchant ID only).
* **When a buyer places an order with Caravel Pay**: the order reference, order total, currency, the buyer's billing email address (to prefill the payment page), and your store's return, cancel and webhook URLs. The buyer is then redirected to the hosted payment page at https://pay.caravelpay.app, where they enter their payment details with Caravel Pay's card providers. Card details never pass through your site.
* **When Caravel Pay sends a webhook to your site, and while the buyer views the order-received page**: a signed request for the checkout's current status (checkout ID only).

Caravel Pay terms of service: https://caravelpay.app/terms
Caravel Pay privacy policy: https://caravelpay.app/privacy

No other data is sent, and no code is loaded from outside the plugin.

== Installation ==

1. In WordPress, go to Plugins › Add New Plugin › Upload Plugin, choose caravel-pay-woocommerce.zip and click Install Now.
2. Click Activate Plugin.
3. Go to WooCommerce › Settings › Payments › Caravel Pay, turn on Enable, paste your Polygon payout wallet, and click Save changes.
4. Place a cheap test order in a private browser window and pay it.

== Frequently Asked Questions ==

= Caravel Pay doesn't show at checkout =

Make sure Enable is on, a payout wallet is saved, the status line on the settings page says Connected, and the store currency is US dollar (USD).

= An order stays on Pending payment after paying =

The webhook is probably not reaching your store. Check that a security plugin, firewall or CDN rule isn't blocking POST requests to /wp-json/caravel-pay/v1/webhook, that the site isn't in maintenance mode or behind a password, and that your page cache doesn't cache that URL. Every webhook is logged under WooCommerce › Status › Logs (source caravel-pay). Webhooks are retried for up to 24 hours.

= The status line says "Not connected" =

The line shows the reason. Your site address must be a public https:// address, your server must be able to make outgoing HTTPS requests, and the payout wallet must be a Polygon address you control. Fix the cause, then click Reconnect.

= How do I change my payout wallet? =

Enter the new wallet and save. The plugin reconnects your store and receives new credentials: payouts for new orders go to the new wallet, and orders already started keep the previous one.

= Where are my API credentials? =

In your WordPress database, stored by the plugin. They are never shown. Reconnect issues new ones; the old ones keep working for 7 days for payments already started.

== Changelog ==

= 1.0.0 =
* First release.
