Sample-localmarkeplace: Difference between revisions
Jump to navigation
Jump to search
(Created page with "__NOTOC__ {{PageTitle|title=Local producers' marketplace - C2C sample}} This example is the input of <span class="api-ver">v2</span> /Payment/Start API c...") |
No edit summary |
||
Line 20: | Line 20: | ||
{ | { | ||
POSTransactionId: "fa-01-01", | POSTransactionId: "fa-01-01", | ||
Payee: " | Payee: "firstfarmer@example.com", | ||
Total: | Total: 20, | ||
//Immediately after crediting | //Immediately after crediting €20 to firstfarmer@example.com, €2 will be sent to the marketplace and €2 will be sent to the local agent. | ||
PayeeTransactions: [ | PayeeTransactions: [ | ||
{ | { | ||
POSTransactionId: "TR-01-01-01", | POSTransactionId: "TR-01-01-01", | ||
Payee: "[email protected]", | Payee: "[email protected]", | ||
Total: | Total: 2, | ||
Comment: "Marketplace commission: TR-01-01-01." | Comment: "Marketplace commission: TR-01-01-01." | ||
}, | }, | ||
{ | |||
POSTransactionId: "TR-01-01-02", | |||
Payee: "[email protected]", | |||
Total: 2, | |||
Comment: "Local agent commission: TR-01-01-02." | |||
}, | |||
], | ], | ||
Items: [ | Items: [ | ||
{ | { | ||
Name: " | Name: "Carrots", | ||
Description: " | Description: "Organic carrots", | ||
Quantity: | Quantity: 2, | ||
Unit: " | Unit: "kg", | ||
UnitPrice: | UnitPrice: 2, | ||
ItemTotal: | ItemTotal: 4, | ||
SKU: "" | |||
}, | |||
{ | |||
Name: "Cabbages", | |||
Description: "Cabbages", | |||
Quantity: 2, | |||
Unit: "kg", | |||
UnitPrice: 2, | |||
ItemTotal: 4, | |||
SKU: "" | |||
}, | |||
{ | |||
Name: "Artichokes", | |||
Description: "Organic artichokes", | |||
Quantity: 6, | |||
Unit: "pcs", | |||
UnitPrice: 2, | |||
ItemTotal: 12, | |||
SKU: "" | SKU: "" | ||
}, | }, |
Revision as of 20:49, 4 September 2017
Local producers' marketplace - C2C sample
This example is the input of v2 /Payment/Start API call for an online marketplace, where customers can shop groceries from several local producers, delivered to a local marketplace managed by a local agent. The agent and the marketplace both receive a 10% commission from each farmer. The API call is initiated by the marketplace, as the facilitator.
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: 20,
//Immediately after crediting €20 to [email protected], €2 will be sent to the marketplace and €2 will be sent to the local agent.
PayeeTransactions: [
{
POSTransactionId: "TR-01-01-01",
Payee: "[email protected]",
Total: 2,
Comment: "Marketplace commission: TR-01-01-01."
},
{
POSTransactionId: "TR-01-01-02",
Payee: "[email protected]",
Total: 2,
Comment: "Local agent commission: TR-01-01-02."
},
],
Items: [
{
Name: "Carrots",
Description: "Organic carrots",
Quantity: 2,
Unit: "kg",
UnitPrice: 2,
ItemTotal: 4,
SKU: ""
},
{
Name: "Cabbages",
Description: "Cabbages",
Quantity: 2,
Unit: "kg",
UnitPrice: 2,
ItemTotal: 4,
SKU: ""
},
{
Name: "Artichokes",
Description: "Organic artichokes",
Quantity: 6,
Unit: "pcs",
UnitPrice: 2,
ItemTotal: 12,
SKU: ""
},
]
},
{
POSTransactionId: "fa-01-02",
Payee: "[email protected]",
Total: 30,
//Immediately after crediting €30 to [email protected], €3 will be sent to the marketplace.
PayeeTransactions: [
{
POSTransactionId: "TR-01-02-01",
Payee: "[email protected]",
Total: 30,
Comment: "Marketplace commission: TR-01-02-01."
},
],
Items: [
{
Name: "Necklace",
Description: "Hand made copper necklace with glass decor",
Quantity: 1,
Unit: "db",
UnitPrice: 30,
ItemTotal: 30,
SKU: ""
},
]
}
]
}