v1

latestOpenAPI 3.0.32026-07-24164965.8 KB
api

Contract Create

An endpoint that accepts an application payload for a customer wishing to enter a buy-now-pay-later journey. The endpoint returns a redirect URL that takes the customer through a series of screens to complete the process.

post/api/checkout/v1/init/

Request body

amount_format'MINOR_UNIT' | 'DECIMAL' required

The format of the amount provided. MINOR_UNIT = amount is an integer of the minor unit of the currency. eg 1000 is 10CHF. DECIMAL = Decimal representation as string. e.g. "10.00" is 10CHF

  • MINOR_UNIT - MINOR_UNIT
  • DECIMAL - DECIMAL
order_referencestring

A reference number/code that is unique to this order

order_descriptionstring

High-level description of the order for the user.

{"stackTrail":"components:schemas:InitiateCheckout:properties:billing_address_raw","oasType":"schema","type":"unknown","description":"We recommend supplying this parameter as it may allow us to correct errors in the provided address format and increase the likelihood of credit checks passing. This field should contain the billing address serialized in the native format of the ecommerce platform being used."}
{"stackTrail":"components:schemas:InitiateCheckout:properties:shipping_address_raw","oasType":"schema","type":"unknown","description":"We recommend supplying this parameter as it may allow us to correct errors in the provided address format and increase the likelihood of credit checks passing. This field should contain the shipping address serialized in the native format of the ecommerce platform being used."}
locale'en' | 'fr' | 'de' | 'it'

Deprecated. Use language instead.

  • en-gb - British English
  • fr - French
  • de - German
  • it - Italian
language'en' | 'fr' | 'de' | 'en-gb' | 'it'

If provided, it must be in ISO 639-1. For example:

  • en - English
  • fr - French
  • de - German
  • en-gb - British English
  • it - Italian
store_idstring

A reference number/code that the merchant assigns to a store

store_namestring

The merchant store name, stored on the merchant user object

store_numberstring

The merchant store number, stored on the merchant user object

{"stackTrail":"components:schemas:InitiateCheckout:properties:additional_data","oasType":"schema","type":"unknown"}
allowed_termsinteger[] nullable
{"stackTrail":"components:schemas:InitiateCheckout:properties:config","oasType":"schema","type":"unknown"}
merchant_user_uuidstring uuid nullable
delay_finalisationboolean

Pass True to override the delayed finalisation setting. With delayed finalisation of the contract the merchant later confirms availability of the goods with payment captured only upon confirmation

financial_product_type'BNPL' | 'CREDIT'

If provided, it must be BNPL or CREDIT

  • BNPL - BNPL
  • CREDIT - CREDIT
pricing_structure_codestring nullable
order_discount_amountstring decimal nullable

Order Discount Amount in decimal format (2dp)

service_start_datestring date nullable

For service products, this is the date the service starts format: YYYY-MM-DD.

service_end_datestring date nullable

For service products, this is the date the service ends format: YYYY-MM-DD.

bank_account_numberstring

Bank account number for the customer if applicable.

Response

action'REDIRECT' required
  • REDIRECT - REDIRECT
redirect_urlstring uri required

URL to redirect the user to to complete their HeidiPay checkout.

application_uuidstring uuid required
external_contract_uuidstring uuid required
risk_status'credit_check_decline' | 'id_check_decline' | 'address_not_found_decline' | 'success' | 'null' nullable

Risk status of any risk tests that run before the customers enter the checkout.

  • credit_check_decline - credit_check_decline
  • id_check_decline - id_check_decline
  • address_not_found_decline - address_not_found_decline
  • success - success