Skip to content

Logo

HUCH

Streamlined Payments, Powered by Open Banking

Supports in this guide: Payments

Provider website: huch.tech


What you need to do for start processing transactions (brief summary)

  1. Choose account type
  2. Get your credentials (from HUCH)
  3. Connect in Dashboard
  4. Send an API request

Choose account type

HUCH can be connected in different ways (depending on your needs):

  • If you do payments -> choose Provider account

If you're not sure which one to use, confirm with your Corefy account manager.


Prerequisites: get from HUCH

Get the following values for your HUCH project/account:

  • Client ID -> Corefy field client_id -> example: 9b1f6c2e-4d7a-4e1b-8c3f-2a5d7e9f1b34 -> where to find: HUCH backoffice / issued by HUCH manager. Used to obtain the API access token and to verify HUCH callback signatures.
  • Client Secret -> Corefy field client_secret -> example: cs_7f3a9c21b8e44d0a -> where to find: HUCH backoffice / issued by HUCH manager. Used together with the Client ID to obtain the API access token.
  • Merchant ID -> Corefy field merchant_id -> example: 4f8a2c1e-9b3d-4e7a-8c5f-1d2e3a4b5c6d -> where to find: HUCH backoffice / issued by HUCH manager. Identifies your HUCH merchant account.
  • API URL (optional) -> Corefy field api_url -> overrides the default HUCH API host -> leave empty unless your account manager tells you otherwise.

Important

Be sure to check with the manager if you require to provide a white list of IPs, and if so, specify IP addresses from the Corefy list.


Payments processing (connect Provider account, create payment-invoice)

Connect Provider account in Corefy Dashboard

Step 1 - Open connection form

Open HUCH in the provider directory and press Connect at HUCH Provider Overview page in the New connection section. Choose Provider account.

Step 2 - Fill in fields and select settings

  • Client ID
  • Client Secret
  • Merchant ID
  • Test mode -> (enable if you are using sandbox credentials)
  • API URL (leave empty unless your account manager tells you otherwise)

Choose Currency and Features. You can set these parameters according to available currencies and features for your HUCH account, but it is necessary to check details of the connection with your Corefy account manager.

Success

You have connected HUCH Provider account!


First request to Corefy API (MIN)

What it does: creates a payment-invoice and redirects the customer to the HUCH payment page, where the payment is completed through the customer's bank (Open Banking).

Payment - MIN

POST /api/payment-invoices

{
  "data": {
    "type": "payment-invoice",
    "attributes": {
      "reference_id": "8e3dbbb0-17af-4c9a-bedb-93bdac6900a2",
      "service": "openbanking_eur_hpp",
      "currency": "EUR",
      "amount": 100,
      "customer": {
        "reference_id": "cus_123",
        "email": "johnsmith@gmail.com"
      }
    }
  }
}

Payment - MAX

POST /api/payment-invoices

{
  "data": {
    "type": "payment-invoice",
    "attributes": {
      "reference_id": "6795502c-e27d-4d07-85e0-93245aab9a3f",
      "service": "openbanking_eur_hpp",
      "currency": "EUR",
      "amount": 100,
      "description": "Order 12345",
      "customer": {
        "reference_id": "cus_123",
        "email": "johnsmith@gmail.com",
        "name": "John Smith",
        "phone": "+34612345678",
        "address": {
          "country": "ES",
          "city": "Madrid",
          "street": "Calle Mayor 1",
          "post_code": "28013"
        }
      }
    }
  }
}

HUCH requires a real customer email for every payment, so customer.email is required. If it is missing, Corefy rejects the payment with INVALID_DETAILS before calling HUCH - unless the customer_email constant is set for the route (see "Constants" below).

With openbanking_eur_hpp the customer chooses the bank on the HUCH payment page. To send the customer straight to a specific bank, use one of the bank-specific services instead (the request is the same, only service changes):

  • santander_eur_hpp - Banco Santander (Spain)
  • bbva_eur_hpp - BBVA (Spain)
  • lacaixa_eur_hpp - CaixaBank (Spain)
  • bancsabadell_eur_hpp - Banco Sabadell (Spain)
  • banco_bpi_eur_hpp - Banco BPI (Portugal)
  • bper_banca_eur_hpp - BPER Banca (Italy)
  • banco_bpm_eur_hpp - Banco BPM (Italy)

Extended request (MAX)

Why add extra fields (typical reasons):

  • Provide additional customer details for compliance/reconciliation
  • Positively influence conversion rate
  • Include optional fields required by your specific flow

Constants (fallback fields)

Constants are static values that Corefy can send to the provider instead of dynamic data from your API request, when those fields are missing in the request.

After the successful connection, fill in constants for necessary routes in editing menu.

Priority (predictable rule):

  1. If a value is present in the request -> Corefy uses the request value
  2. Else if the constant is set -> Corefy uses the constant
  3. Else -> Corefy rejects the payment with INVALID_DETAILS (the customer email is required by HUCH)

Currently available constants (constant -> Corefy API field)

  • customer_email -> customer.email

Refunds

HUCH does not support refunds. Refunds can only be made manually through HUCH support.


Additional info

  1. Callbacks are set up automatically. Corefy sends its callback URL to HUCH with every payment, so there is nothing to configure in the HUCH Merchant Dashboard. Callback signatures are verified with your Client ID, and Corefy also checks the payment status with HUCH on its own.

  2. Bank-specific services. With a bank-specific service, HUCH shows the customer a short confirmation page with the chosen bank and then redirects them to that bank. With openbanking_eur_hpp, the customer picks the bank on the HUCH payment page.

  3. Pending payments. A payment stays pending while the bank is still processing it (HUCH status PROCESSING). If the bank never sends a final status, the payment stays pending - contact HUCH support to resolve it.


FAQ / Troubleshooting

  • Invalid credentials / auth error -> verify Client ID and Client Secret for the chosen environment (sandbox credentials require Test mode enabled)
  • INVALID_DETAILS / "Customer email is required" -> send customer.email in the request or set the customer_email constant for the route
  • INVALID_DETAILS / "[email]: This value is not a valid email address." -> customer.email in the request has an invalid format; it is checked even when the customer_email constant is set
  • Currency or service is not supported -> HUCH processes EUR only; confirm the services enabled for your account with your Corefy account manager
  • Not sure which account type to use? -> ask your Corefy account manager

Question

Still looking for help connecting your HUCH account? Please contact our support team!