Marketplace Example: Difference between revisions

From Barion Documentation
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
{{PageTitle|title=Example of a marketplace pamyent}}
{{PageTitle|title=Example of a marketplace pamyent}}


This guide's purpose to show an immediate payment process including a facilitator, all along.  
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.  
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 an arbitrary  site. These products  belongs to manufacturers ( other "users" of the system). The demo products will be the followings ( including the manufacturers):
 
The process starts with the shopping part. The user select  products on an arbitrary  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):


[[File:marketplace_products_example.png]]
[[File:marketplace_products_example.png]]




If the user is done with the shopping and all  desired products in their cart, they can complete the payment using Barion. In this case user will be redirected to the following page:
The next step is start the payment for the selected products via Barion. The facilitator prepares the payment trough the Barion API.
For this concrete payment the JSON file required for [[Payment-Start-v2|Payment Start]] would look like this :
 
<syntaxhighlight lang="json">
{
    "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"
                }
            ]
        }
    ]
}
</syntaxhighlight>
 
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:


[[File:marketplace_payment_example.png|750px]]
[[File:marketplace_payment_example.png|750px]]


At this point they can choose from paying using either with their Barion wallet or with bank card.
At this point they can choose from paying using either with their Barion wallet or with bank card.
Line 20: Line 92:
After the payment is successfully finished, they will be redirected to the following page:
After the payment is successfully finished, they will be redirected to the following page:


[[File:marketplace_payment_finish_example.png]]
[[File:marketplace_payment_finish_example.png | 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-v2|Payment Start]].


Since this is a marketplace scenario, the payees will be the manufacturers( Terry and Robert). They will pay a fee to the facilitator (they could 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.
Since this is a marketplace scenario, the payees will be the manufacturers( 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.
And
And

Revision as of 17:53, 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 an arbitrary 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):


The next step is start the payment for the selected products via Barion. The facilitator prepares the payment trough the Barion API. For this concrete payment the JSON file required for Payment Start 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:

File:Marketplace payment example.png

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. 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:

File:Marketplace payment finish example.png


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( 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. And