Sample-uber: Difference between revisions

From Barion Documentation
Jump to navigation Jump to search
No edit summary
No edit summary
 
(5 intermediate revisions by 2 users not shown)
Line 2: Line 2:
{{PageTitle|title=Car sharing 'Uber' style - C2C sample}}
{{PageTitle|title=Car sharing 'Uber' style - C2C sample}}


This example is the input of <span class="api-ver">v2</span> [[Payment-Start-v2|/Payment/Start]] API call for a car sharing 'Uber' style service, where passengers pay a fee for rides to drivers, and the app provider receives a fee. The API call is initiated by the app provider, as the facilitator.
This example is the input of <span class="api-ver">v2</span> [[Payment-Start-v2|/Payment/Start]] API call for a car sharing 'Uber' style service, where passengers pay a fee for rides to drivers, and the app provider receives a fee. The API call is initiated by the app provider, as the facilitator. Read more about [[C2C_Payments|C2C Payments]] and review transaction and API mappings. Also read more about [[Token_payment|Token payments]].


'''API Input JSON'''
'''API Input JSON'''

Latest revision as of 07:41, 23 March 2018

Car sharing 'Uber' style - C2C sample

This example is the input of v2 /Payment/Start API call for a car sharing 'Uber' style service, where passengers pay a fee for rides to drivers, and the app provider receives a fee. The API call is initiated by the app provider, as the facilitator. Read more about C2C Payments and review transaction and API mappings. Also read more about Token payments.

API Input JSON

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

    InitiateRecurrence : "False", 
    RecurrenceId : "345986-25646-3456346", //Payment automatically made after ride using Token

    PayerHint: "[email protected]",
    Locale: "en-US",
    Currency: "USD",
    FundingSources: [
        "All"
    ],
    Transactions: [
        {
            POSTransactionId: "fa-01-01",
            Payee: "[email protected]",
            Total: 50,
            //Immediately after crediting $50 to driver, $5 will be sent to the app provider.
            PayeeTransactions: [
                {
                    POSTransactionId: "TR-01-01-01",
                    Payee: "[email protected]",
                    Total: 5,
                    Comment: "Car sharing commission: TR-01-01-01."
                },
            ],
            Items: [
                {
                    Name: "Car sharing ride",
                    Description: "Ride from 23 Lucky road, Queens to 456 Broadway, Manhattan",
                    Quantity: 20,
                    Unit: "miles",
                    UnitPrice: 2.5,
                    ItemTotal: 50,
                    SKU: ""
                },
            ]
        }
    ]
}

More Code Samples