PaymentAttachments: Difference between revisions

From Barion Documentation
Jump to navigation Jump to search
No edit summary
m (typo)
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
__NOTOC__
__NOTOC__
{{NotificationBox|title=WARNING|text=This is under construction and it is a FUTURE API being designed!|color=#c20000}}
{{PageTitle|title=Barion API: Payment Attachments - planned API}}
{{PageTitle|title=Barion API: Payment Attachments - planned API}}


Line 9: Line 10:
<span class="api-ver">v2</span> This API endpoint is available in '''API v2''' only.
<span class="api-ver">v2</span> This API endpoint is available in '''API v2''' only.


{{NotificationBox|title=WARNING|text=This is under construction and it is a FUTURE API being designed!|color=#c20000}}
This API allows merchants to attach images and files to an already completed payment. The Payment identifier of a completed and successful payment is needed. The attachments will be available for display or download in the Barion web and mobile app.  
 
This API allows merchants to attach images and files to an already completed payment. The Payment identifier is needed.  


'''API Input JSON'''
==API Input JSON==
<source lang="javascript">
<source lang="javascript">
{
{
     POSKey: "999FFDDA-04FF-333F-CCCC-345FCB555FFC",
     POSKey: "999FFDDA-04FF-333F-CCCC-345FCB555FFC",
     PaymentType: "Immediate",            
     PaymentID: "453AC5345-5A66-564D-D348-78754F3453AD", //will attach the files to this payment, if it was successful
    PaymentWindow: "00:30:00",


     GuestCheckout : "True",
     Attachments: [
 
              {
   
                    Name: "Sisters of Mercy Ticket",
    Transactions: [
                    Description: "Sister of Mercy ticket, A38, 2017.09.20 21:30",
        {
                     Type: "Ticket",
            POSTransactionId: "tr-25",
                     URL: "https://tickets.a38.hu/4565FF-35643F-646C-3475758AB3C",
            Items: [
                    FileType: "image/png" //Is this needed? Or can be obtained from URL?
                {
                    Behavior: "Display",
                     ItemTotal: 300,
                     SKU: "cn-d500-fxc3"
                 },
                 },
                 {
                 {
                     Name: "SD Card",
                     Name: "Sisters of Mercy Ticket",
                     UnitPrice: 50,
                     Description: "Sister of Mercy ticket, A38, 2017.09.20 21:30",
                    ItemTotal: 100,
                    Type: "Ticket",
                    SKU: "snd-sd-500gm"
                    URL: "https://tickets.a38.hu/436AFF-38563F-646C-2343579AADD",
                }
                     Behavior: "Display",
            ]
        }
    ]
}
</source>
 
 
 
 
 
 
 
 
 
 
<source lang="javascript">
{
    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",
                     Name: "Sisters of Mercy Invoice",
                     Description: "SanDisk SD mini 512GB - 3 year garantee",
                     Description: "Sister of Mercy Invoice, 12.000,- Ft, 2 pcs",
                    Quantity: 2,
                     Type: "Invoice",
                     Unit: "pcs",
                     URL: "https://tickets.a38.hu/436AFF-38563F-646C-45FFF46898D",
                     UnitPrice: 50,
                     Behavior: "Download",
                    ItemTotal: 100,
                     SKU: "snd-sd-500gm"
                 }
                 }
            ]
        }
     ]
     ]
}
}
</source>
</source>


[[CodeSamples|More Code Samples]]
==Process==
Payments are processed the usual way by calling <span class="api-ver">v2</span> [[Payment-Start-v2|/Payment/Start]], then <span class="api-ver">v4</span> [[Payment-PaymentState-v4|/v4/Payment/<PaymentId>/PaymentState]]. If the payment is successful, this API can be called using the PaymentID of the successful payment.

Latest revision as of 10:12, 25 March 2024

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 of a completed and successful payment is needed. The attachments will be available for display or download in the Barion web and mobile app.

API Input JSON

{
    POSKey: "999FFDDA-04FF-333F-CCCC-345FCB555FFC",
    PaymentID: "453AC5345-5A66-564D-D348-78754F3453AD", //will attach the files to this payment, if it was successful

    Attachments: [
               {
                    Name: "Sisters of Mercy Ticket",
                    Description: "Sister of Mercy ticket, A38, 2017.09.20 21:30",
                    Type: "Ticket",
                    URL: "https://tickets.a38.hu/4565FF-35643F-646C-3475758AB3C",
                    FileType: "image/png" //Is this needed? Or can be obtained from URL?
                    Behavior: "Display",
                },
                {
                    Name: "Sisters of Mercy Ticket",
                    Description: "Sister of Mercy ticket, A38, 2017.09.20 21:30",
                    Type: "Ticket",
                    URL: "https://tickets.a38.hu/436AFF-38563F-646C-2343579AADD",
                    Behavior: "Display",
                },
                {
                    Name: "Sisters of Mercy Invoice",
                    Description: "Sister of Mercy Invoice, 12.000,- Ft, 2 pcs",
                    Type: "Invoice",
                    URL: "https://tickets.a38.hu/436AFF-38563F-646C-45FFF46898D",
                    Behavior: "Download",
                }
    ]
}

Process

Payments are processed the usual way by calling v2 /Payment/Start, then v4 /v4/Payment/<PaymentId>/PaymentState. If the payment is successful, this API can be called using the PaymentID of the successful payment.