Vent venligst ...


Loading...

Fakturadata

Fakturadata

Hvis du vil sende din kunde en kvittering fra Kvittering.dk/Storebox.com eller tilbyde fakturabetaling, fordelskort eller loyalitetskoncepter, så skal du implementere vores fakturadata.

Her beskriver vi, hvordan du bruger metoden. Det er samme logik, uanset om du skal opsætte fakturabetaling, fordelskort eller loyalitetskoncepter. 

Bemærk, at du skal have aftale med Klarna for at tilbyde fakturabetaling, og Storebox hvis du vil sende kvitteringsdata og tilbyde fordels/loyalitetkoncepter.

Fakturabetaling kan bruges som et supplement til almindelig kortbetaling og anvendes sammen med en aftale med en indløser.

Du er selv ansvarlig for at implementere Klarna i dit shopsystem. Når du har oprettet din konto ved én af udbyderne, skal du sende oplysningerne til os og integrere systemet med Bambora ved hjælp af nedenstående parametre.


Sådan gør du

Her beskrives, hvordan du sender dine fakturadata til betalingsvinduet v2. Du skal bruge invoice-parameteren, hvis dine kunder skal kunne betale med Klarna.

Fakturadata styres med parameteren invoice sammen med de andre parametre til betalingsvinduet v2. Det skal defineres i JSON: http://www.json.org/

Bemærk! Parameteren amount skal matche fakturaens fulde beløb inkl. moms.

Eksempel: JSON

{

"customer":{
"emailaddress":"test@epay.dk",
"firstname":"Jens",
"lastname":"Jensen",
"address":"Alfred Nobels Vej 21A",
"zip":9220,
"city":"Aalborg Øst",
"country":"Denmark",
"state":"81",
"homephonenumber":"+45 98 13 90 40",
"workphonenumber":"+45 98 13 90 40"
},
"shippingaddress":{
"firstname":"Jens",
"lastname":"Jensen",
"address":"Testervej 1",
"zip":9000,
"city":"Aalborg",
"country":"Denmark",
"state":"81"
},
"lines":[
{
"id":"6",
"description":"MacBook",
"quantity":1,
"price":117057,
"vat":25
},
{
"id":"shipping",
"description":"Shipping",
"quantity":1,
"price":700,
"vat":25
}]
}

Eksempel: Betalingsvinduet

    


Invoice-parametre

NameValuesComment
customerType: customerSee customer parameters
shippingaddressType: shippingaddressSee customer shipping address parameters
lines[]Type: ArraySee invoice lines parameters

Invoice customer-parametre

NameValuesComment
referenceType: string
Max: 30 characters.
Not used for Klarna.
emailaddressType: string
Max: 50 characters.
firstnameType: string
Max: 255 characters.
Not used for Svea.
lastnameType: string
Max: 255 characters.
Not used for Svea.
attentionType: string
Max: 255 characters.
Not used for Svea.
addressType: string
Max: 255 characters.
Not used for Svea.
zipType: string
Max: 255 characters.
Not used for Svea.
cityType: string
Max: 255 characters.
Not used for Svea.
countryType: string
Max: 255 characters.
Not used for Svea.
phoneType: string
Max: 255 characters.
Not used for Svea.
stateType: string
Pattern: ^[a-zA-Z0-9]{0,3}$
The principal subdivision, e.g. province or state. Use the ISO 3166-2 subdivision code.
homephonenumberType: stringHome phone number, preferably following ITU-E.164 specification.
workphonenumberType: stringWork phone number, preferably following ITU-E.164 specification.

Invoice customer shipping address-parametre

NameValuesComment
firstnameType: string
Max: 255 characters.
Not used for Svea.
lastnameType: string
Max: 255 characters.
Not used for Svea.
attentionType: string
Max: 255 characters.
Not used for Svea.
addressType: string
Max: 255 characters.
Not used for Svea.
zipType: string
Max: 255 characters.
Not used for Svea.
cityType: string
Max: 255 characters.
Not used for Svea.
countryType: string
Max: 255 characters.
Not used for Svea.
phoneType: string
Max: 255 characters.
Not used for Svea.
stateType: string
Pattern: ^[a-zA-Z0-9]{0,3}$
The principal subdivision, e.g. province or state. Use the ISO 3166-2 subdivision code.

Invoice lines-parametre

NameTypeComment
idType: string
Max: 10 characters
The identifier of this line from your own system, e.g. your product ID.
descriptionType: String
Max: 40 characters
Description for this line, e.g. the product name.
textType: string
Max: 64 characters
Used for Kvittering.dk/Storebox.com. Text placed under description, e.g. product details.
priceType: integerPrice for 1 quantity without VAT. Any discounts are not to be deducted. The price must be defined in minor units.
discountType: doubleThe discount in per cent. For 15%, enter 15.00
quantityType: integerQuantity of this line.
vatType: doubleThe VAT in per cent. For 25%, enter 25.00

Eksempel: PHP

<?php

$invoice["customer"]["emailaddress"] = "test@epay.dk";
$invoice["customer"]["firstname"] = "Jens";
$invoice["customer"]["lastname"] = "Jensen";
$invoice["customer"]["address"] = "Testervej 1";
$invoice["customer"]["zip"] = 9000;
$invoice["customer"]["city"] = "Aalborg";
$invoice["customer"]["country"] = "Denmark";
$invoice["customer"]["state"] = "81";
$invoice["customer"]["homephonenumber"] = "+45 98 13 90 40";
$invoice["customer"]["workphonenumber"] = "+45 98 13 90 40";


$invoice["shippingaddress"]["firstname"] = "Jens";
$invoice["shippingaddress"]["lastname"] = "Jensen";
$invoice["shippingaddress"]["address"] = "Testervej 1";
$invoice["shippingaddress"]["zip"] = 9000;
$invoice["shippingaddress"]["city"] = "Aalborg";
$invoice["shippingaddress"]["country"] = "Denmark";
$invoice["shippingaddress"]["state"] = "81";

$invoice["lines"] = array();

$invoice["lines"][] = array
(
"id" => "6",
"description" => "MacBook",
"quantity" => 1,
"price" => 117057,
"vat" => 25
);

$invoice["lines"][] = array
(
"id" => "shipping",
"description" => "Shipping",
"quantity" => 1,
"price" => 700,
"vat" => 25
);
?>>