MollieAPI.Api.DraftTransfersAPI (mollie_api v0.1.0-20260819)
View SourceAPI calls for all endpoints tagged DraftTransfersAPI.
Summary
Functions
@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
declinedwithstatusReason.codeset todeleted-by-creator. Only draft transfers created via this API, and still inpending-review, can be cancelled this way. A422is returned if the initiator has already started approving it. In test mode, this always returns a syntheticdeclineddraft. See Create draft transfer for how to simulateapprovedanddeclinedoutcomes.
Parameters
connection(MollieAPI.Connection): Connection to serverdraft_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.:body(DeletePaymentLinkRequest):
Returns
{:ok, MollieAPI.Model.DraftTransferResponse.t}on success{:error, Tesla.Env.t}on failure
@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
pending-reviewand 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 Creating a draft transfer always returns a synthetic draft inpending-review, using synthetic data, same as in live mode. No real funds move and nothing is sent to Mollie Apps. Shortly after, you can simulate the initiator's decision by adjusting the transfer amount: | Amount | Simulated outcome | Webhook sequence | |---------|-------------------------------------------------------|----------------------------------------------------------------------------------------------------| |13.00| Declined by the initiator, with a free-text reason |business-account-draft-transfer.created→business-account-draft-transfer.declined| | Other | Approved by the initiator |business-account-draft-transfer.created→business-account-draft-transfer.approved| The webhooks fire asynchronously, with a short delay between them to mimic real timing. Get and list reflect the simulated outcome once it lands. Cancelling (viaDELETE) is unaffected by the amount: it always transitions the draft todeclinedwithstatusReason.codeset todeleted-by-creator, the same as in live mode.
Parameters
connection(MollieAPI.Connection): Connection to serveropts(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
@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 returns synthetic data only, not your real draft transfer. See Create draft transfer for how to simulateapprovedanddeclinedoutcomes.
Parameters
connection(MollieAPI.Connection): Connection to serverdraft_transfer_id(String.t): Provide the ID of the related draft transfer.opts(keyword): Optional parameters:testmode(boolean()): Most API credentials are specifically created for either live mode or test mode. In those cases thetestmodequery parameter must not be sent. For organization-level credentials such as OAuth access tokens, you can enable test mode by setting thetestmodequery parameter totrue. Test entities cannot be retrieved when the endpoint is set to live mode, and vice versa.:"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
@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 created via this API for the organization. The results are paginated. In test mode, this returns synthetic draft transfers only, not your real data. See Create draft transfer for how to simulate
approvedanddeclinedoutcomes.
Parameters
connection(MollieAPI.Connection): Connection to serveropts(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.:testmode(boolean()): Most API credentials are specifically created for either live mode or test mode. In those cases thetestmodequery parameter must not be sent. For organization-level credentials such as OAuth access tokens, you can enable test mode by setting thetestmodequery parameter totrue. Test entities cannot be retrieved when the endpoint is set to live mode, and vice versa.:"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