CodeSamples: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 4: | Line 4: | ||
Below are API call samples for different payment scenarios. | Below are API call samples for different payment scenarios. | ||
== | ==Traditional webshops== | ||
*[[Getting_started|Getting started - overview of Barion payments]] | *[[Getting_started|Getting started - overview of Barion payments]] | ||
*[[Sandbox|Setting up the Sandbox environment and testing payments]] | *[[Sandbox|Setting up the Sandbox environment and testing payments]] | ||
*[[Creating_an_account|Creating an account]] | *[[Creating_an_account|Creating an account]] | ||
==Sharing Economy== | |||
*[[sample-onlineclass|Marketplace for online classes]] | |||
*[[sample-creativemarkeplace|Creative marketplace]] | |||
{{NotificationBox|title=IMPORTANT|text=Do not copy paste these samples, because some sample parameters (such as POSKey) will not work in live environments! |color=#FF7A3D}} | {{NotificationBox|title=IMPORTANT|text=Do not copy paste these samples, because some sample parameters (such as POSKey) will not work in live environments! |color=#FF7A3D}} | ||
==== Több szereplős piactér ==== | ==== Több szereplős piactér ==== |
Revision as of 15:40, 4 September 2017
Sample API Calls
Below are API call samples for different payment scenarios.
Traditional webshops
- Getting started - overview of Barion payments
- Setting up the Sandbox environment and testing payments
- Creating an account
Sharing Economy
IMPORTANT
Do not copy paste these samples, because some sample parameters (such as POSKey) will not work in live environments!
Több szereplős piactér
Ez a példa egy olyan piacteret mutat be, ahol egy vásárló fizet több kézműves eladónak, akik a piactéren árulnak, és amiből a piactér részesedik 10-10%-ot.
Bemenet
{
POSKey: "999FFDDA-04FF-333F-CCCC-345FCB555FFC",
PaymentType: "Immediate",
PaymentWindow: "00:30:00",
PaymentRequestId: "fa-01",
PayerHint: "[email protected]",
Locale: "hu-HU",
Currency: "HUF",
FundingSources: [
"All"
],
Transactions: [
{
POSTransactionId: "fa-01-01",
Payee: "[email protected]",
Total: 5000,
//Immediately after crediting 5000 Ft to [email protected], 500 Ft will be sent to the marketplace.
PayeeTransactions: [
{
POSTransactionId: "TR-01-01-01",
Payee: "[email protected]",
Total: 500,
Comment: "Marketplace facilitation fee: TR-01-01-01."
},
],
Items: [
{
Name: "Görbe bögre",
Description: "Kézműves görbe bögre, 2dl, kerámia ",
Quantity: 1,
Unit: "db",
UnitPrice: 5000,
ItemTotal: 5000,
SKU: ""
},
]
},
{
POSTransactionId: "fa-01-02",
Payee: "[email protected]",
Total: 3000,
//Immediately after crediting 3000 Ft to [email protected], 300 Ft will be sent to the marketplace.
PayeeTransactions: [
{
POSTransactionId: "TR-01-02-01",
Payee: "[email protected]",
Total: 300,
Comment: "Marketplace facilitation fee: TR-01-02-01."
},
],
Items: [
{
Name: "Bugylibicska",
Description: "Fa nyelű bicska, 8 cm pengével, bőr tokkal ",
Quantity: 1,
Unit: "db",
UnitPrice: 3000,
ItemTotal: 3000,
SKU: ""
},
]
}
]
}