=== GOXOST KYC ===
Contributors: goxost
Tags: kyc, identity verification, woocommerce, aml, verification
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Identity verification (KYC) for WordPress and WooCommerce: document, selfie, liveness and AML checks by GOXOST KYC.

== Description ==

GOXOST KYC lets your users verify their identity on your site. The verification flow (document, selfie, liveness) is embedded from [GOXOST KYC](https://kyc.goxost.net); the decision (GREEN, RED or ON_HOLD) arrives through a signed webhook and is stored on the WordPress user.

* Shortcode `[goxost_kyc]` and the block "GOXOST KYC verification".
* Signed webhook receiver: `https://your-site/wp-json/goxost-kyc/v1/webhook`.
* "KYC" column in Users and a KYC section on the user profile.
* Optional WooCommerce rule: only verified customers can check out.
* Developer helpers: `goxost_kyc_is_verified()`, action `goxost_kyc_decision`, filter `goxost_kyc_applicant_data`.
* Sandbox (`sk_test_`) and live (`sk_live_`) keys.

= Privacy =

The plugin stores no personal data in WordPress: no names, document numbers or images. Each user gets only these user meta values: `goxost_kyc_status`, `goxost_kyc_applicant_id`, `goxost_kyc_verification_id`, `goxost_kyc_decided_at` (plus the internal `goxost_kyc_session_id` and `goxost_kyc_event_at`). The API secret key stays on the server; the browser only receives a short-lived session token.

= External service =

This plugin connects to the GOXOST KYC service (by default `https://kyc.goxost.net`). It sends an applicant reference (`wp_<user ID>`), the chosen flow and language to create a verification session, and the user's browser loads `https://kyc.goxost.net/sdk/kyc.js` and the hosted verification page, where the user submits their document and selfie directly to GOXOST KYC. See the GOXOST KYC terms of service and privacy policy at https://kyc.goxost.net.

== Installation ==

1. Upload the `goxost-kyc` folder to `/wp-content/plugins/` and activate the plugin.
2. In the GOXOST KYC panel create an API key, and a webhook endpoint with the URL shown on Settings → GOXOST KYC. Copy the webhook signing secret (`whsec_…`).
3. Open Settings → GOXOST KYC, paste the API secret key and the webhook signing secret, save, and press "Test connection".
4. Create a page with `[goxost_kyc]` (or the block) and pick it as the "Verification page".

== Frequently Asked Questions ==

= Which shortcode attributes are available? =

`flow` — flow key (otherwise the setting, otherwise your account default); `locale` — `uz`, `ru` or `en`. Example: `[goxost_kyc flow="basic-kyc" locale="ru"]`. The flow is fixed when a user's applicant is created for the first time.

= How do I check verification in my code? =

`if ( goxost_kyc_is_verified( $user_id ) ) { … }` — or react to decisions:

`add_action( 'goxost_kyc_decision', function ( $user_id, $decision, $payload ) { … }, 10, 3 );`

= Can I add metadata to the applicant? =

Use the `goxost_kyc_applicant_data` filter. Do not add personal data; keep `external_id` unchanged.

= How do I test without real documents? =

Use an `sk_test_` key. Sandbox results are simulated; see the GOXOST KYC API documentation, section "Sandbox".

== Changelog ==

= 1.0.0 =
* First release.
