Handle risk, regulatory requirements and complex payment flows - without compromising the player experience. Get started fast.
Support cards, wallets and local favorites so players can deposit using what they already know and trust.
Choose between a ready-made checkout or full integration directly into your own flow - without changing platform.
You are not tied to a single acquirer. Choose freely and switch when pricing, terms or risk profile change.
Use different acquirers per card type or market and optimize costs, approval rates and payouts.
Our API and JavaScript SDK give you full control over the integration from first test payment to production.
Adapt your payment setup across brands, markets and flows without rebuilding the integration.
The cardholder selects an amount and enters card details in a secure environment.
IP lookup, bank identification, and risk scoring are initialized immediately.
We automatically select the preferred agreement so you get the lowest prices on every transaction.
We send you a full data package - including card data and PAR - so you can make the decision in real time.
ePay waits for your response and applies the outcome to the transaction when ready.
We respect your decision and run 3DS. The customer gets a challenge when required.
The payment is sent to the acquirer. The customer is ready to play.
Gambling is one of the most regulated and data-heavy payment environments, where every transaction is evaluated in context. That is why 3D Secure cannot be "one size fits all". With ePay, you control 3DS using scaMode and exemptions, so you can reduce fraud without hurting conversion for your good players.
Run 3DS by default, skip it in low-risk scenarios - or force a challenge when signals indicate increased risk - for example a new card, new device, new geo-signal or atypical behavior.
After every payment you get clear insight into the 3DS outcome: challenged, frictionless or skipped. This makes it possible to build a risk strategy that gets sharper over time.
In gambling, this is especially valuable because patterns repeat: bonus abuse, stolen cards, multi-accounting and "test transactions". When you know the 3DS outcome, you can react precisely - without punishing legitimate players.
For example, if a card triggers a 3DS challenge, but the cardholder does not complete it and abandons the payment, you can treat it as a risk signal.
If the same player later adds a new card, you can require a 3DS challenge again - making challenge hopping difficult and stolen cards significantly less useful.
When deposits fail, you need to act immediately. ePay gathers the entire payment session - from the moment the player starts the payment until the final action is completed - into one consolidated transaction flow.
This gives your team deep visibility into exactly where a payment stops in the flow, and what came back from 3DS, the acquirer and the card network.
With the pre-auth callback, you can move your "final decision" closer to the payment. ePay sends a callback right before 3DS and authorization are processed - with all relevant transaction data.
Implement your own logic - or connect third-party AML, KYC and anti-fraud - and respond whether the transaction should be rejected, proceed normally or require a challenge.
This is especially powerful in gambling, where you already have domain knowledge: deposit limits, responsible gambling, risk profiles, velocity checks and bonus abuse.
Pre-auth can also help control costs. Based on transaction data, you can filter and route authorizations to the acquirer or route that delivers the best approval and the lowest fee - so only relevant attempts are sent onward.
Pre-authorization webhook sends a unified data package before 3DS
ePay's built-in rule engine lets you set up advanced rules that can reject, force a challenge or change how a transaction is processed - without shipping code.
Combine ePay data (3DS outcome, wallet type, card type, issuer, geo, device signals and more) with your own dynamic attributes that you send with the payment - for example player status, KYC level, risk score, segment or limits.
Reject payments with cards issued outside licensed countries, limit payments to debit cards, and stop transactions where the cardholder is outside the jurisdiction you are licensed to operate in.
Layer multiple rules and fine-tune them continuously - without release cycles. Rules are evaluated in order, and the first matching rule is executed.
Gambling is not a classic checkout. Often you do not know the deposit amount upfront - the player chooses it in your frontend.
With Dynamic Amount, you can start a payment session without an amount and set the amount later in the flow.
This creates a more natural deposit UX and reduces friction, because you avoid workarounds like "dummy products" or hard-coded amount choices before the payment flow.
Start payment sessions without a fixed amount, let the player choose the deposit amount directly in your UI, and create a payment flow that is naturally adapted to gambling deposits.
Wallets often hide the real PAN, making it harder to enforce bonus policies, AML work and closed loop withdrawals.
With ePay you get access to PAR (Primary Account Reference) - a stable, unique ID for the card across wallets.
This means you can identify the same card even when the player uses Apple Pay today and Google Pay tomorrow - or when a wallet token would otherwise look like a "new" card.
Strengthen protection against bonus abuse and multi-accounting with a more robust card identity, while improving AML signals and supporting closed loop payout and withdrawal flows.
In gambling, trust is about speed: when a player wins, they want their money quickly.
ePay supports CFT/payouts with integrations to Visa Direct and Mastercard Send, so you can deliver near-instant payouts.
Combine payouts with your own rules and controls - for example KYC level, responsible gambling checks and closed loop requirements - so you win on both experience and compliance.
Pay out winnings near-instantly to players, automate compliance and risk checks before payout, and reduce support tickets with a better and more predictable player experience.
PAR and transaction insight also make it easier to build robust closed loop payout flows
Gambling flows are often recurring - and friction from card updates can be costly. With tokenization and account updates, ePay can automatically keep stored cards up to date when a card expires or is reissued.
The result is fewer failed deposits, lower churn among returning players and a more stable player experience over time.
Reduce friction by keeping stored cards updated, improve approval rates by avoiding expired-card failures, and strengthen retention with more stable deposits over time. Combine with rule engine and 3DS insights to distinguish between “known good” players and truly risky scenarios.
In gambling, downtime has an immediate cost - both revenue and player experience. With ePay, you can design your setup for high availability, so payments can continue even when the primary acquirer is down.
Use a redundant acquirer as fallback: if the primary acquirer or route fails, the transaction can automatically be routed onward to an alternative acquirer, avoiding unnecessary declines.
Combine with rules and monitoring so you can control fallback by payment method, country, card type or amount level - and switch back when the primary is stable again.
ePay Blocks lets you embed secure card fields directly in your casino UI - combined with wallets like Apple Pay and Google Pay for fast, frictionless deposits without redirects.
1// -------------------------------
2// Hosted Fields Callback Functions
3// -------------------------------
4
5function clientReadyCallback(event) {
6 console.log("Hosted fields client is ready:", event);
7}
8
9function invalidSessionCallback(event) {
10 console.error("Invalid session detected:", event);
11 displayError("Invalid session detected", event);
12}
13
14function challengeIssuedCallback(event) {
15 console.log("A challenge has been issued:", event);
16}
17
18function transactionAcceptedCallback(event) {
19 onTransactionComplete(true);
20}
21
22function transactionDeclinedCallback(event) {
23 onTransactionComplete(false);
24}
25
26function clientRedirectCallback(event) {
27 return false; // Skipping redirects in the demo preview
28}
29
30function invalidInputCallback(event) {
31 console.error("Invalid input encountered:", event);
32 displayError("Invalid input encountered", event);
33}
34
35function inputValidityCallback(event) {
36 console.log("Input validity changed:", event);
37}
38
39function inputSubmitCallback(event) {
40 console.log("Input submitted:", event);
41}
42
43function sessionExpiredCallback(event) {
44 console.error("Session has expired:", event);
45 displayError("Session has expired", event);
46}
47
48function errorCallback(event) {
49 console.error("An error occurred in hosted fields:", event);
50 displayError("An error occurred in hosted fields", event);
51}
52
53// -------------------------------
54// Helper: Create UI Containers
55// -------------------------------
56
57function createUi() {
58 const fields = document.createElement("div");
59 fields.id = "fields";
60
61 const errorBlock = document.createElement("div");
62 errorBlock.id = "error-block";
63
64 document.body.appendChild(fields);
65 document.body.appendChild(errorBlock);
66
67 return { fields, errorBlock };
68}
69
70// -------------------------------
71// Helper: Display Errors
72// -------------------------------
73
74/**
75 * Appends a formatted error message to the error block.
76 *
77 * @param {string} description - A human-readable error description.
78 * @param {object} event - The event object containing error details.
79 */
80function displayError(description, event) {
81 const errorBlock = document.getElementById("error-block");
82 errorBlock.style.display = "block";
83
84 let title = "";
85 if (event && event.type) {
86 title += event.type;
87 }
88 if (event && event.errorCode) {
89 title += title ? " - " + event.errorCode : event.errorCode;
90 }
91 if (!title) {
92 title = "Error";
93 }
94
95 if (event && event.event) {
96 title += ` (Event: ${event.event})`;
97 } else {
98 title += " (Event: N/A)";
99 }
100
101 const errorItem = document.createElement("div");
102 errorItem.classList.add("error-item");
103
104 const titleEl = document.createElement("div");
105 titleEl.classList.add("error-title");
106 titleEl.textContent = title;
107
108 const descriptionEl = document.createElement("div");
109 descriptionEl.classList.add("error-description");
110 descriptionEl.textContent =
111 description ||
112 (event && event.message ? event.message : "No further details provided.");
113
114 errorItem.appendChild(titleEl);
115 errorItem.appendChild(descriptionEl);
116 errorBlock.appendChild(errorItem);
117}
118
119// -------------------------------
120// Payment Request Setup
121// -------------------------------
122
123const headers = new Headers();
124const demoApiKey = "test_93dc98ae-ff87-4671-a821-cda33fdfc26e"; // Demo API key: NEVER use this client-side in production
125
126headers.append("Content-Type", "application/json");
127headers.append("Accept", "application/json");
128headers.append("Authorization", `Bearer ${demoApiKey}`);
129
130const paymentData = {
131 pointOfSaleId: "0195a362-5bf4-7bb9-a419-2367fda11e6f",
132 amount: 100, // minor amount
133 currency: "DKK",
134 scaMode: "SKIP",
135};
136
137const requestOptions = {
138 method: "POST",
139 headers: headers,
140 body: JSON.stringify(paymentData),
141 redirect: "follow",
142};
143
144// -------------------------------
145// Helper: Dynamically Load External Module
146// -------------------------------
147
148/**
149 * Dynamically loads an external script module.
150 *
151 * @param {string} scriptUrl - The URL of the external module.
152 * @param {Function} onLoadCallback - A callback function to run once the module loads.
153 */
154function loadExternalModule(scriptUrl, onLoadCallback) {
155 const scriptEl = document.createElement("script");
156 scriptEl.type = "module";
157 scriptEl.src = scriptUrl;
158 scriptEl.onload = onLoadCallback;
159 document.body.appendChild(scriptEl);
160}
161
162// -------------------------------
163// Helper: Create Payment Button
164// -------------------------------
165
166/**
167 * Creates and appends a payment button to the DOM.
168 * The button text is set dynamically using the converted amount (major) and currency.
169 *
170 * @param {number} amount - The payment amount (in minor units).
171 * @param {string} currency - The currency code.
172 */
173function createPaymentButton(amount, currency) {
174 const majorAmount = (amount / 100).toFixed(2);
175
176 const button = document.createElement("button");
177 button.type = "button";
178 button.id = "payment-button";
179 button.textContent = `Pay ${majorAmount} ${currency}`;
180
181 button.addEventListener("click", () => {
182 epay.createCardTransaction();
183 });
184
185 const fieldsContainer = document.getElementById("fields");
186 fieldsContainer.insertAdjacentElement("afterend", button);
187}
188
189// -------------------------------
190// Helper: Handle Transaction Completed
191// -------------------------------
192
193/**
194 * Function to handle the display after a transaction is completed.
195 *
196 * @param {boolean} success - Indicates whether the transaction was successful.
197 */
198function onTransactionComplete(success) {
199 const fieldsContainer = document.getElementById("fields");
200 const paymentButton = document.getElementById("payment-button");
201
202 fieldsContainer.style.display = "none";
203 paymentButton.style.display = "none";
204
205 const messageContainer = document.createElement("div");
206 messageContainer.id = "transaction-message";
207 messageContainer.style.marginTop = "20px";
208
209 if (success) {
210 messageContainer.innerHTML = `
211 <h2>Payment Success</h2>
212 <p>Your transaction has been completed successfully.</p>
213 `;
214 } else {
215 messageContainer.innerHTML = `
216 <h2>Payment Failed</h2>
217 <p>We're sorry, but your transaction could not be completed.</p>
218 `;
219 }
220
221 if (fieldsContainer && fieldsContainer.parentNode) {
222 fieldsContainer.parentNode.appendChild(messageContainer);
223 } else {
224 document.body.appendChild(messageContainer);
225 }
226}
227
228// -------------------------------
229// Payment Request & Hosted Fields Initialization
230// -------------------------------
231
232createUi();
233
234fetch("https://payments.epay.eu/public/api/v1/cit", requestOptions)
235 .then((response) => response.json())
236 .then((result) => {
237 const sessionId = result.session.id;
238 const sessionKey = result.key;
239 const amount = result.session.amount;
240 const currency = result.session.currency;
241
242 loadExternalModule(result.javascript, () => {
243 epay
244 .setSessionId(sessionId)
245 .setSessionKey(sessionKey)
246 .setCallbacks({
247 clientReady: clientReadyCallback,
248 invalidSession: invalidSessionCallback,
249 challengeIssued: challengeIssuedCallback,
250 transactionAccepted: transactionAcceptedCallback,
251 transactionDeclined: transactionDeclinedCallback,
252 clientRedirect: clientRedirectCallback,
253 invalidInput: invalidInputCallback,
254 inputValidity: inputValidityCallback,
255 inputSubmit: inputSubmitCallback,
256 sessionExpired: sessionExpiredCallback,
257 error: errorCallback,
258 })
259 .init();
260
261 epay.mountFields("fields", {
262 // The configuration object can be added here when needed.
263 });
264
265 createPaymentButton(amount, currency);
266 });
267 })
268 .catch((error) => {
269 console.error("Error during payment request:", error);
270 displayError("Error during payment request", error);
271 });Get a concrete walkthrough of how ePay can support payments in gaming and gambling - from deposits and payouts to risk, compliance and player experience.