Skip to content

Create Checkout

Request

Creates a Checkout Session.

Required scope: checkout:create

Security
accountId and apiKey
Bodyapplication/jsonrequired

Checkout request details

typeArray of strings, non-empty(CheckoutPaymentTypesRequest)required

Only the first value in the Array is considered (e.g. ['single', 'frequent'] would be equivalent to ['single']).

Items Enum:"single""frequent""subscription"
paymentobject(CheckoutPaymentObjectRequest)required

Describing the payment configuration.

orderobject(CheckoutOrderResponse)

Order represent the order/cart being paid. Order is required if type is one single or subscription.

customerobject(Customer)

The customer details.

curl -i -X POST \
  https://api.test.easypay.pt/2.0/checkout \
  -H 'AccountId: 2b0f63e2-9fb5-4e52-aca0-b4bf0339bbe6' \
  -H 'ApiKey: eae4aa59-8e5b-4ec2-887d-b02768481a92' \
  -H 'Content-Type: application/json' \
  -d '{
    "type": [
      "single"
    ],
    "payment": {
      "methods": [
        "MB",
        "CC",
        "MBW",
        "DD",
        "VI",
        "AP",
        "GP",
        "SW"
      ],
      "type": "sale",
      "capture": {
        "descriptive": "Descriptive Example"
      },
      "expiration_time": "2025-06-12 11:24",
      "currency": "EUR",
      "key": "Example Key",
      "sdd_mandate": {
        "iban": "PT50002700000001234567833",
        "name": "Name Example",
        "email": "customer@example.com",
        "phone": "911234567",
        "account_holder": "Account Name Example"
      },
      "max_value": 20,
      "min_value": 2,
      "unlimited_payments": false,
      "frequency": "1W",
      "max_captures": 10,
      "start_time": "2025-06-12 11:24",
      "failover": true,
      "capture_now": true,
      "retries": 2,
      "multibanco": {
        "product": "SPG",
        "start_time": "2025-07-25T10:22:53Z",
        "expiration_time": "2025-08-24T10:22:52Z"
      }
    },
    "order": {
      "items": [
        {
          "description": "Item in Shopping Cart",
          "quantity": 2,
          "key": "Example Key",
          "value": 17.5
        }
      ],
      "key": "Example Key",
      "value": 17.5
    },
    "customer": {
      "name": "Customer Example",
      "email": "customer@example.com",
      "phone": "911234567"
    }
  }'

Responses

Created

Bodyapplication/json
idstring, (uuid)

UUID of the checkout.

Example:"5db36b83-0664-4bc4-a760-7040ac3726f0"
sessionstring

Session token to be used by the rest of the Checkout process.

Example:"PX2duB7zMRISp6WrKdkOHLcvhIj-7-yUXMYHDQf5k7L5b5mA3D_m5TCdsYT-mCOaALGw4k95I_gjYQS-tcsxAAjTqU4G0UM5sd2o5wdGTGOOuoZVv0CwmiBwhUY9j4Dq4MDryEEPXtqMHEYi7PJz7
configany or null
Response
{ "id": "10d3a41a-c9c4-486e-8da7-9490e5f097b7", "session": "XkhRqoQtbBakUnjEJA4lYSCtboITWSb-ijxRMWKj7C9ormZ_4JubSB3qjy4XuORJFSrR0OsQ0ypE2Ws9Zl0N2REmR0CMNewH8ghyR1NBnPzDJ1AAuj9LvAhdv9SS-MXRh20_jmVz0MTcaD6E9WfHMiGSyej8eLMaE2hbSHn8DAO7kUSy8nzIIIUbR3pbpEpwxeO6fgHB3hdLGWrGUjeRq-Dq1Q_RF_ZWDPOGPwehXb3YRTatcjBG_2yoyGWWBaABOlkOx_uLaZIdrHMRXaDwLFDoN-eiu3BH1KKrut6pcE_Gc6laTf2AINBQIuSzKHLT4MFpTkrxdfPiD67w8aENm2HuzFc08I46KxdQG-2dSN522jZWDC2z4r4HFZ8LWVlDPuLbpui-WoWOJrJAnW3nPhyaKfUeu4KuU3BKYtJrtOoqs5ingkKWen0jm6AuFeZDeYRlRtj19S6d3P4q7Om3PVwil7c0K0brq31SmLHZdvsG_gHOPSZ6qrQy_95NZO0x934tBIUK91C1Bnm1Z9wA2Pp2hIeprOXMuZXkuanODro=", "config": null }