Sample-electronicsshop: Difference between revisions

From Barion Documentation
Jump to navigation Jump to search
(Created page with "<source lang="javascript"> { POSKey: "999FFDDA-04FF-333F-CCCC-345FCB555FFC", PaymentType: "Immediate", PaymentWindow: "00:30:00", GuestCheckout :...")
 
mNo edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
__NOTOC__
{{PageTitle|title=Electronics shop - traditional e-shop sample}}
This example is the input of <span class="api-ver">v2</span> [[Payment-Start-v2|/Payment/Start]] API call for an online shop selling electronics. This is the simplest transaction type where the customer pays to the merchant.
'''API Input JSON'''
<source lang="javascript">
<source lang="javascript">
{
{
Line 57: Line 63:
}
}
</source>
</source>
[[CodeSamples|More Code Samples]]

Latest revision as of 09:06, 17 May 2021

Electronics shop - traditional e-shop sample

This example is the input of v2 /Payment/Start API call for an online shop selling electronics. This is the simplest transaction type where the customer pays to the merchant.

API Input JSON

{
    POSKey: "999FFDDA-04FF-333F-CCCC-345FCB555FFC",
    PaymentType: "Immediate",             
    PaymentWindow: "00:30:00",

    GuestCheckout : "True",
    FundingSources: [ "All" ],    

    PaymentRequestId: "payment-25",
    OrderNumber: "order-25",
    PayerHint: "[email protected]",
    ShippingAddress:  {
        Country: "AT",
        City: "Vienna",
        Region: "",
        Zip: "1234",
        Street: "13 Etwas Strasse",
        Street2: "",
        FullName: "Joseph Schmidt",
        Phone: "43259123456789"
    },

    RedirectUrl: "http://shop.example.com/danke-fur-den-kauf",
    CallbackUrl: "http://shop.example.com/api/callback",

    Locale: "de-AT",
    Currency: "EUR",
    
    Transactions: [
        {
            POSTransactionId: "tr-25",
            Payee: "[email protected]",
            Total: 400,
            Items: [
                {
                    Name: "Digital Camera",
                    Description: "Canon D500",
                    Quantity: 1,
                    Unit: "pcs",
                    UnitPrice: 300,
                    ItemTotal: 300,
                    SKU: "cn-d500-fxc3"
                },
                {
                    Name: "SD Card",
                    Description: "SanDisk SD mini 512GB - 3 year garantee",
                    Quantity: 2,
                    Unit: "pcs",
                    UnitPrice: 50,
                    ItemTotal: 100,
                    SKU: "snd-sd-500gm"
                }
            ]
        }
    ]
}

More Code Samples