The Developer Hub

Welcome to the developer hub. You'll find comprehensive guides and documentation to help you start working with as quickly as possible, as well as support if you get stuck. Let's jump right in!

Redirect Mode


When using the Redirect Mode the merchant performs a redirect to the Datatrans Payment Page. The whole payment process is handled by the Datatrans web application.



To integrate the redirect mode the merchant could use a simple HTML <a> tag:

<a href="

Parameter encoding

Please bear in mind that special parameters need to be url-encoded. In most cases http-post is the more viable solution.

<iframe> integration

Although we do not recommend to use an iframe to show the Payment Page, please make sure to send the following parameter if you have this kind of integration:


This makes sure that no (X) button on the top right of the Payment Page is displayed. Additionally a click on the back button will redirect to the merchants cancel url.

Passing multiple payment methods

Please use the parameter paymentmethod to specify multiple payment methods:


Custom Integration

When using the redirect mode, one can alter the payment methods displayed by changing the paymentmethod parameter used to redirect to the Payment Page as follows

<a href="

In the example above the Payment Page will only display VISA as payment method. If you want to display multiple payment methods you can use the parameter paymentmethod more than once. For a list of payment method short codes refer to Other Payment Methods and for credit cards to Credit Cards


Select one or more payment methods and click pay.


  display: inline-block;
.payment-method .initial{
 	opacity: 0.8;
    filter: grayscale(50%); 
.payment-method img:hover{
 	opacity: 1;
  display: inline-block;
<script src=""></script>
 let baseHref = "";
 let selectedMethods = []; 
 $("#redirectSample img").on("click",function(){
    let methodShortName = $(this).data("methodname");
    	var idx = selectedMethods.indexOf(methodShortName);
  function pay(){
   	if(selectedMethods.length > 0){
    	let adjustedHref = baseHref;  
      selectedMethods.forEach(function (method){
      	adjustedHref = adjustedHref + "&paymentmethod=" + method;
      selectedMethods = [];;

<div id="redirectSample" class="methods">
  <div class="payment-method">
    <img data-methodname="VIS" src="" class="initial" />
  <div class="payment-method">
    <img data-methodname="AMX" src="" class="initial" />
  <div class="payment-method">
    <img data-methodname="ECA" src="" class="initial" />

<button onclick="pay();"class="btn btn-primary">Pay 1 CHF</button>

paymentmethod parameter

This is only needed if the merchant wants to dynamically restrict the offered payment methods. By default all payment methods of a merchant are displayed

Updated 11 months ago

What's Next

Check out our API Reference for a full list of available parameters

API Reference

Redirect Mode

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.