Entersoftone Fintech Help

Payhub API

๐ŸŒŸ Introduction

What is Payhub?

Payhub is a cloud-based payment orchestration platform that connects business platforms (like ERP, CRM, or e-commerce systems) with various payment service providers. It streamlines the entire lifecycle of payment request creation, execution, and monitoring.

Key Features

  • Unified API for multiple payment providers (e.g., DIAS, Paygate, Onepay, Klarna, Worldline)

  • Webhook support for real-time transaction updates

Who Should Use This API?

This API is designed for developers and integrators working with:

  • ERP, CRM, or e-commerce platforms

  • Businesses needing to automate or embed payment workflows

๐Ÿ” Authentication & Authorization

  • User Registration & Login via IdentityServer:
    Users are registered and authenticated through IdentityServer during the onboarding process. Login provides access to the Payhub portal.

  • Accessing the API Using API Key:
    Once registered, users are issued an API Key that must be included in the request headers to authenticate API calls.

  • System-level access using a System Key:
    Internal company systems (e.g. EBS Cloud) authenticate to system-level endpoints (e.g. GET /modules) using a per-System API key in the x-system-key header, separate from the per-merchant x-api-key.

๐Ÿ“ฅ Creating a Payment Request

๐Ÿ’ก Flow: Payment Request Flow

This diagram illustrates the process of creating a payment request through the business platform, Payhub, and the payment provider.

Payhub DBPayment Service Provider(DIAS / Paygate / Onepay / Worldline)PayhubBusiness Platform(CRM / ERP / e-Commerce)Payhub DBPayment Service Provider(DIAS / Paygate / Onepay / Worldline)PayhubBusiness Platform(CRM / ERP / e-Commerce)UserRequest to create a Payment RequestPOST "Create Payment Request" to the APIForward request to create Payment RequestReturn Payment Request data(ID, Code, Link)Save Payment RequestReturn Payment Request data(ID, Code, Link)Store Payment RequestNotify that the Payment Request was createdUser

๐Ÿ”— API Endpoint & Details

For full API specifications, required fields, supported providers, example requests/responses, and error handling, please refer to the Payment Request.

๐Ÿ’ณ Processing a Payment

๐Ÿ’ก Flow: Payment Flow

This diagram outlines the flow of a typical payment process from the client to the business platform via the payment provider and Payhub.

Payhub DBBusiness Platform(CRM / ERP / e-Commerce)PayhubPayment Service ProviderPayhub DBBusiness Platform(CRM / ERP / e-Commerce)PayhubPayment Service ProviderClientUserMake a paymentApply balance changes to the accountNotify about paymentSave payment recordTrigger payment notificationvia webhook URL set by the UserStore payment dataNotify that the payment has been receivedClientUser

๐Ÿงช Example of a payment notification payload sent to your webhook:

{ "paymentRequestId": 54321, "paymentId": 98765, "provider": "dias", "bankOrderId": "DIAS-2025-5678", "amount": 250.5, "type": "payment", "paymentRequestCode": "RF98765432109876543", "createdAt": "2025-11-20T13:09:21.3230000", "metadata": { "invoiceNumber": "INV-2026-0001", "orderId": "SO-4567", "priority": 1, "isVip": true } }

๐Ÿ”„ Handling Provider Callbacks

Payhub receives callbacks from the payment provider once a transaction is completed. These callbacks include essential payment metadata such as transaction ID, amount, status, and timestamp.

๐Ÿ“ฌ Webhook Notifications to Business Platforms

After recording the payment, Payhub sends a webhook to the business platform using the user-defined URL. The webhook contains all necessary data for the platform to identify and process the transaction.

If a webhook delivery fails, Payhub retries notification delivery asynchronously.

๐Ÿ” Merchant Return URL Redirect

For providers where Payhub owns the return page (Level = Payhub in the table below), once checkout completes Payhub redirects the payer's browser to the registration's returnUrlOk/returnUrlNok, appending paymentRequestId as a query parameter, e.g. https://merchant.example.com/checkout/success?paymentRequestId=54321. If a Payment row was created for that attempt, paymentId is appended too, e.g. ...?paymentRequestId=54321&paymentId=98765. Use it to identify the exact attempt in the payments array returned by GET /payment/request/{paymentRequestId} when more than one payment exists for the same request (e.g. after a retry).

For providers where the redirect is configured at the Merchant level, the provider redirects the payer directly and Payhub is not in the loop — neither query parameter is appended, since Payhub never controls that redirect.

๐Ÿ”€ Return URL support by provider

Provider

Return URL

Level

DIAS (bank file)

No

–

DIAS (IRIS)

Yes

Payhub

OnePay

Yes

Payhub

PayGate

Yes

Payhub

Klarna

No

–

Worldline

Yes

Payhub

Viva

No

–

Nexi

Yes

Payhub

Worldline's hosted Paylink checkout page redirects the payer's browser back to Payhub, which then forwards to the merchant's returnUrlOk/returnUrlNok. In the Worldline back-office, set both the "Paylink Confirm Url" and "Paylink Cancel Url" fields to Payhub's return endpoint — the actual outcome is decided from the status field in the redirect, not by which of the two URLs was configured:

POST/GET /api/payhub/v1/payment/worldline/return
Payhub DBPayhubWorldline(Paylink hosted page)Payhub DBPayhubWorldline(Paylink hosted page)alt[digest valid and status = CAPTURED/AUTHORIZED][digest invalid or status = CANCELED/REFUSED/ERROR]PayerMerchant SiteComplete or cancel checkoutPOST/GET /api/payhub/v1/payment/worldline/return{orderid, status, digest, txId, ...}Look up PaymentRequest by orderidVerify digestSave Payment (status = pending capture, keyed by txId)Redirect to returnUrlOk?paymentRequestId=...&paymentId=...Redirect to returnUrlNok?paymentRequestId=...PayerMerchant Site

โŒ Cancelling a Payment (Klarna Only)

๐Ÿ’ก Cancellation Overview

Payhub supports cancellation of Klarna payment sessions before the customer completes the payment. This feature allows both customers and registration owners (merchants) to cancel ongoing payment sessions.

โœ… Cancellation Rules

Who Can Cancel?

  • Client (Customer): Can cancel their own payment session through Klarna app

  • Registration Owner (Merchant): Can cancel any payment session in their system through Payhub API

๐Ÿ’ก Flow: Customer-Initiated Cancellation

This diagram shows how a customer cancels their payment session through Klarna app, and Payhub notifies the business platform.

Business Platform(CRM / ERP / e-Commerce)PayhubKlarna Payment ProviderBusiness Platform(CRM / ERP / e-Commerce)PayhubKlarna Payment ProviderCustomerMerchantCancel payment in Klarna appCancel sessionPOST /webhooks/klarna/status{"status": "CANCELED", "session_id": "...}Trigger cancellation notificationvia webhook URL set by the UserNotify the merchant that the payment has been canceled.CustomerMerchant

๐Ÿ’ก Flow: Merchant-Initiated Cancellation

This diagram shows how a merchant (registration owner) cancels a payment session through Payhub API.

Klarna Payment ProviderPayhubBusiness Platform(CRM / ERP / e-Commerce)Klarna Payment ProviderPayhubBusiness Platform(CRM / ERP / e-Commerce)MerchantCancel payment session(e.g., customer left, timeout)PATCH /api/payhub/v1/payment/request/{paymentRequestId}Body: {"status": "canceled"}with merchant auth tokenVerify merchant owns this paymentCancel Klarna session204 No ContentUpdate payment request status204 No ContentUpdate local payment statusPayment cancelled successfullyMerchant

๐Ÿงช Example of a cancellation notification payload sent to your webhook:

{ "paymentRequestId": 54321, "paymentRequestCode": "RF98765432109876543", "type": "cancellation", "createdAt": "2025-11-20T13:09:21.3230000", "metadata": { "invoiceNumber": "INV-2026-0001", "orderId": "SO-4567" } }

๐Ÿ’ธ Refunding a Payment (Klarna Only)

๐Ÿ’ก Refund Overview

Payhub supports refunding a paid Klarna payment through the new refund endpoint:

  • POST /api/payhub/v1/payment/{paymentId}/refund

The endpoint accepts:

  • Serialnumber header (required)

  • Software header (required)

  • Idempotency-Key header (optional)

  • amount (required; must be greater than 0 and must not exceed the paid payment amount)

  • reason (optional, max 255 chars)

This refund flow is temporary Klarna-only.

On success, the endpoint returns 201 Created with a response payload containing:

  • refundRequestId

  • referenceCode

  • status (Requested, Succeeded, Failed)

  • providerRefundId (optional)

  • paymentId

  • requestedAt

Successful Klarna refunds also return this response header:

  • Refund-Id: the Klarna refund identifier for the created refund

Payhub uses Refund-Id to populate providerRefundId in the JSON response body. The Klarna response body is not used for refund id extraction.

๐Ÿ’ก Flow: Merchant-Initiated Klarna Refund

Klarna Payment ProviderPayhub DBPayhubBusiness Platform(CRM / ERP / e-Commerce)Klarna Payment ProviderPayhub DBPayhubBusiness Platform(CRM / ERP / e-Commerce)alt[Klarna accepted (200/201/202/204)][Klarna rejected (4xx/5xx)][Unexpected error]alt[Validation/ownership/provider checks fail][Validation passes]MerchantRequest refund for a paid payment1POST /api/payhub/v1/payment/{paymentId}/refundHeaders: Serialnumber, Software, Idempotency-Key?Body: {amount, reason?}2Validate API key, registration claim, and Klarna provider3Load payment and related payment request4Create refund request record (requested)5ProblemDetails (400/403/404/409/500) + traceId6Load merchant registration credentials7POST /ordermanagement/v1/orders/{bankOrderId}/refunds{refunded_amount, description}8Success status9201 CreatedHeader: Refund-IdBody: {refundRequestId, referenceCode, status, providerRefundId?, paymentId, requestedAt}10Refund accepted11Rejection response12ProblemDetails (status follows provider error) + traceId13Refund rejected14Error/exception15500 ProblemDetails + traceId16Refund failed17Merchant

โœ… Refund Rules

  • Refund is supported only when provider is klarna.

  • Serialnumber and Software headers are required.

  • Idempotency-Key is optional and passed to Klarna as Klarna-Idempotency-Key when present.

  • Payment must exist and belong to a valid payment request.

  • amount is required and must be greater than 0.

  • amount cannot exceed the selected payment amount.

  • Merchant can only refund payments that belong to their registration.

๐Ÿ”Ž Retrieving Registration Details

๐Ÿ’ก Registration Overview

Payhub exposes a read-only endpoint so business platforms can retrieve the provider and webhook configuration of the registration behind their API key:

  • GET /api/payhub/v1/registration/{registrationId}

Only fields that are safe to expose are returned — no passwords, secrets, application keys, or FTP credentials. A merchant can only retrieve their own registration; the registrationId in the URL must match the registration bound to the calling API key.

๐Ÿ’ก Flow: Merchant Retrieves Registration Details

Payhub DBPayhubBusiness Platform(CRM / ERP / e-Commerce)Payhub DBPayhubBusiness Platform(CRM / ERP / e-Commerce)alt[Registration not found][Registration found]alt[registrationId does not match the caller's registration][registrationId matches]MerchantRequest registration detailsGET /api/payhub/v1/registration/{registrationId}Headers: x-api-key, Serialnumber, SoftwareValidate API key and resolve registration claim403 ProblemDetails + traceIdLoad registration, provider and webhook configuration404 ProblemDetails + traceId200 OKBody: {provider, active, accountName, mid, organisationCode, iban, returnUrlOk, returnUrlNok, webhook}Display registration detailsMerchant

โœ… Registration Rules

  • The registration returned is always the one bound to the caller's API key — a different registrationId in the URL returns 403.

  • Serialnumber and Software headers are required, same as every other API-key endpoint.

  • webhook is null when no webhook endpoint is configured for the registration (not an error).

๐Ÿงช Testing & Environments

๐Ÿ”— API Base URLs

Environment

URL

Sandbox

https://fintech-dev.entersoftone.gr

Production

https://fintech.entersoftone.gr

๐Ÿ”— Payhub URLs

Environment

URL

Sandbox

https://payhub-dev.entersoftone.net/

Production

https://payhub.entersoftone.net/

๐Ÿ”‘ Sandbox Worldline Credentials

  • Sandbox-Url: https://developer.cardlink.gr/login-register/#/register

๐Ÿ”‘ Sandbox Klarna Credentials and QR

  • Username: 3f0fa93f-3302-4009-b749-977834e88e49

  • Password: klarna_test_api_IzVHJHQpeTJJc3QqL3ZlP2d3d3B2P2ppY1Y5VTdKbXosM2YwZmE5M2YtMzMwMi00MDA5LWI3NDktOTc3ODM0ZTg4ZTQ5LDEsOFFQai9mM3ZKRnZIRFV2aUNYVVQ2dDNLM205QkhHaWx4c1hDZGkxRUdLRT0

  • StaticQR

Credit card

  • Credit card number: 4111 1111 1111 1111

  • CVC: 123

  • Expiration date: 12/28 or any other future date in MM/YY format

Debit card

  • Credit card number: 4012 8888 8888 1881

  • CVC: 123

  • Expiration date: 12/28 or any other future date in MM/YY format

๐Ÿ”‘ Sandbox API Key

API Key

Provider

Company

C38E7DF2-6F7F-473C-A197-8F82214ED5AB

Paygate

Softone S.A.

๐Ÿšซ Restrictions

Provider

Restriction

DIAS

Paylink is not available for this provider

DIAS, OnePay

FixedOpen and SplitPay payment types are not supported.

Klarna

Only DynamicQR and StaticQR payment types are supported.

Klarna

OrderLines are mandatory and must contain at least one item.

Klarna

ShortCode is mandatory for StaticQR.

Worldline

Only Fixed payment type is supported.

Worldline

Debtor email is mandatory.

Viva

Amount must be greater than 0.30.

ePay

Only Fixed payment type is supported.

ePay: Fixed payment type only

  • Scope — Applies to every payment request created with "Provider": "epay". ePay accepts the Fixed payment type only; Open, DynamicQR, StaticQR, FixedOpen, and SplitPay are not supported.

  • Impact — A request with any non-Fixed payment type is rejected at validation with 400 Bad Request and the message For epay, payment type must be one of the following: Fixed. The payment request is never forwarded to ePay, so no paylink is issued. Open-amount and QR-based checkouts cannot be created through ePay.

  • Workaround — Send "PaymentType": "Fixed" together with a positive Amount. If you need an open-amount or QR-based flow, route those requests to a provider that supports them (e.g. DIAS or OnePay for Open, Klarna for DynamicQR/StaticQR).

๐Ÿ“ž Support & Contact

If you need help or have feedback, feel free to reach out to us.

Contact us: Fintech Team

Last modified: 06 October 2026