Single Payment

Create single payment

Changed on

Creates a Single Payment

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

post/single

Request

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

Request body

object required
type, 'sale' | 'authorisation'

Specifies the type of financial operation being performed.

TYPEDESCRIPTION
salea complete transaction where funds are immediately captured.
authorisationa temporary hold on funds pending a future capture.
capture, CreateCapture

The Capture object contains all the necessary information for executing a fund capture action. It defines how and where the funds should be routed upon capturing a transaction. This object is essential for finalizing transactions and ensuring the correct allocation of funds. Object required when the operation type is Sale.

expiration_time, string

The last possible time to make the payment. Applicable in Multibanco payments. This field is deprecated, use multibanco.expiration_time instead.

currency, string

ISO 4217 currency code. If not specified, the default currency is set to EUR.

value, number double required

The monetary amount for the transaction. This field specifies the value of the payment in the designated currency. It must be a positive decimal number representing the exact amount to be processed.

method, 'CC' | 'VI' | 'DD' | 'MB' | 'MBW' | 'GP' | 'AP' | 'SW' | 'IPP' required

Enumerates the possible values for the payment method used in the transaction. This field helps to identify the selected payment method. Possible values include:

METHODDESCRIPTION
CCCredit Card
VIDigital IBAN
DDDirect Debit
MBMultibanco
MBWMB WAY
GPGoogle Pay*
APApple Pay*
SWSamsung Wallet*
IPPIn-Person Payment
<p style="color: red;"><b>*payment only available through checkout yet</b></p>
terminal, object

An object that holds the details specific to the terminal used in the transaction. Required when method is IPP.

key, string

A customizable text field for users to input their own identifier for the resource. This can be any string that helps the user uniquely identify or reference the resource in their own system.

customer, Customer

The Customer object contains the necessary details about the customer involved in the transaction. This includes identification information, contact details, and preferences. All fields are optional unless specified otherwise.

multibanco, object

An object that holds the details specific to a Multibanco transaction.

mbway, object

An object that holds the details specific to an MB WAY transaction. Only applicable when method is MBW; it is ignored for any other method.

sdd_mandate, SddMandate

The SDD Mandate object contains the necessary fields to create a SEPA Direct Debit mandate. This object ensures that all required information is provided to authorize and process SEPA Direct Debit transactions. Object required when method is Direct Debit.

notification, Notification

Notification settings for payment methods.

Example request

{
  "capture": {
    "descriptive": "Payment of Invoice Nº 1982652",
    "transaction_key": "231d0464-6382-4e39-9a1f-af82ea166868",
    "capture_date": "2024-06-30",
    "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"
        }
      }
    ],
    "reward_redemption": {
      "account": {
        "id": "c6056234-a3f9-42de-b944-3ed793fcb6bb"
      },
      "value": 2.5
    }
  },
  "expiration_time": "2017-12-12 16:05",
  "currency": "EUR",
  "value": 17.5,
  "method": "CC",
  "terminal": {
    "id": "458b2fc4-3092-4de3-abd4-fe1600c09420"
  },
  "key": "Payment of Invoice Nº 1982652",
  "customer": {
    "id": "649e88cf-0b78-4c36-8f99-33f5ebb812a1",
    "name": "John Doe",
    "email": "john.doe@example.com",
    "phone": "911234567",
    "phone_indicative": "+351",
    "fiscal_number": "PT123456789",
    "key": "customer Key Example",
    "language": "PT"
  },
  "mbway": {
    "phone": "+351911234567"
  },
  "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"
  },
  "notification": {
    "customer_method_instructions_email": true
  }
}

Response

Created

object required
status, 'ok' | 'error'

Indicates the overall status of the API response. 'ok' means the request was successful, 'error' indicates there was a problem.

message, string[]

An array of messages providing details about the response status. These messages give additional context about the operation result.

id, string uuid
method, MethodOnPostResponse

Method information returned in POST responses after creating a payment

customer, object
capture, object
multibanco, ResponseMultibanco

An object that holds the details specific to a Multibanco transaction response.

notification, Notification

Notification settings for payment methods.

Example response

{
  "status": "ok",
  "message": [
    "Your request was successfully created"
  ],
  "id": "c6056234-a3f9-42de-b944-3ed793fcb6bb",
  "method": {
    "entity": "59126",
    "reference": "810000618",
    "expiration_date": "11/28",
    "sdd_mandate": {
      "id": "50389142122",
      "iban": "PT50002700000001234567833",
      "key": "Sdd mandate Key Example",
      "name": "John Doe",
      "email": "john.doe@easypay.pt",
      "phone": "911345678",
      "account_holder": "John Doe",
      "country_code": "PT",
      "max_num_debits": "12",
      "billing_entity": "PT16103627",
      "reference_adc": "987654321123"
    },
    "mbway": {
      "phone": "+351911234567"
    }
  },
  "customer": {
    "id": "c6056234-a3f9-42de-b944-3ed793fcb6bb"
  },
  "capture": {
    "id": "c6056234-a3f9-42de-b944-3ed793fcb6bb",
    "splits": [
      {
        "id": "c6056234-a3f9-42de-b944-3ed793fcb6bb",
        "status": "success",
        "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_date": "2024-06-30",
        "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"
        },
        "reverts": {
          "id": "c6056234-a3f9-42de-b944-3ed793fcb6bb",
          "value": 17.5,
          "margin_value": 0.25
        }
      }
    ],
    "reward_redemption": {
      "account": {
        "id": "c6056234-a3f9-42de-b944-3ed793fcb6bb"
      },
      "value": 5
    }
  },
  "multibanco": {
    "expiration_time": "2025-09-28T12:41:08Z",
    "start_time": "2025-08-26T12:41:09Z"
  },
  "notification": {
    "customer_method_instructions_email": true
  }
}

Changes

    • info

      the request optional property sdd_mandate/billing_entity became read-only

    • info

      the response optional property method/sdd_mandate/billing_entity became read-only for the status

    • warning

      added the new failed enum value to the capture/splits/items/status response property for the response status

    3 more changes in this revision