Zum Hauptinhalt springen
POST
/
checkout-links
/
{id}
/
cart
cURL
curl -X POST \
 /checkout-links/{id}/cart \
 --header "Content-Type: application/json" \
 --header "Authorization: Bearer <token>" \
 --data '{
    "customerId": "ad7f7b7d-7b7d-7b7d-7b7d-7b7d-7b7d7b7d7b7d",
    "metadata": [
        ""
    ]
}'
{
  "cartId": "ad7f7b7d-7b7d-7b7d-7b7d-7b7d7b7d7b7d",
  "customerId": "ad7f7b7d-7b7d-7b7d-7b7d-7b7d7b7d7b7d",
  "url": "https://example.com/cart/123"
}

Autorisierungen

Authorization
string
header
erforderlich

Value for the Authorization header parameter.

Pfadparameter

id
string
erforderlich

CheckoutLink identifier

Body

The new CheckoutLink resource

customerId
string | null

The ID of the customer which should be pre-authenticated for the cart. The receiver of the cart link can see and select the customers payment methods and addresses. If the customer is not provided, the cart will be anonymous.

Beispiel:

"ad7f7b7d-7b7d-7b7d-7b7d-7b7d-7b7d7b7d7b7d"

metadata
string[]

A collection of key-value pairs that can be linked to an object. This feature is beneficial for storing extra details regarding the object in an organized manner. To remove all keys, simply submit an empty value to the metadata. The metadata is shown in webhooks and api responses.

Beispiel:
{ "key": "value" }

Antwort

CheckoutLink resource created

cartId
string

The ID of the cart

Beispiel:

"ad7f7b7d-7b7d-7b7d-7b7d-7b7d7b7d7b7d"

customerId
string | null

The ID of the customer.

Beispiel:

"ad7f7b7d-7b7d-7b7d-7b7d-7b7d7b7d7b7d"

url
string

The public URL to the cart

Beispiel:

"https://example.com/cart/123"