Skip to content

Schemas

PaymentCreationRequest

Properties

NameTypeRequiredRestrictionsDescription
currencystringtruenoneTransaction currency (3 letter ISO 4217 code), e.g. EUR. Accepted values: EUR, BGN, CZK, DKK, HUF, ISK, CHF, NOK, PLN, RON, SEK, GBP.
amountintegertruenoneTransaction amount in cents
labelstringfalsenonePurchase description (optional but recommended).
This value is used as the bank reference, so it is good to have it.
Characters other than letters, digits and spaces are replaced with spaces.
If null, order_ref is used; failing that shop_name, then your registered company name.
order_refstringfalsenoneThe reference or ID of the transaction on the merchant part, can be used to identify which transaction is associated with Huch transaction.
shop_namestringfalsenoneOverrides the merchant name displayed on the Hosted Payment Page. Useful if you operate several brands under one account.
website_urlstringfalsemust be a valid URLThe URL of the shop the payment originates from.
payment_ttlintegerfalsebetween 1800 and 604800Validity duration of the payment in seconds. Example:
1800 → 30 minutes
604800 → 7 days (default)
Min Value: 1800 (30 minutes)
Max Value: 604800 (7 days)
Once elapsed the payment moves to EXPIRED.
merchant_idstringfalsenoneDerived from the credentials used to obtain your access token. Any value sent in the body is ignored and replaced with the merchant that owns the token.
success_urlstringfalsenoneURL where the user is sent when the payment is successfully completed. Not enforced by the API, but required in practice — without it the customer has nowhere to return to. (success_url, decline_url and pending_bank_confirmation_url can be the same)
pending_bank_confirmation_urlstringfalsenoneURL where the user is sent after completing the payment while pending bank confirmation. Not enforced by the API, but required in practice. (success_url, decline_url and pending_bank_confirmation_url can be the same)
decline_urlstringfalsenoneURL where the user is sent if the payment is declined or failed. Not enforced by the API, but required in practice. (success_url, decline_url and pending_bank_confirmation_url can be the same)
redirect_url deprecatedstringfalsenoneURL where the user will be sent after completing the payment.
allow_bank_changebooleanfalsenoneWhether the customer may pick their bank on the Hosted Payment Page. Defaults to true. Send false to pre-select the bank yourself — bank_id and bank_country_code then become required. See Ignore bank selection.
bank_idstringfalserequired when allow_bank_change is falseBank identifier code (e.g. revolut_eu).
bank_country_codestringfalserequired when allow_bank_change is false
max 2 characters
Two-letter ISO 3166-1 alpha-2 country code for the bank (e.g. DE).
customer_ibanstringfalsemin 16 charactersCustomer IBAN, used to detect their bank (e.g. DE89370400440532013000).
payee_iban_idstringfalsemust be an IBAN registered to your accountDirects settlement to one of your own registered IBANs instead of your primary one. Rejected with "Unauthorized IBAN specified." if the IBAN does not belong to your merchant account.
webhook_urlstringfalsemust be a valid HTTPS URLOptional per-transaction webhook endpoint. If provided, webhook events are sent to this URL; otherwise, the merchant-level configured webhook URL is used.
customer_emailstringfalsenoneAn email address, to help identify the customer. Example: email@email.com. Recommended — it improves the customer experience by reducing the number of screens shown on later transactions.
customer_phone_numberstringfalsenonePhone number of the customer
customer_billing_infoobjectfalsenoneCustomer billing information
customer_billing_info.customer_birth_datestringfalsenoneDate of birth of the customer (DD-MM-YYYY format)
customer_billing_info.customer_genderstringfalseMALE, FEMALE or OTHERGender of the customer. Must be upper-case — male is rejected.
customer_billing_info.customer_first_namestringfalsenoneFirst name of the customer
customer_billing_info.customer_last_namestringfalsenoneLast name of the customer
customer_billing_info.customer_street_addressstringfalsenoneStreet address of the customer (ex: 8 Rue de Paris)
customer_billing_info.customer_citystringfalsenoneCity of the customer (ex: Paris)
customer_billing_info.customer_postcodestringfalsenonePostal code of the customer (ex: 75001)
customer_billing_info.customer_country_alpha_2stringfalsemax 2 charactersIso code "3166-1 alpha-2" (ex: FR)
customer_billing_info.customer_region_alpha_2stringfalsemax 2 charactersIso code "3166-1 alpha-2" (ex: GF)
customer_billing_info.customer_ip_addressstringfalsenoneIP address of the customer (ex: 192.168.1.1)

Example responses

json
{
  "currency": "EUR",
  "amount": 100,
  "label": "AnotherTest",
  "success_url": "https://myshop.com/checkout/success",
  "pending_bank_confirmation_url": "https://myshop.com/checkout/pending",
  "decline_url": "https://myshop.com/checkout/declined",
  "order_ref": "42837M",
  "customer_email": "customer@example.com",
  "customer_phone_number": "+1234567890",
  "customer_billing_info": {
    "customer_birth_date": "1990-01-01",
    "customer_gender": "MALE",
    "customer_country_alpha_2": "US",
    "customer_region_alpha_2": "CA",
    "customer_city": "Los Angeles",
    "customer_street_address": "123 Main St",
    "customer_postcode": "90001",
    "customer_first_name": "John",
    "customer_last_name": "Doe",
    "customer_ip_address": "192.168.1.1"
  },
  "webhook_url": "https://store1.merchant.com/huch/webhook"
}

Payment

Properties

NameTypeRestrictionsDescription
payment_idstringnonePayment ID
payment_statusstringnonePayment status
status_infostringnoneExplanation about the current status of the payment
currencystringnonePayment currency
amountintegernonePayment amount in cents
urlstringnonePayment URL
status deprecatedstringnoneOld payment status. Deprecated, use payment_status
qr_code deprecatedstringnoneQR code as SVG string. Deprecated, use url

Example responses

json
{
 "payment_status": "NEW",
  "status_info": "Transaction has just been initiated. No customer action yet.",
  "payment_id": "baebe473-f55b-49cf-aa06-e62b6ca99008",
  "type": "WIRE_TRANSFER",
  "status": "PENDING",
  "isoStatus": null,
  "currency": "EUR",
  "amount": 100,
  "label": "TestTransaction",
  "merchant_id": "9abc92d0-49b5-4727-9a8e-86930ca42a7f",
  "merchant_name": "Test Merchant",
  "url": "https://sandbox.huch.tech/pay/baebe473-f55b-49cf-aa06-e62b6ca99008",
  "is_mobile_platform": null,
  "order_ref": "42837M",
  "environment": "SANDBOX",
  "redirect_url": "https://myshop.com/checkout/payment-pending?payment_id=baebe473-f55b-49cf-aa06-e62b6ca99008"
}

PaymentStatus

Enumerated Values

NameTypeRequiredRestrictionsDescription
anonymousstringfalsenonePayment status
PropertyValueDescription (status_info)Is it a final status?
anonymousNEWPayment has just been initiated. No customer action yet.No
anonymousPENDINGPayment ongoing. Waiting for customer to complete payment.No
anonymousBANK_CONNECTION_FAILEDBANK CONNECTION FAILED: Unable to contact the bank. You can still retry with another bank.No
anonymousAWAITING_CONFIRMATIONAwaiting bank verification or customer action on the bank side.No
anonymousPROCESSINGPayment is being processed by the bank. Settlement has not been done yet. Be aware that it can be REJECTED.No
anonymousFORCE_PAIDPayment has been manually marked as accepted.Yes
anonymousPAIDPayment has been accepted by the bank and funds transfer is ongoing. In rare cases, banks can block these transfers for AML issues.Yes
anonymousPAID_RECEIVEDPayment has been accepted by the bank and received into your bank account.Yes
anonymousEXPIREDCustomer did not complete the payment before the payment validity period elapsed.Yes
anonymousCANCELLEDCustomer abandoned the payment.No
anonymousFAILEDCancelled or rejected by the bank.Yes
anonymousAUTH_FAILEDError on authentication with the bank.Yes
anonymousEXECUTE_FAILEDBank error while executing the payment.Yes

Example responses

json
{
 "payment_status": "NEW",
  "status_info": "Transaction has just been initiated. No customer action yet.",
  "payment_id": "baebe473-f55b-49cf-aa06-e62b6ca99008",
  "type": "WIRE_TRANSFER",
  "status": "PENDING",
  "isoStatus": null,
  "currency": "EUR",
  "amount": 100,
  "label": "TestTransaction",
  "merchant_id": "9abc92d0-49b5-4727-9a8e-86930ca42a7f",
  "merchant_name": "Test Merchant",
  "url": "https://sandbox.huch.tech/pay/baebe473-f55b-49cf-aa06-e62b6ca99008",
  "is_mobile_platform": null,
  "order_ref": "42837M",
  "environment": "SANDBOX",
  "redirect_url": "https://myshop.com/checkout/payment-pending?payment_id=baebe473-f55b-49cf-aa06-e62b6ca99008"
}

CreateUpdateEventSubscription

Properties

NameTypeRequiredRestrictionsDescription
urlstringtruenoneNotification URL

Example responses

json
{
  "url": "https://example.com/endpoint"
}

EventSubscriptionResponse

Properties

NameTypeRequiredRestrictionsDescription
event_subscription_idstringfalsenoneEvent subscription identifier
merchant_idstringfalsenoneMerchant identifier
event_typestringfalsenoneEvent type
urlstringfalsenoneURL

Example responses

json
{
  "event_subscription_id": "c45d2660-91e4-4166-ab76-f37f89fdb81e",
  "merchant_id": "c45d2660-91e4-4166-ab76-f37f89fdb81e",
  "event_type": "payment.status.changed",
  "url": "https://example.com/endpoint"
}

Wallet Top-Up Strategy:

In specific industries like iGaming, merchants may opt to top up customers' wallets upon receiving PROCESSING status. Customers can use these funds to play, but withdrawals are restricted until PAID (after verification of funds) or PAID_RECEIVED status is confirmed. This approach balances customer experience with financial security considerations.

Additional parameters

Force country selection

You can choose a country by default by adding country parameter to the payment URL

Default example URL: "url":

http
"https://pay.huchpay.com/pay/9f63887f-a2cc-48c5-acca-b5cc6474944c"

Example URL for select France (iso code: FR) "url":

http
"https://pay.huchpay.com/pay/9f63887f-a2cc-48c5-acca-b5cc6474944c?country=FR"

Example URL to select Germany (iso code DE) "url":

http
"https://pay.huchpay.com/pay/9f63887f-a2cc-48c5-acca-b5cc6474944c?country=DE"

Change displayed merchant name

If you have many brands, you can display a different displayed merchant name for each transaction.

You should just add the shop_name parameter to your payload on "Create payment" request.

Here is a payload example to display “Amazon” as a merchant name.

Body parameter

json
{
  "currency": "EUR",
  "amount": 100,
  "label": "AnotherTest",
  "shop_name": "Amazon",
  "success_url": "https://myshop.com/checkout/success",
  "pending_bank_confirmation_url": "https://myshop.com/checkout/pending",
  "decline_url": "https://myshop.com/checkout/declined",
  "order_ref": "42837M",
  "customer_email": "customer@example.com",
  "customer_phone_number": "+1234567890",
  "customer_billing_info": {
    "customer_birth_date": "1990-01-01",
    "customer_gender": "MALE",
    "customer_country_alpha_2": "US",
    "customer_region_alpha_2": "CA",
    "customer_city": "Los Angeles",
    "customer_street_address": "123 Main St",
    "customer_postcode": "90001",
    "customer_first_name": "John",
    "customer_last_name": "Doe",
    "customer_ip_address": "192.168.1.1"
  },
  "webhook_url": "https://store1.merchant.com/huch/webhook"
}

Payment buttons

A good payment button can create reinsurance and incite customers. We have a panel of available payment buttons in SVG available for use. Feel free to ask your account manager.

an image