Pass Shipping Fee
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.
You can pass a shipping fee in the basket during the creation of the transaction.
Example 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"
,
...
"currency"
:
"EUR"
,
"amount"
:
"12485"
,
"basket"
: [
{
"item_type"
:
"article"
,
"article_number"
:
"4124"
,
"quantity"
:
"2"
,
"name"
:
"Book shelf Peter, 201 x 59 x 28"
,
"ean"
:
"4123412341243"
,
"tax"
:
"19"
,
"total"
:
"11990"
,
"price"
:
"5995"
},
{
"item_type"
:
"shipping"
,
"name"
:
"standard delivery"
,
"tax"
:
"19"
,
"total"
:
"495"
}
]
}
}
This adds a shipping fee of €4.95 incl. VAT. The total amount is €124.85 now.
Monetary amounts are expressed in the smallest currency unit (e. g. Euro Cent).
Detailed description of the objects for the basket items:
Attribute |
Type |
Description |
item_type |
string |
Must be shipping for the shipping fee. |
name |
string |
The name as listed among the article names. |
tax |
number |
The value-added tax (VAT) rate in percent. If you pass a value of 19, this means a VAT rate of 19%. |
total |
number |
The total fee in the smallest currency unit (e. g. Euro Cent), and including the value-added tax (VAT). If you pass a value of 495 for a order in Euros, this means 495 Euro Cents, or €4,95. |
If a shipping fee is present, the field amount must contain it. It is calculated (quantity 1 × price 1) + (quantity 2 × price 2) + … + (quantity n × price n) + (total shipping).
If the basket display is active for the contract, it would look so: