curl -X PUT \
/public/checkout/cart/{id}/confirm \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"email": "",
"phone": "",
"invoiceAddressId": "https:\/\/example.com\/",
"paymentMethodId": "https:\/\/example.com\/"
}'import requests
url = "https://coreapi.io/public/checkout/cart/{id}/confirm"
payload = {
"email": "jsmith@example.com",
"phone": "<string>",
"newInvoiceAddress": {
"countryCode": "DE",
"firstName": "John",
"lastName": "Doe",
"vatId": "DE123456789",
"companyName": "Acme Inc.",
"street": "Musterstraße 1",
"houseNumber": "1a",
"zip": "12345",
"city": "Berlin",
"addition": "c/o John Doe",
"salutation": "Herr",
"costCentre": "12345",
"type": "TYPE_DEFAULT"
},
"invoiceAddressId": "https://example.com/",
"newPaymentMethod": {
"gateway": "stripe",
"type": "card",
"customerId": "ad8f3b9e-1b1a-4b9a-9b9a-9b9a9b9a9b9a",
"isDefault": True,
"futureUsageAllowed": True,
"stripe": {
"paymentMethodId": "pm_1J5J2n2eZvKYlo2CJY2n2eZvKYlo2C",
"customerId": "cus_J5J2n2eZvKYlo2CJY2n2eZvKYlo2C"
},
"sepaMandate": {
"iban": "DE89370400440532013000",
"bic": "COBADEFFXXX",
"accountHolder": "Max Mustermann",
"mandateReference": "MNDT-123456789",
"signingDate": "2021-01-01",
"type": "CORE",
"sequence": "FRST"
},
"goCardless": {
"customerId": "CU123456789",
"mandateId": "MD123456789"
},
"redirectUrl": "https://example.com/checkout/confirm"
},
"paymentMethodId": "https://example.com/"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email: 'jsmith@example.com',
phone: '<string>',
newInvoiceAddress: {
countryCode: 'DE',
firstName: 'John',
lastName: 'Doe',
vatId: 'DE123456789',
companyName: 'Acme Inc.',
street: 'Musterstraße 1',
houseNumber: '1a',
zip: '12345',
city: 'Berlin',
addition: 'c/o John Doe',
salutation: 'Herr',
costCentre: '12345',
type: 'TYPE_DEFAULT'
},
invoiceAddressId: 'https://example.com/',
newPaymentMethod: {
gateway: 'stripe',
type: 'card',
customerId: 'ad8f3b9e-1b1a-4b9a-9b9a-9b9a9b9a9b9a',
isDefault: true,
futureUsageAllowed: true,
stripe: {
paymentMethodId: 'pm_1J5J2n2eZvKYlo2CJY2n2eZvKYlo2C',
customerId: 'cus_J5J2n2eZvKYlo2CJY2n2eZvKYlo2C'
},
sepaMandate: {
iban: 'DE89370400440532013000',
bic: 'COBADEFFXXX',
accountHolder: 'Max Mustermann',
mandateReference: 'MNDT-123456789',
signingDate: '2021-01-01',
type: 'CORE',
sequence: 'FRST'
},
goCardless: {customerId: 'CU123456789', mandateId: 'MD123456789'},
redirectUrl: 'https://example.com/checkout/confirm'
},
paymentMethodId: 'https://example.com/'
})
};
fetch('https://coreapi.io/public/checkout/cart/{id}/confirm', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://coreapi.io/public/checkout/cart/{id}/confirm",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'email' => 'jsmith@example.com',
'phone' => '<string>',
'newInvoiceAddress' => [
'countryCode' => 'DE',
'firstName' => 'John',
'lastName' => 'Doe',
'vatId' => 'DE123456789',
'companyName' => 'Acme Inc.',
'street' => 'Musterstraße 1',
'houseNumber' => '1a',
'zip' => '12345',
'city' => 'Berlin',
'addition' => 'c/o John Doe',
'salutation' => 'Herr',
'costCentre' => '12345',
'type' => 'TYPE_DEFAULT'
],
'invoiceAddressId' => 'https://example.com/',
'newPaymentMethod' => [
'gateway' => 'stripe',
'type' => 'card',
'customerId' => 'ad8f3b9e-1b1a-4b9a-9b9a-9b9a9b9a9b9a',
'isDefault' => true,
'futureUsageAllowed' => true,
'stripe' => [
'paymentMethodId' => 'pm_1J5J2n2eZvKYlo2CJY2n2eZvKYlo2C',
'customerId' => 'cus_J5J2n2eZvKYlo2CJY2n2eZvKYlo2C'
],
'sepaMandate' => [
'iban' => 'DE89370400440532013000',
'bic' => 'COBADEFFXXX',
'accountHolder' => 'Max Mustermann',
'mandateReference' => 'MNDT-123456789',
'signingDate' => '2021-01-01',
'type' => 'CORE',
'sequence' => 'FRST'
],
'goCardless' => [
'customerId' => 'CU123456789',
'mandateId' => 'MD123456789'
],
'redirectUrl' => 'https://example.com/checkout/confirm'
],
'paymentMethodId' => 'https://example.com/'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"redirectUrl": "<string>",
"confirmationMessage": "<string>"
}Confirms a cart.
Confirms a cart.
curl -X PUT \
/public/checkout/cart/{id}/confirm \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"email": "",
"phone": "",
"invoiceAddressId": "https:\/\/example.com\/",
"paymentMethodId": "https:\/\/example.com\/"
}'import requests
url = "https://coreapi.io/public/checkout/cart/{id}/confirm"
payload = {
"email": "jsmith@example.com",
"phone": "<string>",
"newInvoiceAddress": {
"countryCode": "DE",
"firstName": "John",
"lastName": "Doe",
"vatId": "DE123456789",
"companyName": "Acme Inc.",
"street": "Musterstraße 1",
"houseNumber": "1a",
"zip": "12345",
"city": "Berlin",
"addition": "c/o John Doe",
"salutation": "Herr",
"costCentre": "12345",
"type": "TYPE_DEFAULT"
},
"invoiceAddressId": "https://example.com/",
"newPaymentMethod": {
"gateway": "stripe",
"type": "card",
"customerId": "ad8f3b9e-1b1a-4b9a-9b9a-9b9a9b9a9b9a",
"isDefault": True,
"futureUsageAllowed": True,
"stripe": {
"paymentMethodId": "pm_1J5J2n2eZvKYlo2CJY2n2eZvKYlo2C",
"customerId": "cus_J5J2n2eZvKYlo2CJY2n2eZvKYlo2C"
},
"sepaMandate": {
"iban": "DE89370400440532013000",
"bic": "COBADEFFXXX",
"accountHolder": "Max Mustermann",
"mandateReference": "MNDT-123456789",
"signingDate": "2021-01-01",
"type": "CORE",
"sequence": "FRST"
},
"goCardless": {
"customerId": "CU123456789",
"mandateId": "MD123456789"
},
"redirectUrl": "https://example.com/checkout/confirm"
},
"paymentMethodId": "https://example.com/"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email: 'jsmith@example.com',
phone: '<string>',
newInvoiceAddress: {
countryCode: 'DE',
firstName: 'John',
lastName: 'Doe',
vatId: 'DE123456789',
companyName: 'Acme Inc.',
street: 'Musterstraße 1',
houseNumber: '1a',
zip: '12345',
city: 'Berlin',
addition: 'c/o John Doe',
salutation: 'Herr',
costCentre: '12345',
type: 'TYPE_DEFAULT'
},
invoiceAddressId: 'https://example.com/',
newPaymentMethod: {
gateway: 'stripe',
type: 'card',
customerId: 'ad8f3b9e-1b1a-4b9a-9b9a-9b9a9b9a9b9a',
isDefault: true,
futureUsageAllowed: true,
stripe: {
paymentMethodId: 'pm_1J5J2n2eZvKYlo2CJY2n2eZvKYlo2C',
customerId: 'cus_J5J2n2eZvKYlo2CJY2n2eZvKYlo2C'
},
sepaMandate: {
iban: 'DE89370400440532013000',
bic: 'COBADEFFXXX',
accountHolder: 'Max Mustermann',
mandateReference: 'MNDT-123456789',
signingDate: '2021-01-01',
type: 'CORE',
sequence: 'FRST'
},
goCardless: {customerId: 'CU123456789', mandateId: 'MD123456789'},
redirectUrl: 'https://example.com/checkout/confirm'
},
paymentMethodId: 'https://example.com/'
})
};
fetch('https://coreapi.io/public/checkout/cart/{id}/confirm', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://coreapi.io/public/checkout/cart/{id}/confirm",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'email' => 'jsmith@example.com',
'phone' => '<string>',
'newInvoiceAddress' => [
'countryCode' => 'DE',
'firstName' => 'John',
'lastName' => 'Doe',
'vatId' => 'DE123456789',
'companyName' => 'Acme Inc.',
'street' => 'Musterstraße 1',
'houseNumber' => '1a',
'zip' => '12345',
'city' => 'Berlin',
'addition' => 'c/o John Doe',
'salutation' => 'Herr',
'costCentre' => '12345',
'type' => 'TYPE_DEFAULT'
],
'invoiceAddressId' => 'https://example.com/',
'newPaymentMethod' => [
'gateway' => 'stripe',
'type' => 'card',
'customerId' => 'ad8f3b9e-1b1a-4b9a-9b9a-9b9a9b9a9b9a',
'isDefault' => true,
'futureUsageAllowed' => true,
'stripe' => [
'paymentMethodId' => 'pm_1J5J2n2eZvKYlo2CJY2n2eZvKYlo2C',
'customerId' => 'cus_J5J2n2eZvKYlo2CJY2n2eZvKYlo2C'
],
'sepaMandate' => [
'iban' => 'DE89370400440532013000',
'bic' => 'COBADEFFXXX',
'accountHolder' => 'Max Mustermann',
'mandateReference' => 'MNDT-123456789',
'signingDate' => '2021-01-01',
'type' => 'CORE',
'sequence' => 'FRST'
],
'goCardless' => [
'customerId' => 'CU123456789',
'mandateId' => 'MD123456789'
],
'redirectUrl' => 'https://example.com/checkout/confirm'
],
'paymentMethodId' => 'https://example.com/'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"redirectUrl": "<string>",
"confirmationMessage": "<string>"
}Autorisierungen
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Pfadparameter
Cart identifier
Body
The updated Cart resource
The customer email to be used for the cart. This is required when the cart is not attached to a customer.
The customer phone to be used for the cart. This is required when the cart is not attached to a customer.
The new customer address to be used for the cart.
Show child attributes
Show child attributes
The customer address to be used for the cart.
"https://example.com/"
The new payment method to be used for the cart.
Show child attributes
Show child attributes
The payment method to be used for the cart.
"https://example.com/"
Antwort
Cart resource updated
The action to perform after the cart confirmation.
redirect, none, confirmation_message The URL to redirect to after the cart confirmation.
The status of the cart after the cart confirmation.
open, confirming, redirect_to_payment, expired, completed, paid The message to show to the user after the cart confirmation.
War diese Seite hilfreich?