Adyen · Arazzo Workflow

Adyen Classic Authorise and Cancel or Refund

Version 1.0.0

Authorise a payment then cancel or refund it without tracking its state.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub PaymentsFinancial-ServicesFintechArazzoWorkflows

Provider

adyen

Workflows

authorise-and-cancel-or-refund
Authorise a classic payment and cancel or refund it by original reference.
Authorises a payment and, when the result code is Authorised, issues a cancelOrRefund using the PSP reference from the authorisation as the original reference, reversing the payment whatever its current state.
2 steps inputs: amount, card, merchantAccount, reference outputs: authPspReference, modificationPspReference, response
1
authorise
Authorise the payment with the supplied card and amount to obtain a PSP reference and result code.
2
cancelOrRefund
Cancel or refund the payment using the PSP reference from the authorisation as the original reference, reversing it whatever its state.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Adyen Classic Authorise and Cancel or Refund
  summary: Authorise a payment then cancel or refund it without tracking its state.
  description: >-
    The cancelOrRefund endpoint lets you reverse a payment in a single call when
    you do not know whether it has already been captured: it cancels an
    uncaptured authorisation or refunds a captured payment. This workflow
    authorises a payment, confirms the result is Authorised, and then issues a
    cancelOrRefund against the authorisation PSP reference. Every step spells out
    its request inline so the flow can be read and executed without opening the
    underlying OpenAPI description.
  version: 1.0.0
  x-realizes-capability-ids:
  - BC-1340.20
  - BC-1340.70
  x-capability-derivation:
    method: 'deterministic join: sourceDescriptions -> per-tag OpenAPI -> tag/capability edge. No classification at this step.'
    min_confidence: 0.7
    sources:
    - capability_id: BC-1340.20
      capability_name: Payment Processing Management
      spec: adyen-cancelorrefund-api-openapi.yml
      confidence: 0.7
    - capability_id: BC-1340.70
      capability_name: Card Transaction Processing Management
      spec: adyen-authorise-api-openapi.yml
      confidence: 0.7
    model: Turbo EA Capabilities by Vincent Verdet — Turbo EA, https://github.com/vincentmakes/turbo-ea-capabilities, CC BY 4.0
sourceDescriptions:
- name: authoriseApi
  url: ../openapi/adyen-authorise-api-openapi.yml
  type: openapi
- name: cancelorrefundApi
  url: ../openapi/adyen-cancelorrefund-api-openapi.yml
  type: openapi
workflows:
- workflowId: authorise-and-cancel-or-refund
  summary: Authorise a classic payment and cancel or refund it by original reference.
  description: >-
    Authorises a payment and, when the result code is Authorised, issues a
    cancelOrRefund using the PSP reference from the authorisation as the original
    reference, reversing the payment whatever its current state.
  inputs:
    type: object
    required:
    - merchantAccount
    - amount
    - reference
    - card
    properties:
      merchantAccount:
        type: string
        description: The merchant account identifier that processes the payment.
      amount:
        type: object
        description: The authorisation amount object with currency and value.
      reference:
        type: string
        description: Your unique reference for the payment.
      card:
        type: object
        description: The card details object (number, expiryMonth, expiryYear, cvc, holderName).
  steps:
  - stepId: authorise
    description: >-
      Authorise the payment with the supplied card and amount to obtain a PSP
      reference and result code.
    operationId: post-authorise
    requestBody:
      contentType: application/json
      payload:
        merchantAccount: $inputs.merchantAccount
        amount: $inputs.amount
        reference: $inputs.reference
        card: $inputs.card
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      pspReference: $response.body#/pspReference
      resultCode: $response.body#/resultCode
    onSuccess:
    - name: authorised
      type: goto
      stepId: cancelOrRefund
      criteria:
      - context: $response.body
        condition: $.resultCode == "Authorised"
        type: jsonpath
  - stepId: cancelOrRefund
    description: >-
      Cancel or refund the payment using the PSP reference from the
      authorisation as the original reference, reversing it whatever its state.
    operationId: post-cancelOrRefund
    requestBody:
      contentType: application/json
      payload:
        merchantAccount: $inputs.merchantAccount
        originalReference: $steps.authorise.outputs.pspReference
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      modificationPspReference: $response.body#/pspReference
      response: $response.body#/response
  outputs:
    authPspReference: $steps.authorise.outputs.pspReference
    modificationPspReference: $steps.cancelOrRefund.outputs.modificationPspReference
    response: $steps.cancelOrRefund.outputs.response

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/adyen-classic-authorise-and-cancel-or-refund-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.