📦

VAT & 2Checkout Tester

Back to App
⚠️
Authentication required: Click a Quick Login button above (e.g. Alice or Admin) to authenticate and enable package creation, sync, and subscriptions.

1 2Checkout Integration Status

💳 VAT-inclusive catalog checkout
The backend creates or reuses a VAT-inclusive catalog product at the exact checkout total. The buy link carries its product code, without price or currency overrides. On the 2Checkout sandbox page, compare its payable total with the final amount shown here before entering payment details. Stop if they differ.

2 Plans & Catalog Management

Select a plan --
--
Plan catalog code (checkout uses a VAT-inclusive SKU): --
The plan price is the subtotal. The authoritative VAT and total appear below after checkout creation.
➕ Create New Plan (Auto-syncs to 2CO) ▼
✏️ Edit Selected Plan (Auto-syncs to 2CO) ▼

3 Hosted Checkout (VAT-inclusive)

Creates a subscription and returns a signed ConvertPlus URL for the server-calculated total.

🔗 Generated Checkout URL

Awaiting generation
Awaiting checkout URL from backend...

⚡ 2Checkout Sync Inspector

Idle

Output from POST /api/subscription/package/sync-2checkout or auto-sync:

No sync performed yet. Click "Sync This Plan to 2CO" or "Sync All to 2CO" to test.

📤 Request Payload (POST)

Copy JSON 📋

Endpoint: POST /api/subscription/plan/:packageId

{
  "paymentMethod": "card",
  "customerName": "Alice Smith",
  "email": "alice@peopublic.com",
  "country": "NG",
  "currency": "USD",
  "redirectUrl": "...",
  "cancelUrl": "..."
}

📥 Backend Response

Idle
Awaiting request...

🔄 Subscription Status & Webhook (IPN)

Once 2Checkout processes payment, it posts an IPN notification to POST /api/webhook/2checkout which activates the subscription.

📌 2Checkout Control Panel Checklist:
  • Redirects: Add your domain to Setup > Ordering options > Redirect domains. Set Return method to Header redirect. localhost is blocked by 2Checkout — use an ngrok tunnel for local testing.
  • IPN Webhook: Set URL to https://<domain>/api/webhook/2checkout under Integrations > Webhooks & API.
⚠️
Authentication required: Log in above to test ads plan payment.

1 Select Ad Plan

Select a plan --
Reach: --  |  Duration: -- days
➕ Create New Ad Plan (Admin only) ▼

2 Create Ad Campaign

3 Pay via 2Checkout

Calls POST /api/advertisements/:id/pay → generates a signed ConvertPlus URL.

🔗 Generated Ad Checkout URL

Awaiting generation
Awaiting checkout URL from backend...

📤 Request Payload

Copy JSON 📋

Endpoint: POST /api/advertisements/:id/pay

Awaiting request...

📥 Backend Response

Idle
Awaiting request...

🔄 Ad Payment Status & Verify

Once 2Checkout processes payment, IPN fires to POST /api/webhook/2checkout which updates the ad record. Use verify as a fallback.

📌 IPN routing: Ad payments use CUSTOMFIELD_adId / order-ext-ref to distinguish from subscriptions. The ad stays PENDING after payment (admin must approve/reject).

Marketplace order VAT test

Use an active product belonging to the seller. The server reads its stored price and VAT category.

No payment is sent until you open the generated URL. Use a test token and a sandbox merchant account.

Marketplace API response

Awaiting request...

Hosted checkout URL

Awaiting checkout...