🟢onSuccess

The onSuccess callback is triggered if the request is successful.

Use cases

  • Trigger custom JavaScript

Arguments

ArgumentTypeDescription

request

Response

The response object returned

data

object

The data returned

Example

This example demonstrates logging the response data to the console.

...
onSuccess: {
  redirectUrl: null,
  showElement: null,
  hideElement: null,
  callback: async (response, data) => {
    console.log(data)
  }
}
...

Last updated