Home Credit Partner API

website·Indexed 29 days ago

https://various-fixes.hc-docs.pages.dev/

Technical documentation for the Home Credit Partner API (including version 3.4.0), providing specifications for financing applications, installment program calculations, precheck scorings, and order management. Includes guides on partner authentication, JavaScript widget integration, and GDPR compliance.

Tokens
28K
Snippets
110
Records
190
Agent score
74%

What's inside Home Credit

  1. Choose a payment calculator implementation method

    There are three ways to implement the payment calculator in production:

    1. Partner's own solution: Built using Home Credit calculation endpoints. Offers full control over UX/UI but is the most developmentally demanding.
    2. JavaScript Widget: A hybrid approach using a Home Credit JS widget for the frontend and calculations, while the partner's backend handles the loan application endpoint call. Widget source: https://github.com/homecreditcz/widget-calculator
    3. External Repayment Calculator: A simple redirection to a Home Credit hosted page. Required for 'Tipař' mode partners.
  2. Migrate ApplicationRequest from v1 to v3

    The ApplicationRequest data structure has undergone major changes between v1 and v3. The primary change is the introduction of customer type distinctions, moving from supporting only natural persons to supporting three distinct types: Natural Persons (PERSON), Self-employed persons (ENTREPRENEUR), and Legal entities (LEGAL_ENTITY).

    Key structural changes include:

    • Customer Object: Now requires a type field. Data is nested within type-specific objects (person, entrepreneur, or legalEntity) rather than being flat.
    • Financed Subject: Order details have been moved into a financedSubject object, which supports both STANDARD and BROKERED order types.
    • Origination Context: Redirect URLs and notification endpoints have been moved from merchantUrls to originationContext.channel.online.
    {
      "customer": {
        "type": "PERSON|ENTREPRENEUR|LEGAL_ENTITY",
        "person": {
          "firstName": "string",
          "lastName": "string",
          "contacts": [
            {
              "type": "EMAIL|MOBILE|PHONE",
              "email": { "value": "string" }
            }
          ],
          "addresses": [
            {
              "city": "string",
              "flags": ["PERMANENT|CONTACT"]
            }
          ]
        },
        "entrepreneur": {
          "businessName": "string",
          "businessIdentificationNumber": "string"
        },
        "legalEntity": {
          "businessName": "string",
          "businessIdentificationNumber": "string"
        }
      },
      "financedSubject": {
        "type": "ORDER",
        "order": {
          "type": "STANDARD|BROKERED",
          "totalPrice": { "value": 100, "currency": "USD" },
          "financings": [
            {
              "type": "INSTALLMENT",
              "installment": { "preferredMonths": 12 }
            }
          ]
        }
      },
      "originationContext": {
        "channel": {
          "type": "ONLINE",
          "online": {
            "approvedRedirect": "string",
            "rejectedRedirect": "string",
            "notificationEndpoint": "string"
          }
        }
      }
    }
  3. Implement Merchant Site Resource APIs for HC Notifications

    Partner e-shops must develop and expose a specific set of APIs to allow HC (Headless Commerce) to asynchronously notify them about important changes regarding applications and orders. Unlike standard APIs, these endpoints are NOT provided by HC; they must be implemented by the partner to accept incoming calls from HC.
  4. Configure the Origination Context for API requests

    The originationContext object provides metadata about the request environment and channel. For ONLINE channels, you must provide redirect URLs for approved and rejected applications, as well as a notification endpoint for callbacks.
    {
      "originationContext": {
        "channel": {
          "type": "ONLINE",
          "online": {
            "approvedRedirect": "https://example.com/success",
            "rejectedRedirect": "https://example.com/fail",
            "notificationEndpoint": "https://example.com/webhook"
          }
        },
        "precheckIds": ["id1", "id2"],
        "sourceId": "web-store-01",
        "extendedData": [
          { "key": "custom_field", "value": "custom_value" }
        ]
      }
    }
  5. Utilize v3 workflow and context features

    Version v3 introduces new fields to improve process tracking:

    • workflowSteps[]: Found in the response, providing structured information about the next steps in the process.
    • Origin Context: New structure for tracking request sources including precheckIds (link to pre-check), sourceId (campaign identifier), and extendedData (UTM parameters and tracking info).