AdyenClient.Checkout.Modifications (AdyenClient v1.0.0)

Copy Markdown View Source

Adyen Checkout Modifications API.

Capture, cancel, refund, reverse, and update authorised payments. All modification endpoints require the paymentPspReference from the original authorisation response.

Summary

Functions

Cancel an authorised payment (by PSP reference path).

Cancel an authorised payment using your own merchant reference (global endpoint). Use when you don't have the PSP reference yet.

Capture an authorised payment.

Refund a captured payment.

Reverse a payment — refund if captured, cancel if not yet captured.

Update the authorised amount of a payment.

Functions

cancel(psp_reference, params, opts \\ [])

@spec cancel(String.t(), map(), keyword()) :: AdyenClient.Client.response()

Cancel an authorised payment (by PSP reference path).

Parameters

  • psp_reference — the PSP reference of the authorisation
  • params%{merchantAccount: "..."} plus optional reference

cancel_by_reference(params, opts \\ [])

@spec cancel_by_reference(
  map(),
  keyword()
) :: AdyenClient.Client.response()

Cancel an authorised payment using your own merchant reference (global endpoint). Use when you don't have the PSP reference yet.

Parameters

  • params — must include merchantAccount and reference (your original order reference)

capture(psp_reference, params, opts \\ [])

@spec capture(String.t(), map(), keyword()) :: AdyenClient.Client.response()

Capture an authorised payment.

Parameters

  • psp_reference — the PSP reference of the authorisation
  • params — at minimum %{merchantAccount: "...", amount: %{currency: "USD", value: 1000}}

refund(psp_reference, params, opts \\ [])

@spec refund(String.t(), map(), keyword()) :: AdyenClient.Client.response()

Refund a captured payment.

Parameters

  • psp_reference — PSP reference of the captured payment
  • params%{merchantAccount: "...", amount: %{currency: "USD", value: 500}}

reverse(psp_reference, params, opts \\ [])

@spec reverse(String.t(), map(), keyword()) :: AdyenClient.Client.response()

Reverse a payment — refund if captured, cancel if not yet captured.

Parameters

  • psp_reference — PSP reference of the payment
  • params%{merchantAccount: "..."}

update_amount(psp_reference, params, opts \\ [])

@spec update_amount(String.t(), map(), keyword()) :: AdyenClient.Client.response()

Update the authorised amount of a payment.

Useful for tip adjustments or incremental authorisations.

Parameters

  • psp_reference — PSP reference of the authorisation
  • params%{merchantAccount: "...", amount: %{currency: "USD", value: 1100}, industryUsage: "DelayedCharge"}