Salt Edge Connect

The most simple and easiest way to execute payments in Salt Edge API is to use Salt Edge Connect. Salt Edge Connect is a web page that handles all the user interaction during a payment initiation process:

  • user credentials input
  • interactive confirmation
  • progress reporting
  • error reporting

After your application has received an url for executing a payment using Salt Edge Connect, you can redirect your user to it. There, they will see a screen that lets them pick a provider to execute a payment.

Your user will also be asked to input their credentials and, if needed, any of the interactive credentials. After the process is done, the user will be redirected back to your application url, or to an url specified as return_to argument to create payment api endpoint.

You can easily test Connect from your Dashboard page by pressing Create Payment button or by using the create payment API endpoint.

Embedding Salt Edge Connect in your application

At the moment, the only way to embed Salt Edge Connect in your application is to open it in a popup. When opening it in a popup using, it will post notifications during the payment process. To enable, these notifications, when you request an url for executing payments, you can pass an optional argument javascript_callback_type with value post_message.

This tells Salt Edge connect to use postMessage to send messages to parent window. You can then subscribe to those message by calling window.addEventListener("message", callback) in the parent window:

  window.addEventListener("message", function(event) {

  // {
  //   data: {
  //     payment_id:    "1",
  //     custom_fields: {},
  //     stage:         "start",
  //     status:        "processing"
  //   }
  // }