Pay for hold orders that were booked without immediate payment.
See the Duffel documentation.
Summary
Functions
Creates a payment for a hold order.
Retrieves a single payment by ID.
Lists one page of payments.
Lazily streams all payments across pages.
Functions
@spec create(Duffel.Client.t(), map(), keyword()) :: {:ok, map()} | {:error, Duffel.Error.t()}
Creates a payment for a hold order.
Options
:idempotency_key- value for theIdempotency-Keyheader. A key is generated when you do not pass one (seeDuffel.Client.post/4).
Examples
Duffel.Payments.create(client, %{
order_id: "ord_123",
payment: %{type: "balance", currency: "GBP", amount: "30.20"}
})
@spec get(Duffel.Client.t(), String.t()) :: {:ok, map()} | {:error, Duffel.Error.t()}
Retrieves a single payment by ID.
@spec list(Duffel.Client.t(), keyword() | map()) :: {:ok, Duffel.Page.t()} | {:error, Duffel.Error.t()}
Lists one page of payments.
Parameters
:order_id- filter payments by order:limit/:after/:before- pagination (seeDuffel.Page)
@spec stream(Duffel.Client.t(), keyword() | map()) :: Enumerable.t()
Lazily streams all payments across pages.
Takes the same parameters as list/2. Raises Duffel.Error if a page
request fails.