=== ePayVista Partner Dashboard ===
Contributors: coellojoseph
Tags: white label, payment gateway, reseller, merchant onboarding, payments
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

White label payments for agencies and resellers: add merchants, set your own fee on top of 1%, get your share in every settlement.

== Description ==

ePayVista Partner Dashboard is for agencies, SaaS platforms, marketplaces and anyone with merchants to bring who wants to offer payment processing under their own brand. It turns your WordPress site into the home of your own payment partner program: you add and host your merchants, you set the processing fee they pay on top of ePayVista's 1%, and your share is paid on-chain to your wallet in the same settlement as every payment.

Your merchants are paid in stablecoins (USDC or USDT) straight to their own wallet as each payment settles. Funds never sit with ePayVista: no balances, no payout schedule, no reserves. Their customers pay by card, Apple Pay, Google Pay or crypto wallet on ePayVista's hosted checkout. Card payments are run by independent licensed card providers, who alone decide approvals, declines, identity checks, countries and minimums.

= What you can do =

* **Set your partner rate.** Choose the total your merchants pay, from 1% to 20%. ePayVista keeps its 1% and the rest is your share. A preview shows the split in plain words before you confirm.
* **Set a fee per merchant.** Give one merchant a lower fee when you add them, or lower it later from their page.
* **Add merchants in one form.** Each new merchant gets their own API key and webhook secret, shown once with copy buttons and never stored on your site.
* **Share your merchant sign-up link.** Merchants can also sign up themselves through your own link. Copy it from the Overview screen, or put the `[epv_partner_signup_link]` shortcode on any page.
* **Close a merchant account.** Closing is permanent and stops the merchant's API key. It is also how a payout wallet is changed: close the account, then add the merchant again with the new wallet, at the same fee or lower.
* **Merchant onboarding on your own site.** Put the `[epv_partner_apply]` shortcode on a page and merchants apply while logged in to your WordPress site. Approve each application, or let them be approved automatically.
* **A sub-merchant dashboard in your brand.** The `[epv_partner_merchant]` shortcode shows each logged-in merchant their own status, fee, fixed payout wallet and payments, and nothing about anyone else.
* **Monthly report and CSV.** See payments, volume and what was paid to you per merchant, and download the month as a CSV file.
* **Instant settlement to the merchant's own wallet.** Every payment settles on-chain to the merchant, and your partner share goes to your payout wallet in that same settlement. Nothing is held, there is no monthly payout and no invoice to send.
* **Sandbox mode.** Switch to the ePayVista sandbox to build and test the whole flow on a test network with test funds.
* **One public set of terms, no contracts.** The partner program runs under ePayVista's public Terms of Service, the same for every partner. No setup fee, no monthly fee, no minimum volume.

= How it works =

1. Open a free partner account at https://pay.epayvista.com/portal/partner-signup and confirm your email.
2. Sign in to your partner dashboard and create your Partner-Key under "Partner API". The key is shown once.
3. Install this plugin, go to Partner Dashboard > Settings, paste the Partner-Key and choose Live or Sandbox.
4. Set your rate on the Overview screen. Your merchants pay that total, ePayVista keeps 1% and the rest is yours.
5. Add merchants from the admin screen (or approve applications from your own site), or share your merchant sign-up link so merchants can sign up themselves.
6. Your merchants take payments through the ePayVista API with their own API key. Each payment settles to the merchant's wallet, and your share arrives in your wallet in the same settlement.

= Who it is for =

* Web agencies that want to offer payments to their clients under their own name.
* SaaS platforms, marketplaces and CRMs that want to host their own merchants and set their own processing fee.
* Resellers, consultants and communities with businesses to bring, including high-risk merchants that mainstream processors decline.
* Anyone who wants a white label payment gateway without building, securing or running the payment infrastructure.

= Requirements =

* WordPress 6.0 or newer and PHP 7.4 or newer, on a single WordPress site. Any WordPress site works: WooCommerce is not needed.
* A free ePayVista partner account and its Partner-Key.
* A payout wallet for your partner share, set in your partner account.

= Fees =

* The plugin is free. The partner program is free to join: no setup fee, no monthly fee, no minimum volume.
* Your merchants pay the total rate you set, from 1% to 20%.
* ePayVista keeps 1%. The rest is yours, paid to your wallet with every payment.
* A merchant's fee can be lowered later, but never raised for a merchant who already signed up. Raising your rate applies only to merchants who sign up afterwards. Lowering it lowers every merchant above the new rate.
* If you close a merchant's account and add the same store again, the new account cannot have a higher fee than the closed one.
* Network fees are taken out of each payment at settlement.

== External services ==

This plugin connects to the ePayVista Partner API to read and manage your partner account and your merchants. Without it the plugin cannot do anything.

* Service: ePayVista, https://epayvista.com
* Addresses used: https://pay.epayvista.com (Live) and https://pay.epayvista.com/sandbox (Sandbox), depending on the environment you choose in Settings. No other address is ever contacted.
* When: only when an administrator opens the plugin's admin screens or uses their buttons (for example Add merchant, Lower fee or Close account), when a logged-in user sends the application form, when a logged-in merchant opens their dashboard page, and when a page with the `[epv_partner_signup_link]` shortcode is shown (at most once a minute, the answer is kept for 60 seconds).
* What is sent: your Partner-Key with every request; when a merchant is created, the business name, email address, payout wallet address, website address and fee entered in the form; and the merchant id, month or page being viewed or closed.
* What is not sent: no visitor tracking, no analytics, and nothing about your site's visitors, other users or content.
* Terms of service: https://epayvista.com/terms
* Privacy policy: https://epayvista.com/privacy

== Installation ==

1. Install and activate the plugin from the Plugins screen, or upload the plugin folder to `/wp-content/plugins/`.
2. No partner account yet? Open one at https://pay.epayvista.com/portal/partner-signup and confirm your email. Then sign in to your partner dashboard, go to "Partner API" and create your Partner-Key. It is shown once.
3. In WordPress, go to Partner Dashboard > Settings, paste the key, choose Live or Sandbox, and save. Use "Test connection" to check it.
4. Set your rate on the Overview screen.
5. Optional: create a page with `[epv_partner_apply]` and a page with `[epv_partner_merchant]`, then pick both pages in Settings. Put `[epv_partner_signup_link]` on any page where you want a link to your merchant sign-up page.
6. Set your brand name, your terms page, and whether applications need your approval.

== Frequently Asked Questions ==

= Is the plugin free? =

Yes. The plugin is free and the ePayVista partner program is free to join, with no setup fee and no monthly fee. ePayVista keeps 1% of each payment your merchants take, and the rest of the rate you set is yours.

= How do merchants join my partner account? =

In one of two ways. You create their account in this plugin (or through your application form), or they sign up themselves through your merchant sign-up link, shown on the Overview screen and available as the `[epv_partner_signup_link]` shortcode.

= Does it work with WooCommerce? =

This plugin runs on any WordPress site and does not need WooCommerce. Merchants whose account you create take payments through the ePayVista API (https://epayvista.com/api) with their own API key. The separate ePayVista Payments plugin for WooCommerce connects a store as a standard ePayVista merchant account at the standard 1%, and that account is not linked to your partner account.

= Do I need the ePayVista Payments plugin too? =

No. This plugin is for you, the partner, and runs without WooCommerce. The separate ePayVista Payments plugin is for a WooCommerce store that takes payments for itself as a standard ePayVista merchant at the standard 1%, not linked to any partner account.

= How do my merchants get paid? =

Each payment settles on-chain in stablecoins (USDC or USDT) straight to the merchant's own payout wallet. ePayVista never holds the funds, so there is no balance, no payout schedule and no reserve.

= How do I get paid? =

Your share of every payment is sent on-chain to your partner payout wallet in the same settlement that pays the merchant. There is no monthly payout, no invoice and no minimum. If that transfer cannot be made for a payment, your share for that payment stays with the merchant's payout.

= Can I change a merchant's payout wallet? =

No. A merchant's payout wallet is fixed when the account is created, and neither you nor the merchant can change it. To use a different wallet, close the merchant's account (permanent, and their API key stops working), then add the merchant again with the new wallet. They get a new API key and webhook secret. The new account for the same store cannot have a higher fee than the closed one.

= Can I test without real money? =

Yes. Choose Sandbox in Settings and use a Partner-Key from the ePayVista sandbox: everything runs on a test network with test funds. To see what your merchants' customers see, try the checkout demo at https://pay.epayvista.com/sandbox/demo, with no account and no money needed.

= Which countries are supported? =

ePayVista is built mainly for US merchants selling to US customers, and that is where card payments work best. Merchants and customers in other countries can use it, but card payments outside the US are not guaranteed. Card payments are handled by licensed third-party card providers, and each provider decides which countries, cards and amounts it accepts and what checks the customer must complete (such as 3D Secure or ID verification). ePayVista does not control those decisions. If you sell outside the US, run a real test payment from your customers' country before you go live. Customers paying directly in crypto can pay from anywhere.

= Where is my Partner-Key stored? =

In your site's database, in its own option that is not loaded on every page. It is only ever sent to pay.epayvista.com, never to a browser, and after you save it the plugin shows only its last 4 characters. Merchant API keys and webhook secrets are not stored at all: they are shown once, right after the merchant is created.

= What data leaves my site? =

Only what the Partner API needs: your Partner-Key with each request, the details entered when a merchant is created (business name, email, payout wallet, website and fee), and the merchant id, month or page you open. Nothing is sent about your visitors, and there is no tracking or analytics. See "External services" above.

= Do I become a payment facilitator? =

No. You do not process cards, hold merchant funds or underwrite merchants. ePayVista is non-custodial software: every payment settles straight to the merchant's own wallet, and card payments are run by independent licensed card providers. You bring the merchants, set the fee and receive your share. Under the partner terms you are not ePayVista's agent, and you must not describe ePayVista as a bank, card acquirer or underwriter.

= Does it work on WordPress multisite? =

It has not been tested on multisite. Use it on a regular single WordPress site.

== Screenshots ==

1. Overview: connection status, your rate in plain words, this month's totals, your merchant sign-up link and the rate control.
2. Confirming a rate change, with the rule explained before anything changes.
3. Merchants list with fee, status, payments, volume and your earnings. Closed accounts are marked and have no actions.
4. A merchant's page: fixed payout wallet, lower the fee, link a WordPress user, close the account, see payments.
5. The close account step: closing is permanent, how a payout wallet is changed, and the fee limit for a new account for the same store.
6. Adding the store of a closed account again: the payout wallet cannot be changed later, and the new fee cannot be higher than the closed account's fee.
7. A new merchant's API key and webhook secret, shown once with copy buttons (example values).
8. Merchant applications waiting for review.
9. Monthly report with CSV download.
10. Settings, with a short guide to how it works.
11. The merchant application form on your site.
12. A merchant's own dashboard on your site, with the fixed payout wallet and recent payments.

== Changelog ==

= 1.0.1 =
* Add a merchant now has an optional webhook address, so a store can receive signed paid notices from the start.

= 1.0.0 =
* First release: partner overview and rate control, merchant sign-up link with the `[epv_partner_signup_link]` shortcode, merchants list and detail, per-merchant fees, add merchant, close account, merchant applications, monthly report with CSV, settings, and the application and merchant dashboard shortcodes.

== Upgrade Notice ==

= 1.0.1 =
Adds an optional webhook address when you add a merchant.

= 1.0.0 =
First release.
