Search
K

Show the user a Call To Action

Learn how to display a CTA to the user on your app.

Getting a CTA config

Partners can call the CTA endpoint to retrieve config to construct a CTA to show the user.

The response from the CTA endpoint will be one of several possible configs

No CTA to display

In this case the API will return an HTTP 204 response with no response body. This indicates that the user should not be shown a CTA. This happens when the user's company is deemed ineligible for some reason: they have recently failed an application, have been ruled out by pre-screening, etc.

Offer CTA

This response is returned when the company is eligible to start an application. There are 2 variants: one when the company has an offer and one when they don't. When partners share anonymised data about via the data upload API Wayflyer may generate an indicative offer may be generated that can be shared with the user.

The generic offer variant is returned when the user has no offer but are still eligible to apply for financing.

The indicative offer variant is returned when the user has an indicative offer.

The shape of the response when there is an offer CTA to show the user is like below:

{
  "state": "indicative_offer",
  "data": {
      "offer": {
          "amount": 17500,
          "currency": "USD",
      },
      "config": {
          "text": "You're eligible for up to $50,000 in funding.",
          "bullet_points": [
              "Funds in 24 hours",
              "Backed by trusted financial institutions",
              "One transparent fee",
          ],
          "button_label": "Get funding",
      }
  }
}

The state property describes the type of CTA that should be shown to the user. It may be one of several possible values: generic_offer, indicative_offer or continue_application.

The data property is an object that will contain details that should be used to construct a CTA to show to the user. The shape of this is discriminated by the value of state.

The properties from data.config describe how to construct the CTA

  • data.config.text is the main copy that should be shown on the CTA
  • data.config.bullet_points is a list of strings that should be shown as supporting content for the CTA
  • data.config.button_label is the text that should be shown on the CTA button

Continue Application CTA

This response is returned when the user has an active application with Wayflyer.

It's payload is the same as the Offer CTA.

When shown to a user it should contain a button with a CTA that, when clicked, calls the continue hosted application endpoint.