Payout Flow

This flow allows a user to choose a payment method in the context of a payout. It starts with a check for a signed TOS and, if necessary, presents the user with a TOS screen before allowing them to proceed. The user may choose an existing payment method if they have one, or create a new payment method and then choose it.

payout flow widget

Upon completion, this flow returns the following values:

Value Description
id The payment method ID, which may be used in creating a payout request.
psp_reference A reference ID for the payment method from the payment service provider (PSP).
pm_state The state of the payment method. One of: ACTIVE, INACTIVE, or UNVERIFIED. Payment methods must have a state of ACTIVE to be used in processing transactions.
attention

This flow does not, by itself, complete a payout. It simply provides a UI for the user to select (or add) payment methods for use in creating a payout request. Refer to our Developer Guides for information on requesting payouts.

Widget flow

Copy
Copied
window.Tilia.execute({
    rootId: < your.element.id > ,
    flow: payout,
    redirect: < redirect > ,
    onComplete: handleComplete,
    onError: handleError,
});

The handleComplete callback will be invoked by the widget with the result of the flow.

If the user cancels anywhere in the flow:

Copy
Copied
{
    source: “tilia”,
    event: “tilia.pm.complete”,
    state: “cancel”,
}

If the user completes the flow:

Copy
Copied
{
    source: “tilia”,
    event: “tilia.pm.complete”,
    id: < payment.method.id > ,
    psp_reference: < psp.reference > ,
    pm_state: < payment.method.state >
}

Redirect flow

Copy
Copied
<a href=”<redirectUrl>?flow=payout&returnurl=<your.return.url>”>Choose payment method</a>

Upon completion, the user is routed to your redirect URL, which has the following query string parameters added:

  • If the user cancels anywhere in the flow: state=cancel
  • If the user completes the flow:

    • state=complete
    • id=<payment.method.id>
    • psp_reference=<psp.reference>
    • pm_state=<payment.method.state>