Saltar para o conteúdo

Create frequent payment

Pedido

Frequent payments are repeatable transactions of varying sums without the client having to enter their payment details again.

It is possible to limit the transferred sums by choosing minimum or maximum values, either to the total sum of the transactions or each individual transaction.

Supported methods for frequent payments are: Credit Card, MB WAY, Multibanco, Direct Debit and Virtual IBAN

Required scope: frequent:create

Segurança
accountId and apiKey
Corpoapplication/json
expiration_timestring

Expiration date and time for the payment in YYYY-MM-DD HH:mm format

Exemplo:"2038-12-12 16:05"
currencystring

Currency code for the payment

Padrão:"EUR"
Enum:"EUR""BRL"
Exemplo:"EUR"
customerobject(Customer)obrigatório

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.

keystring, <= 50 characters

The merchant's key for identifying the payment.

Exemplo:"Key Example"
min_valuenumber, (double), >= 0.01

Minimum value allowed for transactions

Exemplo:10
max_valuenumber, (double), >= 0.01

Maximum value allowed for transactions

Exemplo:25.5
unlimited_paymentsboolean

Transactions will be unlimited, max or min value will be refreshed on each payment.

Padrão:true
methodstringobrigatório

Payment method type

Enum:"MB""CC""DD""MBW""VI"
Exemplo:"DD"
sdd_mandateobject(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.

multibancoobject

Configuration of the Multibanco payment

curl -i -X POST \
  https://api.test.easypay.pt/2.0/frequent \
  -H 'AccountId: 2b0f63e2-9fb5-4e52-aca0-b4bf0339bbe6' \
  -H 'ApiKey: eae4aa59-8e5b-4ec2-887d-b02768481a92' \
  -H 'Content-Type: application/json' \
  -d '{
    "expiration_time": "2038-12-12 16:05",
    "currency": "EUR",
    "customer": {
      "name": "Customer Example",
      "email": "customer@example.com",
      "phone": "911234567",
      "phone_indicative": "351",
      "fiscal_number": "PT123456789",
      "key": "Key Example",
      "language": "PT"
    },
    "key": "Key Example",
    "max_value": 25.5,
    "min_value": 10,
    "unlimited_payments": true,
    "method": "DD",
    "sdd_mandate": {
      "iban": "PT50002700000001234567833",
      "key": "Key Example",
      "name": "Name Example",
      "email": "customer@example.com",
      "phone": "911234567",
      "account_holder": "Acount Name Example",
      "country_code": "PT",
      "max_num_debits": "12"
    }
  }'

Respostas

Created

Corpoapplication/json
statusstring

Status of the request

Exemplo:"ok"
messageArray of strings

Array of status messages

Exemplo:
[ "Your request was successfully created" ]
idstring, (uuid)

Unique identifier for the created frequent payment

Exemplo:"86401037-1c8d-4cf3-9172-d0a29b17b9fd"
methodobject

Payment method details

customerobject

Customer information

Resposta
{ "status": "ok", "message": [ "Your request was successfully created" ], "id": "cd90455e-4ab3-42cf-a91c-cfc6e3afa65a", "method": { "type": "CC", "status": "waiting", "url": "https://cc.test.easypay.pt/v3/public/card-details/e388fe5a-5b9f-44b6-91b1-62e321a7dc4b" }, "customer": { "id": "68d07e52-3e04-493f-aaeb-bffe7ddb81ee" } }