Saltar para o conteúdo

Updates frequent payment details

Pedido

Required scope: frequent:update

Segurança
accountId and apiKey
Caminho
idstring, (uuid)obrigatório

Resource Identification

Corpoapplication/jsonobrigatório

Frequent Payment object to edit existing one

statusstring

Status of the frequent payment

Enum:"active""deleted"
Exemplo:"active"
expiration_timestring, (Y-m-d H:i)

Expiration date and time for the payment

Exemplo:"2017-12-12 16:05"
currencystring(Currency)

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

Value:"EUR"
Exemplo:"EUR"
customerobject(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.

keystring, <= 50 characters

The merchant's key for identifying the payment.

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

Maximum value allowed for transactions

Exemplo:25.5
min_valuenumber, (double), >= 0.01

Minimum value allowed for transactions

Exemplo:10
unlimited_paymentsboolean

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

Padrão:true
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.

curl -i -X PATCH \
  'https://api.test.easypay.pt/2.0/frequent/{id}' \
  -H 'AccountId: 2b0f63e2-9fb5-4e52-aca0-b4bf0339bbe6' \
  -H 'ApiKey: eae4aa59-8e5b-4ec2-887d-b02768481a92' \
  -H 'Content-Type: application/json' \
  -d '{
    "status": "active",
    "expiration_time": "2038-12-12 16:05",
    "currency": "EUR",
    "customer": {
      "id": "22ea3cc9-424b-489a-91b7-8955f643dc93",
      "name": "Customer Example",
      "email": "customer@example.com",
      "phone": "911234567",
      "phone_indicative": "+351",
      "fiscal_number": "PT123456789",
      "key": "Key Example",
      "language": "PT"
    },
    "key": "Example Key",
    "max_value": 20,
    "min_value": 2,
    "unlimited_payments": false,
    "sdd_mandate": {
      "id": "12345678901",
      "iban": "PT50002700000001234567833",
      "key": "Key Example",
      "name": "Name Example",
      "email": "customer@example.com",
      "phone": "911234567",
      "account_holder": "Account Name Example",
      "country_code": "PT",
      "max_num_debits": "12"
    }
  }'

Respostas

OK

Corpo
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 frequent payment

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

Payment method details

customerobject

Customer information

Resposta
{ "method": { "type": "DD", "sdd_mandate": { … } }, "status": "ok", "message": [ "Your request was successfully created" ] }