api

Contract Create

Changed on

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

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.

billing_address_rawunknown
shipping_address_rawunknown
delivery_location'HOME' | 'WORK' | 'IN_STORE' | 'COLLECTION_POINT' | 'null' nullable

Where the customer receives the goods or service for this basket. HOME = the customer's home address. WORK = the customer's workplace. IN_STORE = collected from the merchant's own store or branch. COLLECTION_POINT = a third-party pickup point or parcel locker. Applies to the whole basket. Omit it if none of the values fit.

  • HOME - HOME
  • WORK - WORK
  • IN_STORE - IN_STORE
  • COLLECTION_POINT - COLLECTION_POINT
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

additional_dataunknown
allowed_termsinteger[] nullable
configunknown
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

Changes

    • warning

      removed the request property / (media type: application/json)

    • warning

      removed the request property / (media type: application/x-www-form-urlencoded)

    • warning

      removed the request property / (media type: multipart/form-data)

    • info

      added the new optional request property (media type: application/json)

    • info

      added the new optional request property (media type: application/x-www-form-urlencoded)

    • info

      added the new optional request property (media type: multipart/form-data)

    • info

      the request property / became optional (media type: application/json)

    • info

      the request property / became optional (media type: application/x-www-form-urlencoded)

    • info

      the request property / became optional (media type: multipart/form-data)

    • info

      the request property default value DEFAULT was added (media type: application/json)

    • info

      the request property default value DEFAULT was added (media type: application/x-www-form-urlencoded)

    • info

      the request property default value DEFAULT was added (media type: multipart/form-data)