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.

๐Ÿ“ฅ 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" }

๐Ÿ”„ 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.

โŒ 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" }

๐Ÿ’ธ 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.

๐Ÿงช 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.gr/

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.

๐Ÿ“ž Support & Contact

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

Contact us: Fintech Team

Last modified: 17 June 2026