MollieAPI.Api.DraftTransfersAPI (mollie_api v0.1.0-20260814)

View Source

API calls for all endpoints tagged DraftTransfersAPI.

Summary

Functions

cancel_draft_transfer(connection, draft_transfer_id, opts \\ [])

@spec cancel_draft_transfer(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, MollieAPI.Model.DraftTransferResponse.t()}
  | {:ok, MollieAPI.Model.ErrorResponse.t()}
  | {:error, Tesla.Env.t()}

Cancel draft transfer

🚧 Beta feature > > This feature is currently in beta testing, and the final specification may still change. Cancels a draft transfer created via this API. Transitions the draft transfer to declined with statusReason set to "Declined by creator". Only draft transfers created via this API, and still in awaiting-initiation, can be cancelled this way. A 422 is returned if the initiator has already started approving it. In test mode, this always returns a synthetic declined draft. See Create draft transfer for full test-mode behavior.

Parameters

  • connection (MollieAPI.Connection): Connection to server
  • draft_transfer_id (String.t): Provide the ID of the related draft transfer.
  • opts (keyword): Optional parameters
    • :"idempotency-key" (String.t): A unique key to ensure idempotent requests. This key should be a UUID v4 string.

Returns

  • {:ok, MollieAPI.Model.DraftTransferResponse.t} on success
  • {:error, Tesla.Env.t} on failure

create_draft_transfer(connection, opts \\ [])

@spec create_draft_transfer(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, MollieAPI.Model.DraftTransferResponse.t()}
  | {:ok, MollieAPI.Model.ErrorResponse.t()}
  | {:error, Tesla.Env.t()}

Create draft transfer

🚧 Beta feature > > This feature is currently in beta testing, and the final specification may still change. Creates a draft transfer. The draft transfer immediately enters awaiting-initiation and appears in the initiator's queue in Mollie Apps. It carries no legal weight and moves no funds until a human initiator approves it there. ### Test mode | Action | Test-mode behavior | |---|---| | Create | Always returns a synthetic draft in awaiting-initiation, regardless of most input values | | Get / List | Always returns synthetic awaiting-initiation draft(s), not your real data | | Cancel | Always returns a synthetic declined draft | There is currently no way to synthesize an initiated draft via test mode alone. Initiation only happens when a real initiator approves in Mollie Apps, which test mode doesn't touch.

Parameters

  • connection (MollieAPI.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :"idempotency-key" (String.t): A unique key to ensure idempotent requests. This key should be a UUID v4 string.
    • :body (CreateDraftTransferRequest):

Returns

  • {:ok, MollieAPI.Model.DraftTransferResponse.t} on success
  • {:error, Tesla.Env.t} on failure

get_draft_transfer(connection, draft_transfer_id, opts \\ [])

@spec get_draft_transfer(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, MollieAPI.Model.DraftTransferResponse.t()}
  | {:ok, MollieAPI.Model.ErrorResponse.t()}
  | {:error, Tesla.Env.t()}

Get draft transfer

🚧 Beta feature > > This feature is currently in beta testing, and the final specification may still change. Retrieves a single draft transfer by its identifier. Only draft transfers created via this API are visible via this endpoint. Draft transfers created in Mollie Apps return a 404, even though they appear in the list endpoint. In test mode, this always returns a synthetic awaiting-initiation draft. See Create draft transfer for full test-mode behavior.

Parameters

  • connection (MollieAPI.Connection): Connection to server
  • draft_transfer_id (String.t): Provide the ID of the related draft transfer.
  • opts (keyword): Optional parameters
    • :"idempotency-key" (String.t): A unique key to ensure idempotent requests. This key should be a UUID v4 string.

Returns

  • {:ok, MollieAPI.Model.DraftTransferResponse.t} on success
  • {:error, Tesla.Env.t} on failure

list_draft_transfers(connection, opts \\ [])

@spec list_draft_transfers(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, MollieAPI.Model.ListDraftTransfers200Response.t()}
  | {:ok, MollieAPI.Model.ErrorResponse.t()}
  | {:error, Tesla.Env.t()}

List draft transfers

🚧 Beta feature > > This feature is currently in beta testing, and the final specification may still change. Retrieves a list of draft transfers for the organization including ones created in Mollie Apps, not just ones created via this API. The results are paginated. In test mode, this always returns a synthetic awaiting-initiation list. See Create draft transfer for full test-mode behavior.

Parameters

  • connection (MollieAPI.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :from (String.t): Provide an ID to start the result set from the item with the given ID and onwards. This allows you to paginate the result set.
    • :limit (integer()): The maximum number of items to return. Defaults to 50 items.
    • :status (DraftTransferStatus): Filter the list by draft transfer status. Omit to return draft transfers in any status.
    • :source (DraftTransferSource): Filter the list by origin: api for draft transfers created via this API, mollie-app for ones created in Mollie Apps. Omit to return draft transfers from any source.
    • :"idempotency-key" (String.t): A unique key to ensure idempotent requests. This key should be a UUID v4 string.

Returns

  • {:ok, MollieAPI.Model.ListDraftTransfers200Response.t} on success
  • {:error, Tesla.Env.t} on failure