Saltar para o conteúdo

Update a cycle on a subscription

Pedido

Overrides the charge amount for a single cycle without touching the subscription's recurring schedule or default value. Only RENEWABLE cycles in PENDING status can be patched — anything else (one-off charges, already-processed cycles, deleted cycles) returns 409 Conflict.

Required scope: subscription:update

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

UUID of the subscription the cycle belongs to.

cycle_idstring, (uuid)obrigatório

UUID of the cycle to update.

Corpoapplication/jsonobrigatório

New amount to charge on this cycle.

valuenumber, (double), [ 0.01 .. 999999.99 ]obrigatório

New amount for the cycle, in euros. Must have at most two decimal places.

Exemplo:99.99
curl -i -X PATCH \
  'https://api.test.easypay.pt/2.0/subscription/{id}/cycle/{cycle_id}' \
  -H 'AccountId: 2b0f63e2-9fb5-4e52-aca0-b4bf0339bbe6' \
  -H 'ApiKey: eae4aa59-8e5b-4ec2-887d-b02768481a92' \
  -H 'Content-Type: application/json' \
  -d '{
    "value": 99.99
  }'

Respostas

OK

Corpoapplication/json
statusstringobrigatório
Exemplo:"ok"
messageArray of stringsobrigatório
Exemplo:
[ "Your request was successfully updated" ]
idstring, (uuid)obrigatório

The UUID of the updated cycle (same as the cycle_id path parameter).

Exemplo:"550e8400-e29b-41d4-a716-446655440000"
Response
{ "status": "ok", "message": [ "Your request was successfully updated" ], "id": "550e8400-e29b-41d4-a716-446655440000" }