Set payment information and place order for a specified cart.
application/json
POST
/V1/negotiable-carts/{cartId}/payment-information
cURL (application/json)
curl \
--request POST 'https://magento2.winkelstraat.mac/rest/all/V1/negotiable-carts/{cartId}/payment-information' \
--header "Content-Type: application/json" \
--data '{"paymentMethod":{"po_number":"string","method":"string","additional_data":["string"],"extension_attributes":{"agreement_ids":["string"],"origin":"string"}},"billingAddress":{"id":42,"region":"string","region_id":42,"region_code":"string","country_id":"string","street":["string"],"company":"string","telephone":"string","fax":"string","postcode":"string","city":"string","firstname":"string","lastname":"string","middlename":"string","prefix":"string","suffix":"string","vat_id":"string","customer_id":42,"email":"string","same_as_billing":42,"customer_address_id":42,"save_in_address_book":42,"extension_attributes":{"discounts":[{"discount_data":{"amount":42.0,"base_amount":42.0,"original_amount":42.0,"base_original_amount":42.0},"rule_label":"string","rule_i_d":42}],"gift_registry_id":42,"pickup_location_code":"string"},"custom_attributes":[{"attribute_code":"string","value":"string"}]}}'
curl \
--request POST 'https://magento2.winkelstraat.mac/rest/all/V1/negotiable-carts/{cartId}/payment-information' \
--header "Content-Type: application/xml"
Request examples
{
"paymentMethod": {
"po_number": "string",
"method": "string",
"additional_data": [
"string"
],
"extension_attributes": {
"agreement_ids": [
"string"
],
"origin": "string"
}
},
"billingAddress": {
"id": 42,
"region": "string",
"region_id": 42,
"region_code": "string",
"country_id": "string",
"street": [
"string"
],
"company": "string",
"telephone": "string",
"fax": "string",
"postcode": "string",
"city": "string",
"firstname": "string",
"lastname": "string",
"middlename": "string",
"prefix": "string",
"suffix": "string",
"vat_id": "string",
"customer_id": 42,
"email": "string",
"same_as_billing": 42,
"customer_address_id": 42,
"save_in_address_book": 42,
"extension_attributes": {
"discounts": [
{
"discount_data": {
"amount": 42.0,
"base_amount": 42.0,
"original_amount": 42.0,
"base_original_amount": 42.0
},
"rule_label": "string",
"rule_i_d": 42
}
],
"gift_registry_id": 42,
"pickup_location_code": "string"
},
"custom_attributes": [
{
"attribute_code": "string",
"value": "string"
}
]
}
}
Request examples
<?xml version="1.0" encoding="UTF-8"?>
<root>
<paymentMethod>
<po-number>string</po-number>
<method>string</method>
<additional-data type="array">
<additional-datum>string</additional-datum>
</additional-data>
<extension-attributes>
<agreement-ids type="array">
<agreement-id>string</agreement-id>
</agreement-ids>
<origin>string</origin>
</extension-attributes>
</paymentMethod>
<billingAddress>
<id type="integer">42</id>
<region>string</region>
<region-id type="integer">42</region-id>
<region-code>string</region-code>
<country-id>string</country-id>
<street type="array">
<street>string</street>
</street>
<company>string</company>
<telephone>string</telephone>
<fax>string</fax>
<postcode>string</postcode>
<city>string</city>
<firstname>string</firstname>
<lastname>string</lastname>
<middlename>string</middlename>
<prefix>string</prefix>
<suffix>string</suffix>
<vat-id>string</vat-id>
<customer-id type="integer">42</customer-id>
<email>string</email>
<same-as-billing type="integer">42</same-as-billing>
<customer-address-id type="integer">42</customer-address-id>
<save-in-address-book type="integer">42</save-in-address-book>
<extension-attributes>
<discounts type="array">
<discount>
<discount-data>
<amount type="float">42.0</amount>
<base-amount type="float">42.0</base-amount>
<original-amount type="float">42.0</original-amount>
<base-original-amount type="float">42.0</base-original-amount>
</discount-data>
<rule-label>string</rule-label>
<rule-i-d type="integer">42</rule-i-d>
</discount>
</discounts>
<gift-registry-id type="integer">42</gift-registry-id>
<pickup-location-code>string</pickup-location-code>
</extension-attributes>
<custom-attributes type="array">
<custom-attribute>
<attribute-code>string</attribute-code>
<value>string</value>
</custom-attribute>
</custom-attributes>
</billingAddress>
</root>
Response examples (200)
42
Response examples (200)
42
Response examples (401)
{
"message": "string",
"errors": [
{
"message": "string",
"parameters": [
{
"resources": "string",
"fieldName": "string",
"fieldValue": "string"
}
]
}
],
"code": 42,
"parameters": [
{
"resources": "string",
"fieldName": "string",
"fieldValue": "string"
}
],
"trace": "string"
}
Response examples (401)
<?xml version="1.0" encoding="UTF-8"?>
<root>
<message>string</message>
<errors type="array">
<error>
<message>string</message>
<parameters type="array">
<parameter>
<resources>string</resources>
<fieldName>string</fieldName>
<fieldValue>string</fieldValue>
</parameter>
</parameters>
</error>
</errors>
<code type="integer">42</code>
<parameters type="array">
<parameter>
<resources>string</resources>
<fieldName>string</fieldName>
<fieldValue>string</fieldValue>
</parameter>
</parameters>
<trace>string</trace>
</root>
Response examples (500)
{
"message": "string",
"errors": [
{
"message": "string",
"parameters": [
{
"resources": "string",
"fieldName": "string",
"fieldValue": "string"
}
]
}
],
"code": 42,
"parameters": [
{
"resources": "string",
"fieldName": "string",
"fieldValue": "string"
}
],
"trace": "string"
}
Response examples (500)
<?xml version="1.0" encoding="UTF-8"?>
<root>
<message>string</message>
<errors type="array">
<error>
<message>string</message>
<parameters type="array">
<parameter>
<resources>string</resources>
<fieldName>string</fieldName>
<fieldValue>string</fieldValue>
</parameter>
</parameters>
</error>
</errors>
<code type="integer">42</code>
<parameters type="array">
<parameter>
<resources>string</resources>
<fieldName>string</fieldName>
<fieldValue>string</fieldValue>
</parameter>
</parameters>
<trace>string</trace>
</root>
Response examples (default)
{
"message": "string",
"errors": [
{
"message": "string",
"parameters": [
{
"resources": "string",
"fieldName": "string",
"fieldValue": "string"
}
]
}
],
"code": 42,
"parameters": [
{
"resources": "string",
"fieldName": "string",
"fieldValue": "string"
}
],
"trace": "string"
}
Response examples (default)
<?xml version="1.0" encoding="UTF-8"?>
<root>
<message>string</message>
<errors type="array">
<error>
<message>string</message>
<parameters type="array">
<parameter>
<resources>string</resources>
<fieldName>string</fieldName>
<fieldValue>string</fieldValue>
</parameter>
</parameters>
</error>
</errors>
<code type="integer">42</code>
<parameters type="array">
<parameter>
<resources>string</resources>
<fieldName>string</fieldName>
<fieldValue>string</fieldValue>
</parameter>
</parameters>
<trace>string</trace>
</root>