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 |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
{{PageTitle|title=Local producers' marketplace - C2C sample}} | {{PageTitle|title=Local producers' marketplace - C2C sample}} | ||
This example is the input of <span class="api-ver">v2</span> [[Payment-Start-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. | This example is the input of <span class="api-ver">v2</span> [[Payment-Start-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. Read more about [[C2C_Payments|C2C Payments]] and review transaction and API mappings. | ||
'''API Input JSON''' | '''API Input JSON''' | ||
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: "" | ||
}, | }, | ||
Line 45: | Line 69: | ||
{ | { | ||
POSTransactionId: "fa-01-02", | POSTransactionId: "fa-01-02", | ||
Payee: " | Payee: "secondfarmer@example.com", | ||
Total: 30, | Total: 30, | ||
PayeeTransactions: [ | PayeeTransactions: [ | ||
{ | { | ||
POSTransactionId: "TR-01-02-01", | POSTransactionId: "TR-01-02-01", | ||
Payee: "[email protected]", | Payee: "[email protected]", | ||
Total: | Total: 3, | ||
Comment: "Marketplace commission: TR-01-02-01." | Comment: "Marketplace commission: TR-01-02-01." | ||
}, | }, | ||
{ | |||
POSTransactionId: "TR-01-02-02", | |||
Payee: "[email protected]", | |||
Total: 3, | |||
Comment: "Local agent commission: TR-01-02-02." | |||
}, | |||
], | ], | ||
Items: [ | Items: [ | ||
{ | { | ||
Name: " | Name: "Old Amsterdam", | ||
Description: " | Description: "Hard cheese from the Netherlands", | ||
Quantity: 2, | |||
Unit: "pcs", | |||
UnitPrice: 10, | |||
ItemTotal: 20, | |||
SKU: "" | |||
}, | |||
{ | |||
Name: "Edam", | |||
Description: "Soft cheese from the Netherlands", | |||
Quantity: 1, | Quantity: 1, | ||
Unit: " | Unit: "pcs", | ||
UnitPrice: | UnitPrice: 10, | ||
ItemTotal: | ItemTotal: 10, | ||
SKU: "" | SKU: "" | ||
}, | }, |
Latest revision as of 07:41, 23 March 2018
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. Read more about C2C Payments and review transaction and API mappings.
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,
PayeeTransactions: [
{
POSTransactionId: "TR-01-02-01",
Payee: "[email protected]",
Total: 3,
Comment: "Marketplace commission: TR-01-02-01."
},
{
POSTransactionId: "TR-01-02-02",
Payee: "[email protected]",
Total: 3,
Comment: "Local agent commission: TR-01-02-02."
},
],
Items: [
{
Name: "Old Amsterdam",
Description: "Hard cheese from the Netherlands",
Quantity: 2,
Unit: "pcs",
UnitPrice: 10,
ItemTotal: 20,
SKU: ""
},
{
Name: "Edam",
Description: "Soft cheese from the Netherlands",
Quantity: 1,
Unit: "pcs",
UnitPrice: 10,
ItemTotal: 10,
SKU: ""
},
]
}
]
}