background

How to define a Global Thank-you page

Tags:profileslanguagesprofielprofielenglobalexit url
Show me

General information

The Global Thank-you page is an url used to redirect your customer after they signed a document, paid an invoice or payment link.
We advise to always use https:// protocol for your URL.
A 'type' value is passed which is used to identify which type of action was initiated.

Important: When a Global Thank-you page is configured for one language then both the thank-you and invoice thank-you pages are disabled.
The customer is only redirected to your personal thank-you page when it is configured for the specific language of the:

  • Invoice: The language on the invoice
  • Document: The language on the document
  • payment link: The language of the payment link selected when creating the link

If the URL is not configured for a language, the customer is redirected to a default page.

How to define an exit URL

Variables

The following variables can be used:

  • {{type}}
  • {{id}}
  • {{ref}}
  • {{state}}

For each sort of flow, the variables will have a different value.

Custom attributes from a profile can not be used in the global exit url, the value is not returned in the url.

Type variable:

There are 3 different type values that can be returned:

  • document: returned when the customer signed a document (mandate, contract)
  • invoice: returned when the customer paid an invoice
  • link: returned when the customer paid a payment link

id variable:

The value of the id variable is different for each type.
When the type is:

  • document: The value returned for id is the document reference (mandate number, contract number).
  • invoice: The value returned for id is the invoice number.
  • link: The value returned for id is the payment link id.

Ref variable:

The ref variable returns the following value for the type:

  • document: The value returned for ref is the contract reference defined on the profile.
  • invoice: The value returned for ref is the invoice reference.
    • 'ref' parameter when creating a new invoice via API or CSV.
  • link: The value returned for ref is the payment link remittance.

State variable:

The state variable returns the outcome of a payment or when signing a document, the following values are returned for type:

  • document:
    • ok: The signature is accepted.
    • fail: An error occurred, signing was not successful.
    • pending: The debtor selected to print the document.
    • cancel: Cancel in the signing flow.
  • invoice:
    • paid: the payment is successful
  • link:
    • paid: the payment is successful
    • declined: the payment failed (failed or cancel during payment)

Implementation and examples

Different from the dedicated thank-you pages for invoices and documents, here no state is returned (pending, paid, ok,...).
This means you can either implement a static page without the current state, or a more advanced one where there is more front-end and server-side handling.

For example, you can define different directories or files for each type on your web server:

Or pass (all) the variables and handle them when received:

Payment Service Providers

When a (global) thank you page is configured, we send the url directly to the PSP when available.
This means that the final handling of the URL is done via the payment service provider.
Some providers enrich the url with their own data, so it is possible that the final URL contains additional parameters.

Last Update: 2024-08-07