Skip to content

Updates subscription payment details

Request

Updates the subscription payment details

Required scope: subscription:update

Security
accountId and apiKey
Path
idstring, (uuid)required

Resource Identification

Bodyapplication/jsonrequired

Subscription Payment object to edit existing one

statusstring

The Subscription Status.
When sets to inactive the next pending cycles will be deleted.
When sets to active a new billing cycle will be schedule accordingly the new frequency and start_time.
Those properties are required to active a subscription.

Enum:"active""inactive"
Example:"active"
captureobject
expiration_timestring, (Y-m-d H:i)
Example:"2039-12-12 16:05"
currencystring(Currency)

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

Value:"EUR"
Example:"EUR"
customerobject(updatable-customer)

The Customer object contains detailed information about the customer involved in the transaction. Used for update operations where all fields are optional.

keystring, <= 50 characters

The merchant's key for identifying the payment.

Example:"Example Key"
valuenumber, (double), >= 0.5

The payment value.
Will be rounded to 2 decimals.

Example:12.55
frequencystring(Frequency)

Defining the frequency that the cycles are charged.

Enum:"1D""1W""2W""1M""2M""3M""4M""6M""1Y""2Y"
max_capturesinteger

Defining the total of cycles that will be charged.
When this property is set, unlimited_payments will be inactivated.

unlimited_paymentsboolean

When this property is set, unlimited cycles will be charged until the subscription is inactivated or deleted.

start_timestring, (Y-m-d H:i)

Defining the start of billing cycles.

Example:"2025-12-12 16:05"
failoverboolean

After all retries failed, the payment cycle can have another try with another single method.

Default:false
retriesinteger

Number of retries in each payment cycle.
The chosen frequency will define the max number of possible retries.

Default:0
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/subscription/{id}' \
  -H 'AccountId: 2b0f63e2-9fb5-4e52-aca0-b4bf0339bbe6' \
  -H 'ApiKey: eae4aa59-8e5b-4ec2-887d-b02768481a92' \
  -H 'Content-Type: application/json' \
  -d '{
    "capture": {
      "transaction_key": "Transaction Key",
      "descriptive": "subscription"
    },
    "retries": 2,
    "customer": {
      "email": "john.doe@example.com",
      "key": "Customer Key",
      "language": "PT"
    },
    "key": "Payment Key Key",
    "max_captures": 12,
    "start_time": "2025-08-06 11:07",
    "expiration_time": "2099-08-06 11:07",
    "value": 10.99,
    "frequency": "1M",
    "method": "DD",
    "sdd_mandate": {
      "iban": "PT50002700000001234567833",
      "name": "John Doe",
      "email": "john.doe@example.com",
      "phone": "911234567",
      "account_holder": "John Doe",
      "key": "SDD Mandate key",
      "max_num_debits": "12"
    }
  }'

Responses

OK

Bodyapplication/json
statusstring
Example:"ok"
messageobject(subscription-response-on-detail)

Subscription object that returns after a success request.

Response

Success

{ "status": "ok", "message": { "id": "458b2fc4-3092-4de3-abd4-fe1600c09420", "key": "subscription 02536985", "expiration_time": "2099-01-15 00:00", "start_time": "2027-01-15 00:00", "frequency": "1M", "retries": 2, "max_captures": 12, "failover": false, "capture_now": true, "unlimited_payments": false, "customer": { … }, "method": { … }, "transactions": [ … ], "currency": "EUR", "value": 10.55, "created_at": "2025-08-05 13:44:29" } }