These docs are for v1.0.1. Click to read the latest docs for v2.1.0.

Webhook

When using either the Payment Page or our Mobile SDKs you can register a webhook URL (POST URL) within our Webadmin Tool. The registred webhook URL will be triggered after a successful or erroneous transaction. Supported Content-Types are:

  • text/xml
  • application/x-www-form-urlencoded
788

Receiving the webhook payload

Success case

<?xml version="1.0" encoding="UTF-8"?>
<uppTransactionService version="1">
  <body merchantId="1000011011" testOnly="yes">
    <transaction refno="840973" status="success">
      <uppTransactionId>180710155401925243</uppTransactionId>
      <amount>1000</amount>
      <currency>CHF</currency>
      <pmethod>VIS</pmethod>
      <reqtype>CAA</reqtype>
      <language>en</language>
      <success>
        <authorizationCode>417485393</authorizationCode>
        <acqAuthorizationCode>155417</acqAuthorizationCode>
        <responseMessage>Authorized</responseMessage>
        <responseCode>01</responseCode>
      </success>
      <userParameters>
        <parameter name="sign">30916165706580013</parameter>       
        <parameter name="responseCode">01</parameter>
        <parameter name="expy">21</parameter>
        <parameter name="expm">12</parameter>
      </userParameters>
    </transaction>
  </body>
</uppTransactionService>
uppMsgType=post&status=success&uppTransactionId=180710155247074969&refno=735821&amount=1000&authorizationCode=258235030&sign=30916165706580013&language=en&pmethod=VIS&responseCode=01&expy=18&acqAuthorizationCode=155258&merchantId=1000011011&reqtype=CAA&currency=CHF&responseMessage=Authorized&testOnly=yes&expm=12

Error case

<?xml version="1.0" encoding="UTF-8"?>
<uppTransactionService version="1">
  <body merchantId="1000011011" testOnly="yes">
    <transaction refno="424807" status="error">
      <uppTransactionId>180710160345898172</uppTransactionId>
      <amount>1000</amount>
      <currency>CHF</currency>
      <pmethod>VIS</pmethod>
      <reqtype>CAA</reqtype>
      <language>en</language>
      <error>
        <errorCode>1403</errorCode>
        <errorMessage>declined</errorMessage>
        <errorDetail>Declined</errorDetail>
      </error>
      <userParameters>
        <parameter name="sign">30916165706580013</parameter>
        <parameter name="expy">21</parameter> 
        <parameter name="acqErrorCode">50</parameter>       
        <parameter name="expm">12</parameter>
      </userParameters>
    </transaction>
  </body>
</uppTransactionService>
uppMsgType=post&status=error&uppTransactionId=180710160458378622&refno=497184&amount=1000&errorMessage=declined&sign=30916165706580013&errorCode=1403&language=en&pmethod=VIS&expy=18&merchantId=1000011011&reqtype=CAA&errorDetail=Declined&currency=CHF&acqErrorCode=50&testOnly=yes&expm=12