Difference between revisions of "Sample-onlineclass"

From Barion Documentation
Jump to navigation Jump to search
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 
{{PageTitle|title=Marketplace for online classes - C2C sample}}
 
{{PageTitle|title=Marketplace for online classes - C2C sample}}
 +
 +
{{NotificationBox|title=WARNING|text=The complex payment structure is not yet implemented for currencies other than HUF!|color=#c20000}}
  
 
This example is the input of <span class="api-ver">v2</span> [[Payment-Start-v2|/Payment/Start]] API call for an online marketplace, where students pay a fee for online classes to teachers, and the marketplace receives a fee. The API call is initiated by the marketplace, as the facilitator. Read more about [[C2C_Payments|C2C Payments]] and review transaction and API mappings.  
 
This example is the input of <span class="api-ver">v2</span> [[Payment-Start-v2|/Payment/Start]] API call for an online marketplace, where students pay a fee for online classes to teachers, and the marketplace receives a fee. The API call is initiated by the marketplace, as the facilitator. Read more about [[C2C_Payments|C2C Payments]] and review transaction and API mappings.  

Revision as of 07:17, 18 September 2017

Marketplace for online classes - C2C sample

WARNING
The complex payment structure is not yet implemented for currencies other than HUF!

This example is the input of v2 /Payment/Start API call for an online marketplace, where students pay a fee for online classes to teachers, and the marketplace receives a fee. The API call is initiated by the marketplace, as the facilitator. Read more about C2C Payments and review transaction and API mappings.

API Input JSON

{
    POSKey: "999FFDDA-04FF-333F-CCCC-345FCB555FFC",
    PaymentType: "Immediate",             
    PaymentWindow: "00:30:00",
    PaymentRequestId: "fa-01",
    PayerHint: "[email protected]",
    Locale: "en-US",
    Currency: "EUR",
    FundingSources: [
        "All"
    ],
    Transactions: [
        {
            POSTransactionId: "fa-01-01",
            Payee: "[email protected]",
            Total: 50,
            //Immediately after crediting €50 to teacher, €5 will be sent to the marketplace.
            PayeeTransactions: [
                {
                    POSTransactionId: "TR-01-01-01",
                    Payee: "[email protected]",
                    Total: 5,
                    Comment: "Marketplace commission: TR-01-01-01."
                },
            ],
            Items: [
                {
                    Name: "English lesson",
                    Description: "Advanced Business English lesson from native speaker",
                    Quantity: 2,
                    Unit: "hour",
                    UnitPrice: 25,
                    ItemTotal: 50,
                    SKU: "ENG-ADV-NTV"
                },
            ]
        }
    ]
}


More Code Samples