POST v1​/ carts​/:cart_id​/checkout​/:payment_type

Endpoint to perform a checkout of the Cart.

Instant gratification

Do it yourself from console!

Assuming that you have a valid token previously exported into BEARER env variable
and that:

Try to perform the checkout of your Cart
curl -i -H "Authorization: Bearer $BEARER" \
https://api.blomming.com/v1/carts/1234/checkout/MOO \
-F order\[ship_to_first_name\]=Andrea \
-F order\[ship_to_last_name\]=Salicetti \
-F order\[email\][email protected] \
-F order\[ship_to_address\]=Via%20Teodosio%2065 \
-F order\[ship_to_postal_code\]=20100 \
-F order\[ship_to_city\]=Milano \
-F order\[ship_to_province\]=MI \
-F order\[ship_to_country\]=Italy \
-F order\[bill_is_ship\]=false \
-F order\[bill_to_first_name\]=Nicola%20Junior \
-F order\[bill_to_last_name\]=Vitto \
-F order\[bill_to_address\]=Via%20Teodosio%2065 \
-F order\[bill_to_postal_code\]=20100 \
-F order\[bill_to_city\]=Milano \
-F order\[bill_to_province\]=MI \
-F order\[bill_to_country\]=Italy \
-F order\[bill_to_company\]= Blomming%20SpA \
-F order\[bill_to_vat_number\]= IT07199240966 \
-F order\[phone_number3\]=32812345678

On successfull response (status: 200), an object (Order) with the following properties is returned:

while on failure responses (status: 400 or 404):

Request

Example Request

{
  "order": {
    "ship_to_first_name": "Andrea",
    "ship_to_last_name": "Salicetti",
    "ship_to_address": "via%20Teodosio%2065",
    "ship_to_postal_code": 20100,
    "ship_to_city": "Milano",
    "ship_to_province": "MI",
    "ship_to_country": "Italy",
    "bill_is_ship": "false",
    "bill_to_first_name": "Nicola%20Junior",
    "bill_to_last_name": "Vitto",
    "bill_to_address": "via%20Teodosio%2065",
    "bill_to_postal_code": "20100",
    "bill_to_city": "Milano",
    "bill_to_province": "MI",
    "bill_to_country": "Italy",
    "bill_to_company": "Blomming%20SpA",
    "bill_to_vat_number": "IT07199240966",
    "phone_number3": ""
  }
}

Request Parameters

  • order

    The details of the order.

    • Required: yes
    • ship_to_first_name

      The first name of the recipient.

      • Required: yes
      • Type: string
      • Example: "Andrea"
    • ship_to_last_name

      The last name of the recipient.

      • Required: yes
      • Type: string
      • Example: "Salicetti"
    • ship_to_address

      The address of the recipient.

      • Required: yes
      • Type: string
      • Example: "via%20Teodosio%2065"
    • ship_to_postal_code

      The postal code of the recipient.

      • Required: yes
      • Type: string
      • Example: 20100
    • ship_to_city

      The city of the recipient.

      • Required: yes
      • Type: string
      • Example: "Milano"
    • ship_to_province

      The province of the recipient.

      • Required: yes
      • Type: string
      • Example: "MI"
    • ship_to_country

      The country of the recipient.

      • Required: yes
      • Type: string
      • Example: "Italy"
    • bill_is_ship

      A flag that specifies if the the shipping address is the same. as the billing address.

      • Required: yes
      • Type: boolean
      • Example: "false"
    • bill_to_first_name

      The first name of the recipient of the invoice.

      • Required: no
      • Type: string
      • Example: "Nicola%20Junior"
    • bill_to_last_name

      The last name of the recipient of the invoice.

      • Required: no
      • Type: string
      • Example: "Vitto"
    • bill_to_address

      The address of the recipient of the invoice.

      • Required: no
      • Type: string
      • Example: "via%20Teodosio%2065"
    • bill_to_postal_code

      The postal code of the recipient of the invoice.

      • Required: no
      • Type: string
      • Example: "20100"
    • bill_to_city

      The city of the recipient of the invoice.

      • Required: no
      • Type: string
      • Example: "Milano"
    • bill_to_province

      The province of the recipient of the invoice.

      • Required: no
      • Type: string
      • Example: "MI"
    • bill_to_country

      The country of the recipient.

      • Required: no
      • Type: string
      • Example: "Italy"
    • bill_to_company

      of the invoice.

      • Required: no
      • Type: string
      • Example: "Blomming%20SpA"
    • bill_to_vat_number

      of the invoice.

      • Required: no
      • Type: string
      • Example: "IT07199240966"
    • phone_number3

      of the invoice.

      • Required: no
      • Type: string
      • Example: ""

Response

Example Response

{
  "checkout_token": "EC-12345",
  "place_paypal_order_url": "http://example.org/orders/42/place_paypal",
  "order_number": "ds123213ffew",
  "return_url": "http://www.blomming.com/checkout/http:%2f%2freturnurl",
  "cancel_url": "http://www.blomming.com/checkout/http:%2f%2fcancelurl"
}

Response Parameters

  • checkout_token

    The checkout token from PayPal.

    • Required: no
    • Type: string
    • Example: "EC-12345"
  • place_paypal_order_url

    The url to complete the PayPal Order in POST.

    • Required: no
    • Type: string
    • Format: uri
    • Example: "http://example.org/orders/42/place_paypal"
  • order_number

    The identifier of the Order.

    • Required: no
    • Type: string
    • Example: "ds123213ffew"
  • return_url

    The url to return the PayPal Order in POST.

    • Required: no
    • Type: string
    • Format: uri
    • Example: "http://www.blomming.com/checkout/http:%2f%2freturnurl"
  • cancel_url

    The url to cancel the PayPal Order in POST.

    • Required: no
    • Type: string
    • Format: uri
    • Example: "http://www.blomming.com/checkout/http:%2f%2fcancelurl"

Response Codes

Successful Response Codes

Failure Response Codes