Define Return URLs

DEPRECATED

This guide is for the deprecated Flex.API. Please don't use it for new implementations.

See Integration Options, and feel welcome to ask our friendly help desk.

In most cases you would like to return your customer back to your web page. You can pass two URLs for this, one for the case of success, and one for the case of failure. The case of failure includes user abort, failed authorization, and technical problems. The URLs can be generic, but may also be specific for the particular transaction.

Request
POST /payment/init HTTP/1.1
Host: api-testing.secupay-ag.de
Content-Type: application/json; charset=utf-8;
Accept: application/json
Accept-Charset: utf-8
 
{
"data": {
"apikey": "6801fxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx7ace",
"payment_type": "debit",
"demo": 1,
"url_success": "http://shop.example.com/success.php",
"url_failure": "http://shop.example.com/failure.php",
...
}

The parameter url_success is the URL to direct the customer back after successful authorization, or payment. When the transaction uses the sale flow, it is common to confirm the order thankfully. When in authorization flow, it is most likely you will show a summary, and prompt the customer for final confirmation.

The parameter url_failure is the URL to send the customer back after failed authorization, if they aborted the payment or in case of a technical problem. Usually, you would guide the customer back to your checkout process, for instance to the payment method selection.

Both URLs can contain up to 2000 characters.