CheckoutCreate

POSThttps://api.twisto.cz/psp/smi/checkouts
POSThttps://api.twisto.pl/psp/smi/checkouts

Create a checkout - customer is then redirected to our gateway to finish the order

Security: Bearer Auth

Provide your bearer token in the Authorization header when making requests to protected resources.
Example: Authorization: Bearer 123

Request body

  • type: string
    Allowed values: standard pay-in-three 
    Default: standard
  • config: object
    • redirect_uri: string
      required
      <= 1000 characters
  • shopper: object
    • first_name: string or null
      <= 40 characters
    • middle_name: string or null
      <= 40 characters
    • last_name: string or null

      Last name, first last name for ES

      <= 40 characters
    • last_name2: string or null

      Second last name, ES only

      <= 40 characters
    • phone: string or null
      <= 20 characters
    • birth_date: string<date> or null
    • billing_address: object or null
    • statistics: object or null
    • personal_id: string or null

      Unique personal identifier

      <= 11 characters
    • email: string
      required
  • order: object
    • reference: string

      The reference for this checkout, used in settlement (unique payment reference in your store, random if not specified)

      <= 200 characters
    • amount: string<decimal>
      required
      Match pattern: ^-?\d{0,8}(?:\.\d{0,2})?$
    • currency: string
      required

      ISO-4217 currency code

      >= 3 characters <= 3 characters
    • items: array[object]
      • name: string
        required
        <= 255 characters
      • amount: string<decimal>
        required
        Match pattern: ^-?\d{0,8}(?:\.\d{0,2})?$
      • quantity: integer
        required
        >= 1
      • reference: string
        <= 200 characters
      • type: string
        required
        Allowed values: sku tax shipping discount store_credit 

Request Body example

{ "type": "pay-in-three", "config": { "redirect_uri": "string" }, "shopper": { "first_name": "string", "middle_name": "string", "last_name": "string", "last_name2": "string", "phone": "string", "birth_date": "2022-12-31", "billing_address": { "line1": "string", "line2": "string", "city": "string", "state": "string", "postal_code": "string", "country": "st" }, "statistics": { "account_created": "string", "last_login": "string", "sales_total_count": 727, "sales_total_amount": "string", "sales_avg_amount": "string", "sales_max_amount": "string", "refunds_total_amount": "string", "currency": "str", "has_previous_purchases": false, "previous_chargeback": true, "fraud_check_result": "string" }, "personal_id": "string", "email": "string" }, "order": { "reference": "string", "amount": "586.00", "currency": "str", "items": [ { "name": "string", "amount": "73.00", "quantity": 84, "reference": "string", "type": "store_credit" } ] } }

Responses

Body

  • id: string
    required
  • uri: string
    required
  • type: string
    Allowed values: standard pay-in-three 
    Default: standard
  • config: object
    • redirect_uri: string
      required
      <= 1000 characters
  • created: string<date-time>
    required
  • settled: string<date-time>
  • state: string
    required
    Allowed values: created approved completed cancelled error 
  • shopper: object
    • first_name: string or null
      <= 40 characters
    • middle_name: string or null
      <= 40 characters
    • last_name: string or null

      Last name, first last name for ES

      <= 40 characters
    • last_name2: string or null

      Second last name, ES only

      <= 40 characters
    • phone: string or null
      <= 20 characters
    • birth_date: string<date> or null
    • billing_address: object or null
    • statistics: object or null
    • personal_id: string or null

      Unique personal identifier

      <= 11 characters
    • email: string
      required
  • order: object
    • reference: string

      The reference for this checkout, used in settlement (unique payment reference in your store, random if not specified)

      <= 200 characters
    • amount: string<decimal>
      required
      Match pattern: ^-?\d{0,8}(?:\.\d{0,2})?$
    • currency: string
      required

      ISO-4217 currency code

      >= 3 characters <= 3 characters
    • items: array[object]
      • name: string
        required
        <= 255 characters
      • amount: string<decimal>
        required
        Match pattern: ^-?\d{0,8}(?:\.\d{0,2})?$
      • quantity: integer
        required
        >= 1
      • reference: string
        <= 200 characters
      • type: string
        required
        Allowed values: sku tax shipping discount store_credit 

Response example

{ "id": "string", "uri": "string", "type": "pay-in-three", "config": { "redirect_uri": "string" }, "created": "string", "settled": "string", "state": "cancelled", "shopper": { "first_name": "string", "middle_name": "string", "last_name": "string", "last_name2": "string", "phone": "string", "birth_date": "2022-12-31", "billing_address": { "line1": "string", "line2": "string", "city": "string", "state": "string", "postal_code": "string", "country": "st" }, "statistics": { "account_created": "string", "last_login": "string", "sales_total_count": 405, "sales_total_amount": "string", "sales_avg_amount": "string", "sales_max_amount": "string", "refunds_total_amount": "string", "currency": "str", "has_previous_purchases": true, "previous_chargeback": false, "fraud_check_result": "string" }, "personal_id": "string", "email": "string" }, "order": { "reference": "string", "amount": "801.00", "currency": "str", "items": [ { "name": "string", "amount": "737.00", "quantity": 703, "reference": "string", "type": "shipping" } ] } }