Difference between revisions of "Marketplace Example"

From Barion Documentation
Jump to navigation Jump to search
Line 89: Line 89:
 
If they choose the Barion wallet option, and log in successfully, they can finish the payment with any of their saved cards ( or add a new one), or with the funds in their wallet:
 
If they choose the Barion wallet option, and log in successfully, they can finish the payment with any of their saved cards ( or add a new one), or with the funds in their wallet:
  
[[File:marketplace_payment_payment_type_example.png]]
+
[[File:marketplace_payment_payment_type_example.png | 700px]]
  
 
In case of bank card payment, they need to fill the required card datas and their email address.
 
In case of bank card payment, they need to fill the required card datas and their email address.

Revision as of 18:00, 19 December 2017

Example of a marketplace pamyent

This guide's purpose to show an immediate payment process including a facilitator, from end to end.

In this example a demo marketplace will be used as the facilitator. This facilitator will manage the payment process, but it does not take part in the process as a payee. Neither the customer nor the payee(s) take any actions.

The process starts with the shopping part. The user select products on a given site. These products belongs to manufacturers ( other "users" of the system), therefore the prices of their product will be transferred to them. Both manufacturers have a registered Barion wallet but they do not own a shop in the system. The demo products will be the followings ( including the manufacturers):

Marketplace products example.png


The next step is start the payment for the selected products via Barion. The facilitator prepares the payment trough the Barion API (Payment Start). For this concrete payment the required JSON file would look like this :

 
{
    "POSKey": "60I98E979-Z592-4AA2-BC9F-DF14ABA4P8F17",
    "PaymentType": "Immediate",
    "PaymentRequestId": "TEST-01",
    "GuestCheckOut" : true,
    "FundingSources": ["All"],
    "Locale":"en-US",
    "Currency":"EUR",
    "Transactions": [
        {
            "POSTransactionId": "TEST-01-01",
            "Payee": "[email protected]",
            "Total": "49",
            "Comment": "Order 1",
            "Items": [
                {
                    "Name": "Fresh potatoes",
                    "Description": "Fresh potatoes",
                    "Quantity": 3,
                    "Unit": "kg",
                    "UnitPrice": 3,
                    "ItemTotal": 9,
                    "SKU": "SM-01"
                },
                {
                    "Name": "Ginger, sliced",
                    "Description": "Ginger, sliced",
                    "Quantity": 2,
                    "Unit": "packs",
                    "UnitPrice": 10,
                    "ItemTotal": 20,
                    "SKU": "SM-02"
                },
                {
                    "Name": "Truffle box",
                    "Description": "Truffle box",
                    "Quantity": 1,
                    "Unit": "pc",
                    "UnitPrice": 20,
                    "ItemTotal": 20,
                    "SKU": "SM-03"
                }
            ]
        },
        {
            "POSTransactionId": "TEST-01-02",
            "Payee": "[email protected]",
            "Total": "35",
            "Comment": "Order  2",
            "Items": [
                {
                    "Name": "8 piece kitchen knives set",
                    "Description": "8 piece kitchen knives set",
                    "Quantity": 1,
                    "Unit": "pc",
                    "UnitPrice": 35,
                    "ItemTotal": 35,
                    "SKU": "SM-04"
                }
            ]
        }
    ]
}

Please DO NOT copy this JSON to your project without modifications, it will NOT work.

If the prepare is done, the user will be redirected to the following page:

750px

At this point they can choose from paying using either with their Barion wallet or with bank card. If they choose the Barion wallet option, and log in successfully, they can finish the payment with any of their saved cards ( or add a new one), or with the funds in their wallet:

Marketplace payment payment type example.png

In case of bank card payment, they need to fill the required card datas and their email address.

After the payment is successfully finished, they will be redirected to the following page:

700px


After a short period of time, they will be redirected back to the shop's site (the RerdirectUrl can be specified at the Payment Start).

Since this is a marketplace scenario, the payees will be the manufacturers(in this case Terry and Robert). They will pay a fee to the facilitator (they may pay for other third parties, however in this example no other payments will happen for simplicity) for its services. These fees are calculated by the Barion System.