Connect your application
EuniPay connects to your website through its backend and payment page. The dashboard manages your merchant settings; your website still owns its customers, orders, and delivery.
If you have not prepared your merchant account, complete Quickstart first.
Choose the modules you need
Open Modules for the selected Business and Test or Live environment. The presets are editable drafts; saving uses the current settings version. Enable the functions you call and read each module's readiness reasons. Stripe setup is required for managed payments, while sales imports and original-currency VAT reports work without it. The original ready field in /v1/integration-status still describes the complete Checkout integration; request /v1/integration-status?include_capabilities=true for individual capabilities. The default response keeps the original field set for strict existing clients.
| Use case | Calls | Result |
|---|---|---|
| Calculate VAT only | Tax Preview or Tax Quote | A calculation or frozen quote; no payment or sale |
| Collect payment yourself using EuniPay tax | Quote, then POST /v1/sales after payment | A sale with the quote evidence; receipt requested separately |
| Collect payment yourself using external tax | POST /v1/sales, then sales/VAT reports | Merchant-declared amounts and evidence; unknown VAT stays unknown |
| Manage historical sales | Download template, upload, check rows, explicitly commit, review tax | Historical sales without charging or automatically contacting past customers |
| Accept payment only | POST /v1/payments with all automation false | Verified payment without creating sales or receipts |
| Complete payment flow | Existing Checkout API and SDK, or independent payment with supported actions | Payment followed by the requested sale, receipt and notification work |
Disabling a module stops new calls to it. Accepted payments and queued work continue using their frozen instructions. Historical reads and exports remain available. Automatic receipts require record_sale=true and sufficient frozen tax and party information. Imports never automatically issue receipts or notify old customers.
For historical records, download an example CSV and open the filling guide from Sales ledger → Import sales. Keep identifiers as text, use ISO currency/country codes and timestamp offsets, and enter amounts as plain decimal strings in the original currency. Leave unknown VAT blank; enter 0 only for a known zero amount. Sales and refunds have separate templates. The check page shows ready, review, invalid, duplicate and conflict rows before any posting; select rows explicitly and acknowledge review rows. Download the problem list, correct the source file and upload again. The import guide documents all columns and limits.
A recorded sale does not need a receipt. To issue one explicitly, use its Request a receipt action or POST /v1/sales/{sale_id}/receipts with {} and an Idempotency-Key. The server checks confirmed tax, known amounts and owned company/customer details. External records freeze owned current names and addresses as issuance-time information, separately from historical tax evidence. Quote-backed receipts retain the original frozen parties. The original external document stays referenced, and the receipt uses its actual issuance date. Refresh the same sale to follow PDF generation; use GET /v1/receipts/{receipt_id} for metadata and the existing private PDF/download-link endpoints. Repeating an accepted request returns the same numbered receipt. A later tax correction preserves the original receipt.
Independent payments
Call the API from your backend with the Business's environment-specific key and a stable Idempotency-Key. For a fixed amount without tax calculation:
{
"external_order_id": "order-2026-0001",
"description": "Service credit",
"amount_source": "merchant",
"currency": "EUR",
"gross_minor": 12500,
"automation": { "record_sale": false, "issue_receipt": false, "notify": false },
"return_url": "https://shop.example.com/payment-result"
}
Supported currencies are CNY, EUR, CZK, DKK, HUF, PLN, RON and SEK. gross_minor includes any agreed fee. A merchant amount does not imply calculated or verified tax. To use a frozen quote, set amount_source=quote, include tax_quote_id, and send its exact currency and gross total. An explicit automation replaces all three actions; omitted booleans are false. Omitting the whole object uses the Business defaults frozen at acceptance. Automatic receipts currently require a quote-backed payment; merchant-amount payments must set issue_receipt=false, including when the Business defaults enable receipts.
Only the creation response includes client_secret and publishable_key for this customer's Stripe custom Checkout form. The existing EuniPay Checkout SDK consumes its original browser token and does not accept an independent payment ID or client secret. Keep server API keys on your backend. A redirect or browser completion is not payment evidence.
Read GET /v1/payments/{payment_id} for state and posting_state. A payment can be paid while a requested sale or receipt is pending or conflict; use posting_reason to investigate and retry downstream work without charging again. Retry a creation timeout with the same request and key. An unknown provider outcome requires reconciliation; changing the key or order ID can duplicate the charge.
To refund an independent payment, call POST /v1/payments/{payment_id}/refunds with an Idempotency-Key and {"amount":5000,"reason":"requested_by_customer"}. The amount is in the payment currency's minor unit. Read GET /v1/refunds/{refund_id} until completion. This works without a sale and shares the balance with the existing transaction refund API. Unknown provider outcomes retain their reservation; reuse the accepted request and key. Unknown tax components remain null. If the same provider refund was already declared externally, the accepted record can point to canonical_refund_id; this represents one refund. A projection_conflict needs reconciliation and must not trigger a new refund under a different key.
To receive payment.paid, register the existing signed callback endpoint with payment_paid=true and request notify=true on the payment. Existing subscriptions remain opted out; omitting payment_paid preserves their setting and the original response fields. GET keeps the legacy response fields; an explicit new PUT includes the saved payment_paid value. Verify the existing HMAC signature and deduplicate by event ID. Its payload contains payment_id, external_order_id, status, currency, gross_minor, paid_at and the event-time posting_state. Read the payment for current posting progress. The original checkout.paid notification continues to wait for its required sale and receipt, with its existing fields.
The unified /v1/sales APIs and management reports cover imported, externally recorded and managed sales. The original /v1/transactions APIs retain their Quote-and-Receipt contract and scope; use /sales when those links are optional. Provider references on external records are merchant declarations, not independent verification by EuniPay.
Who does what?
| Role | Responsibility |
|---|---|
| Merchant | Configure the business profile, Stripe, currencies, and API key in EuniPay |
| Website backend | Save customer billing details, create checkout, and verify payment notifications |
| Website payment page | Display the payment form and help the customer finish paying |
| EuniPay | Calculate VAT, manage the connected payment, confirm its result, and prepare the receipt |
A custom website needs a one-time development integration. There is no universal key field you can paste into any website to make this happen automatically.
For the complete Checkout integration, check /v1/integration-status before connecting. seller.tax_profile, ready and readiness_reasons describe the server's eligibility decision. Do not infer eligibility from company country or an OSS number. Refresh context after configuration changes and discard stale previews. location_required is display-only and cannot enable checkout.
Follow the original complete Checkout flow
Use your own customer and order IDs throughout. For example, keep the same customer ID when they pay again, but use a new order ID for a genuinely new purchase.
- Save the customer. Your backend sends the billing name, email, country, address, and individual or business status. A business also supplies its VAT number. Success means EuniPay has a customer profile for that ID.
- Connect notifications once. Your backend registers its payment-result address with EuniPay and saves the signing secret. This is separate from Stripe notifying EuniPay.
- Create checkout. Your backend sends the order ID, customer ID, amount, and currency. EuniPay returns a checkout ID, a browser token, and the calculated payment amounts. Save the checkout ID with your order.
- Display the payment form. The payment page uses the browser token to show EuniPay Checkout. The customer chooses a method and submits payment.
- Update the order. Your backend verifies EuniPay's successful-payment notification, checks the order reference, and marks the order paid exactly once. Use the amounts returned by EuniPay, not values supplied by the browser.
- Show the result. Your website reads the order status from its own backend. A browser redirect or completion message is not sufficient evidence that the order is paid.
Which addresses are needed?
- EuniPay service address: the API root your backend calls. In the examples, https://pay.example.com is a placeholder for your actual service address.
- Payment page origin: your website's scheme and host, without a page path.
- Return page: the page the customer returns to after a redirect-based payment. It must share the payment page origin.
- Payment-result address: an endpoint on your backend, reachable by EuniPay. It is not a page the customer opens.
For local testing, a public service cannot reach a callback that exists only on your computer. Use a reachable test deployment or an appropriate development tunnel, and ensure the callback address is permitted in the selected environment.
Start with the working example
The first test payment tutorial puts connection checks, customer creation, notification registration, checkout creation, and the browser form in one place. It also explains what to replace in each example.
Use the API reference for individual fields and response codes. If a test payment does not reach your order, follow Troubleshooting.
Historical VAT assessment and acceptance
From sale details, choose Assess historical VAT to save an original/proposed/difference comparison. This does not change the sale. First-release automated coverage is 13 July–28 October 2026, intersected with the recorded rate and registration periods. It requires complete original frozen standard-service Quote evidence, the same original tax date, currency and received gross. Ended registrations can qualify at the original time; current VIES cannot prove past validation. Missing typed historical evidence, unsupported regions/categories and out-of-range dates produce specific blockers.
External CSV records remain usable for manual VAT review. Their free-text evidence reference does not establish historical category, seller or location proof. Automated assessment currently excludes ES, FR, PT, FI, DE, GR and CY where the stored country-only evidence cannot establish territorial coverage; reverse-charge Quotes without the supported category version also remain blocked.
Server calls are POST /v1/sales/{sale_id}/tax-assessments with { "expected_version": 2 }, followed by GET /v1/tax-assessments/{assessment_id} for the frozen record. To accept it, send POST /v1/tax-assessments/{assessment_id}/accept with a single Idempotency-Key header and { "expected_version": 2, "reason": "Reconcile with the original archived evidence" }. Send neither money, evidence nor actor fields; field names are exact. Keep the same key and body after an unknown response. A stale version, changed request or accepted-refund constraint returns a conflict; inspect the sale and refund history before retrying.
Acceptance appends a revision or linked correction and preserves actual payment, original receipt and saved filing snapshots. It does not file a return or contact a customer. Reports → Export corrections uses the actual correction time and retains original and before/after tax dates and versions. API export: GET /v1/reports/sale-corrections.csv?from=2026-10-01T00:00:00Z&to=2026-11-01T00:00:00Z. Its differences stay separate from current effective sales/VAT totals.