List, retrieve, then delete a payment plan.
List, retrieve, then delete a payment plan.
Actors
Merchant / integratorclient
Calls the Payroc API to find and delete the payment plan.
Payroc gatewayapi
The Payroc API surface these steps call.
Sequence
Follow the numbered steps in order. Each step is described under Steps.
Steps
Follow the workflow
Simulate API steps with synthetic inputs. Confirm manual steps yourself before continuing.
Interactive workflow tests are unavailable in this profile. Use the linked reference and source files to send API requests with your own client.
- 1
List payment plans
API requestOPTIONAL — returns a paginated list of the terminal's payment plans and extracts the first result's `paymentPlanId`. Skip if you already hold the `paymentPlanId`.
Merchant / integrator → Payroc gateway
GET/processing-terminals/{processingTerminalId}/payment-plans - 2
Get payment plan
API requestOPTIONAL — retrieve the payment plan to confirm its current state before deleting.
Merchant / integrator → Payroc gateway
GET/processing-terminals/{processingTerminalId}/payment-plans/{paymentPlanId}Complete the earlier steps before continuing.
- 3
Delete payment plan
API requestDelete the payment plan — irreversible: the plan cannot be recovered and no further subscriptions can be added to it. The plan's `onDelete` value (`complete` vs `continue`) determines whether existing subscriptions stop or keep running. Returns 204 with no body.
Merchant / integrator → Payroc gateway
DELETE/processing-terminals/{processingTerminalId}/payment-plans/{paymentPlanId}Complete the earlier steps before continuing.
Arazzo workflow source
arazzo: 1.0.0
info:
title: Delete a payment plan
summary: Find a payment plan, then delete it.
description: |
Removes a reusable recurring-billing payment plan. Discover the plan, retrieve it, then delete it.
Agent gotchas:
- `paymentPlanId` is merchant-assigned and is the `{paymentPlanId}` path
parameter.
- `deletePaymentPlan` is a DELETE that returns 204 (no body). It is
irreversible — the plan cannot be recovered and no further subscriptions
can be added to it. The plan's `onDelete` value (`complete` vs `continue`)
determines whether existing subscriptions stop or keep running.
To amend a plan instead, use the update-a-payment-plan workflow. Mutually exclusive with update for the same plan.
version: 1.0.0
sourceDescriptions:
- name: payroc-api
url: /openapi.yaml
type: openapi
workflows:
- workflowId: delete-a-payment-plan
x-actors:
- id: merchant
name: Merchant / integrator
type: client
description: Calls the Payroc API to find and delete the payment plan.
- id: payroc-gateway
name: Payroc gateway
type: api
description: The Payroc API surface these steps call.
summary: List, retrieve, then delete a payment plan.
description: |
Optionally list payment plans (listPaymentPlans) and retrieve one (getPaymentPlan) to confirm its state, then delete it (deletePaymentPlan). The list/retrieve steps are optional when you already hold the paymentPlanId.
inputs:
type: object
required:
- processingTerminalId
- paymentPlanId
properties:
processingTerminalId:
type: string
description: Unique identifier for the terminal that owns the payment plan.
example: "1234001"
paymentPlanId:
type: string
description: Merchant-assigned identifier of the payment plan to delete (path
parameter).
example: PlanRef8765
limit:
type: integer
description: Maximum number of payment plans to return per page in the discovery
step.
example: 10
steps:
- stepId: listPaymentPlans
x-actor: merchant
x-actor-to: payroc-gateway
x-label: plan search
description: |
OPTIONAL — returns a paginated list of the terminal's payment plans and extracts the first result's `paymentPlanId`. Skip if you already hold the `paymentPlanId`.
operationId: listPaymentPlans
parameters:
- name: processingTerminalId
in: path
value: $inputs.processingTerminalId
- name: limit
in: query
value: $inputs.limit
successCriteria:
- condition: $statusCode == 200
outputs:
firstPaymentPlanId: $response.body#/data/0/paymentPlanId
hasMore: $response.body#/hasMore
- stepId: getPaymentPlan
x-actor: merchant
x-actor-to: payroc-gateway
x-label: plan lookup
description: |
OPTIONAL — retrieve the payment plan to confirm its current state before deleting.
operationId: getPaymentPlan
parameters:
- name: processingTerminalId
in: path
value: $inputs.processingTerminalId
- name: paymentPlanId
in: path
value: $inputs.paymentPlanId
successCriteria:
- condition: $statusCode == 200
outputs:
paymentPlanId: $response.body#/paymentPlanId
name: $response.body#/name
- stepId: deletePaymentPlan
x-actor: merchant
x-actor-to: payroc-gateway
x-label: delete plan request
description: |
Delete the payment plan — irreversible: the plan cannot be recovered and no further subscriptions can be added to it. The plan's `onDelete` value (`complete` vs `continue`) determines whether existing subscriptions stop or keep running. Returns 204 with no body.
operationId: deletePaymentPlan
parameters:
- name: processingTerminalId
in: path
value: $inputs.processingTerminalId
- name: paymentPlanId
in: path
value: $inputs.paymentPlanId
successCriteria:
- condition: $statusCode == 204
outputs:
paymentPlanId: $inputs.paymentPlanId