PaymentAttachments: Difference between revisions

From Barion Documentation
Jump to navigation Jump to search
No edit summary
No edit summary
Line 17: Line 17:
<source lang="javascript">
<source lang="javascript">
{
{
     POSKey: "999FFDDA-04FF-333F-CCCC-345FCB555FFC",
     PaymentID: "999FFDDA-04FF-333F-CCCC-345FCB555FFC", //will attach the files to this payment, if it was successful
    PaymentType: "Immediate",           
    PaymentWindow: "00:30:00",


     GuestCheckout : "True",
     Attachments: [
 
              {
   
                    Name: "",
    Transactions: [
                    Description: "",
        {
                    Quantity: 1,
            POSTransactionId: "tr-25",
                    Unit: "pcs",
            Items: [
                    UnitPrice: 300,
                {
                     ItemTotal: 300,
                     ItemTotal: 300,
                     SKU: "cn-d500-fxc3"
                     SKU: "cn-d500-fxc3"
                 },
                 },
                 {
                 {
                     Name: "SD Card",
                     ss
                    UnitPrice: 50,
                    ItemTotal: 100,
                    SKU: "snd-sd-500gm"
                 }
                 }
            ]
        }
     ]
     ]
}
}

Revision as of 14:16, 9 September 2017

WARNING
This is under construction and it is a FUTURE API being designed!

Barion API: Payment Attachments - planned API

POST /v2/Payment/Attachments/Add

v2 This API endpoint is available in API v2 only.


This API allows merchants to attach images and files to an already completed payment. The Payment identifier is needed.

API Input JSON

{
    PaymentID: "999FFDDA-04FF-333F-CCCC-345FCB555FFC", //will attach the files to this payment, if it was successful

    Attachments: [
               {
                    Name: "",
                    Description: "",
                    Quantity: 1,
                    Unit: "pcs",
                    UnitPrice: 300,
                    ItemTotal: 300,
                    SKU: "cn-d500-fxc3"
                },
                {
                    ss
                }
    ]
}






{
    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