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.
๐ 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.
๐งช Example of a payment notification payload sent to your webhook:
๐ 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.
๐ก Flow: Merchant-Initiated Cancellation
This diagram shows how a merchant (registration owner) cancels a payment session through Payhub API.
๐งช Example of a cancellation notification payload sent to your webhook:
๐ธ 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:
Serialnumberheader (required)Softwareheader (required)Idempotency-Keyheader (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:
refundRequestIdreferenceCodestatus(Requested,Succeeded,Failed)providerRefundId(optional)paymentIdrequestedAt
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
โ Refund Rules
Refund is supported only when provider is
klarna.SerialnumberandSoftwareheaders are required.Idempotency-Keyis optional and passed to Klarna asKlarna-Idempotency-Keywhen present.Payment must exist and belong to a valid payment request.
amountis required and must be greater than 0.amountcannot 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-977834e88e49Password:
klarna_test_api_IzVHJHQpeTJJc3QqL3ZlP2d3d3B2P2ppY1Y5VTdKbXosM2YwZmE5M2YtMzMwMi00MDA5LWI3NDktOTc3ODM0ZTg4ZTQ5LDEsOFFQai9mM3ZKRnZIRFV2aUNYVVQ2dDNLM205QkhHaWx4c1hDZGkxRUdLRT0
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