Checkout

Creates a Checkout Session.

Required scope: <code style="background:#e8f0fe;color:#1a73e8;padding:2px 8px;border-radius:12px;font-size:0.85em">checkout:create</code>

post/checkout

Request

  • Base URL
    https://api.test.easypay.pt/2.0
  • Auth
    API key in header AccountId and API key in header ApiKey

Request body

CheckoutRequest required
type, CheckoutPaymentTypesRequest[] required

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

payment, CheckoutPaymentObjectRequest required

Describing the payment configuration.

order, CheckoutOrderResponse

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

customer, CheckoutCustomerRequest

The customer details.

Example request

{
  "payment": {
    "methods": [
      "MBW"
    ],
    "type": "sale",
    "capture": {
      "capture_date": "2026-05-15",
      "splits": {
        "split_key": "Payment of Invoice Nº 1982652",
        "split_descriptive": "Payment of Invoice Nº 1982652",
        "account": {
          "id": "c6056234-a3f9-42de-b944-3ed793fcb6bb"
        },
        "value": 17.5,
        "clearing_period": "30D",
        "margin_account": {
          "id": "c6056234-a3f9-42de-b944-3ed793fcb6bb"
        },
        "margin_value": 0.25,
        "reward": {
          "account": {
            "id": "c6056234-a3f9-42de-b944-3ed793fcb6bb"
          },
          "value": 1,
          "expiration_date": "2027-04-02"
        }
      }
    },
    "sdd_mandate": {
      "iban": "PT50002700000001234567833",
      "key": "Sdd mandate Key Example",
      "name": "John Doe",
      "email": "john.doe@example.com",
      "phone": "911234567",
      "account_holder": "John Doe",
      "country_code": "PT",
      "max_num_debits": "12",
      "billing_entity": "PT16103627"
    },
    "expiration_time": "2027-12-12 16:05",
    "notification": {
      "customer_method_instructions_email": true
    }
  },
  "order": {
    "items": [
      {
        "description": "Description Example",
        "quantity": 2,
        "key": "Key Example",
        "value": 10.55
      }
    ],
    "key": "Example Key",
    "value": 50.78
  },
  "customer": {
    "name": "Jonh Doe",
    "email": "example@easypay.pt",
    "phone": "911234567",
    "phone_indicative": "+351",
    "language": "EN",
    "fiscal_number": "PT268826145",
    "key": "Key Example"
  }
}

Response

Created

CheckoutPostResponse required

The response body when the checkout is created successfully.

id, string uuid

UUID of the checkout.

session, string

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

config, unknown

Example response

{
  "id": "5db36b83-0664-4bc4-a760-7040ac3726f0",
  "session": "PX2duB7zMRISp6WrKdkOHLcvhIj-7-yUXMYHDQf5k7L5b5mA3D_m5TCdsYT-mCOaALGw4k95I_gjYQS-tcsxAAjTqU4G0UM5sd2o5wdGTGOOuoZVv0CwmiBwhUY9j4Dq4MDryEEPXtqMHEYi7PJz7dakeBemaWFg9GCEvdE6BM_uDBjZLBIS--_uFjRWpKm5enhwTkGvF3iTXuNrsRAxrW8YTsPUGJZumz2s-xSwa6XVaqRqO9uTvuHWy9TrEs1eCTeiWpqwZaj8_aNry5Tc44Epvvw4-4yebDaMQ1gJIHyJDzkLQ9mv4lNPjOFFtJPHihzgIybJdxzE1f6oBnjudMJa0LHsyzkHt29_j4FNRwSyU0Sti2vtW9SEAJ9D8pqrhvMg7zDQkvYLxjNJrME8EVqlGA_il0hc75wigX3hRdoVokF7u0-0ac0HYltG2zYEgE2lxqzPaG_lSbidSBAIoFWhY5rij3TyQHg6lPhHF6jYhn0ytvsBRauIdlZnJau18KzcOH4fcwN8d59SuhffuSyD_Mtd7trlzz6lWM9AeoY="
}

Changes