Checkouts API

After you create a cart (an empty order) and add some items to it, you can start the checkout via API. This basically means updating the order with concrete information, step by step, in a correct order.

Default Sylius checkout via API is constructed from the following steps:

addressing
You enter customer shipping and billing address
shipping
Shipments are proposed and you can select methods
payment
Payments are calculated and methods proposed
finalize
Final order is built and you can confirm it, cart will become an order
purchase
You provide Sylius with payment information and order is paid

Sylius API endpoint is /api/v1/checkouts.

Addressing step

After you added some items to the cart, to start the checkout you simply need to provide a shipping address. You can also specify a different billing address if needed.

You need to pass order id in the following url and make a PUT call:

PUT /api/v1/checkouts/44

Parameters

shipping_address[first_name]
Firstname for shipping address
shipping_address[last_name]
Lastname for shipping address
shipping_address[city]
City name
shipping_address[postcode]
Postcode
shipping_address[street]
Address line 1
shipping_address[country]
Id of the country
shipping_address[province] (optional)
Id of the province

If you do not specify the billing address block, shipping address will be used for that purpose.

billing_address[first_name]
Firstname for billing address
billing_address[last_name]
Lastname for billing address
billing_address[city]
City name
billing_address[postcode]
Postcode
billing_address[street]
Address line 1
billing_address[country]
Id of the country
billing_address[province] (optional)
Id of the province

Response

The response will contain the updated order information.

STATUS: 200 OK
{
    "adjustments": ,
    "adjustments_total": -250,
    "shipping_address": {
        "_links": {
            "country": {
                "href": "/app_dev.php/api/v1/countries/9"
            }
        },
        "city": "New York",
        "created_at": "2014-12-15T13:37:28+0000",
        "first_name": "John",
        "id": 105,
        "last_name": "Doe",
        "postcode": "12435",
        "street": "Test",
        "updated_at": "2014-12-15T13:37:29+0000"
    },
    "billing_address": {
        "_links": {
            "country": {
                "href": "/app_dev.php/api/v1/countries/9"
            }
        },
        "city": "New York",
        "created_at": "2014-12-15T13:37:28+0000",
        "first_name": "John",
        "id": 106,
        "last_name": "Doe",
        "postcode": "12435",
        "street": "Test",
        "updated_at": "2014-12-15T13:37:29+0000"
    },
    "channel": {
        "_links": {
            "self": {
                "href": "/app_dev.php/api/v1/channels/3"
            }
        },
        "code": "WEB-US",
        "color": "Pink",
        "created_at": "2014-12-03T09:54:28+0000",
        "enabled": true,
        "id": 3,
        "name": "United States Webstore",
        "type": "web",
        "updated_at": "2014-12-03T09:58:29+0000"
    },
    "checkout_state": "addressing",
    "comments": [],
    "confirmed": true,
    "created_at": "2014-12-15T13:15:22+0000",
    "email": "xschaefer@example.com",
    "expires_at": "2014-12-15T16:15:22+0000",
    "id": 52,
    "items": [],
    "items_total": 1500000,
    "payments": [],
    "shipments": [],
    "state": "cart",
    "total": 1499750,
    "updated_at": "2014-12-15T13:37:29+0000",
    "user": {
        "credentials_expired": false,
        "email": "xschaefer@example.com",
        "email_canonical": "xschaefer@example.com",
        "enabled": true,
        "expired": false,
        "group": [],
        "id": 5,
        "locked": false,
        "roles": [],
        "username": "xschaefer@example.com",
        "username_canonical": "xschaefer@example.com"
    }
}

Shipping step

When order contains the address information, we are able to determine the stock locations and available shipping methods. You can get these informations by first calling a GET request on the checkout unique URL.

GET /api/v1/checkouts/44
STATUS: 200 OK
[
    {
        "methods": [
            {
                "_links": {
                    "self": {
                        "href": "/app_dev.php/api/v1/shipping-methods/4"
                    },
                    "zone": {
                        "href": "/app_dev.php/api/v1/zones/4"
                    }
                },
                "calculator": "flexible_rate",
                "category_requirement": 1,
                "configuration": {
                    "additional_item_cost": 500,
                    "additional_item_limit": 10,
                    "first_item_cost": 4000
                },
                "created_at": "2014-12-03T09:54:28+0000",
                "enabled": true,
                "id": 4,
                "name": "FedEx World Shipping",
                "updated_at": "2014-12-03T09:54:28+0000"
            }
        ],
        "shipment": {
            "_links": {
                "order": {
                    "href": "/app_dev.php/api/v1/orders/52"
                }
            },
            "created_at": "2014-12-15T14:11:32+0000",
            "state": "checkout"
        }
    }
]

Response contains the proposed shipments and for each, it also has a list of shipping methods available.

Next step is updating the order with the types of shipping method that we have selected. To do so, you need to call another PUT request, but this time with different set of parameters.

You need to pass an id of shipping method for every id, you should obtain them in the previous request.

PUT /api/v1/checkouts/44

Parameters

shipments[X][method]
The id of the shipping method, where X is the shipment number. Leave empty to add new

Response

Response will contain an updated order information.

STATUS: 200 OK
{
    "adjustments": {
    },
    "adjustments_total": 4750,
    "billing_address": {
    },
    "channel": {
    },
    "checkout_state": "shipping",
    "comments": [],
    "confirmed": true,
    "created_at": "2014-12-15T13:15:22+0000",
    "email": "xschaefer@example.com",
    "expires_at": "2014-12-15T16:15:22+0000",
    "id": 52,
    "items": [
    ],
    "items_total": 1500000,
    "payments": [],
    "shipments": [
        {
            "_links": {
                "method": {
                    "href": "/app_dev.php/api/v1/shipping-methods/4"
                },
                "order": {
                    "href": "/app_dev.php/api/v1/orders/52"
                },
                "self": {
                    "href": "/app_dev.php/api/v1/shipments/51"
                }
            },
            "created_at": "2014-12-15T14:30:40+0000",
            "id": 51,
            "method": {
                "_links": {
                    "self": {
                        "href": "/app_dev.php/api/v1/shipping-methods/4"
                    },
                    "zone": {
                        "href": "/app_dev.php/api/v1/zones/4"
                    }
                },
                "calculator": "flexible_rate",
                "category_requirement": 1,
                "configuration": {
                    "additional_item_cost": 500,
                    "additional_item_limit": 10,
                    "first_item_cost": 4000
                },
                "created_at": "2014-12-03T09:54:28+0000",
                "enabled": true,
                "id": 4,
                "name": "FedEx World Shipping",
                "updated_at": "2014-12-03T09:54:28+0000"
            },
            "state": "checkout",
            "updated_at": "2014-12-15T14:30:41+0000"
        }
    ],
    "shipping_address": {
    },
    "state": "cart",
    "total": 1504750,
    "updated_at": "2014-12-15T14:30:41+0000",
    "user": {
    }
}

Payment step

When we are done with shipping choices and we know the final price of an order, we can select a payment method.

To obtain a list of available payment methods for this order, simply call a GET request again:

GET /api/v1/checkouts/44
STATUS: 200 OK
{
    "methods": {
        "1": {
            "_links": {
                "self": {
                    "href": "/app_dev.php/api/v1/payment-methods/1"
                }
            },
            "id": 1,
            "code": "dummy",
            "created_at": "2014-12-03T09:54:28+0000",
            "updated_at": "2014-12-03T09:54:28+0000"
        },
        "2": {
            "_links": {
                "self": {
                    "href": "/app_dev.php/api/v1/payment-methods/2"
                }
            },
            "id": 2,
            "code": "paypal_express_checkout",
            "created_at": "2014-12-03T09:54:28+0000",
            "updated_at": "2014-12-03T09:54:28+0000"
        },
        "3": {
            "_links": {
                "self": {
                    "href": "/app_dev.php/api/v1/payment-methods/3"
                }
            },
            "id": 3,
            "code": "stripe",
            "created_at": "2014-12-03T09:54:28+0000",
            "updated_at": "2014-12-03T09:54:28+0000"
        },
        "4": {
            "_links": {
                "self": {
                    "href": "/app_dev.php/api/v1/payment-methods/4"
                }
            },
            "id": 4,
            "code": "be_2_bill",
            "created_at": "2014-12-03T09:54:28+0000",
            "updated_at": "2014-12-03T09:54:28+0000"
        },
        "5": {
            "_links": {
                "self": {
                    "href": "/app_dev.php/api/v1/payment-methods/5"
                }
            },
            "id": 5,
            "code": "stripe_checkout",
            "created_at": "2014-12-03T09:54:28+0000",
            "updated_at": "2014-12-03T09:54:28+0000"
        }
    },
    "payment": {
        "_links": {
            "self": {
              "href": "/app_dev.php/api/v1/payments/2"
            },
            "order": {
                "href": "/app_dev.php/api/v1/orders/52"
            }
        },
        "id": 2,
        "amount": 1504750,
        "created_at": "2014-12-15T14:57:28+0000",
        "updated_at": "2014-12-15T14:57:28+0000",
        "state": "new"
    }
}

With that information, another PUT request with the id of payment method is enough to proceed:

PUT /api/v1/checkouts/44

Parameters

payments[X][method]
The id of the payment method, where X is the payment number. Leave empty to add new

Response

Response will contain the updated order information.

STATUS: 200 OK
{
    "adjustments": [
    ],
    "adjustments_total": 4750,
    "billing_address": {
    },
    "channel": {
    },
    "checkout_state": "payment",
    "comments": [],
    "confirmed": true,
    "created_at": "2014-12-15T13:15:22+0000",
    "email": "xschaefer@example.com",
    "expires_at": "2014-12-15T16:15:22+0000",
    "id": 52,
    "items": [
    ],
    "items_total": 1500000,
    "payments": [
        {
            "_links": {
                "order": {
                    "href": "/app_dev.php/api/v1/orders/52"
                },
                "payment-method": {
                    "href": "/app_dev.php/api/v1/payment-methods/1"
                },
                "self": {
                    "href": "/app_dev.php/api/v1/payments/51"
                }
            },
            "amount": 1504750,
            "created_at": "2014-12-15T15:02:54+0000",
            "id": 51,
            "method": {
                "_links": {
                    "self": {
                        "href": "/app_dev.php/api/v1/payment-methods/1"
                    }
                },
                "created_at": "2014-12-03T09:54:28+0000",
                "id": 1,
                "name": "Dummy",
                "updated_at": "2014-12-03T09:54:28+0000"
            },
            "state": "new",
            "updated_at": "2014-12-15T15:02:55+0000"
        }
    ],
    "shipments": [
    ],
    "shipping_address": {
    },
    "state": "cart",
    "total": 1504750,
    "updated_at": "2014-12-15T15:02:55+0000",
    "user": {
    }
}

Finalize step

Now your order is fully constructed, you can get its latest snapshot by calling your last GET request:

GET /api/v1/checkouts/44
STATUS: 200 OK
{
    "adjustments": [
        {
            "amount": 0,
            "created_at": "2014-12-15T13:37:29+0000",
            "description": "No tax (0%)",
            "id": 205,
            "type": "tax",
            "locked": false,
            "neutral": false,
            "updated_at": "2014-12-15T13:37:29+0000"
        },
        {
            "amount": 5000,
            "created_at": "2014-12-15T14:30:41+0000",
            "description": "FedEx World Shipping",
            "id": 207,
            "type": "shipping",
            "locked": false,
            "neutral": false,
            "updated_at": "2014-12-15T14:30:41+0000"
        },
        {
            "amount": -250,
            "created_at": "2014-12-15T14:30:41+0000",
            "description": "Christmas Sale for orders over 100 EUR.",
            "id": 208,
            "type": "promotion",
            "locked": false,
            "neutral": false,
            "updated_at": "2014-12-15T14:30:41+0000"
        }
    ],
    "adjustments_total": 4750,
    "billing_address": {
        "_links": {
            "country": {
                "href": "/app_dev.php/api/v1/countries/9"
            }
        },
        "city": "New York",
        "created_at": "2014-12-15T13:37:28+0000",
        "first_name": "John",
        "id": 106,
        "last_name": "Doe",
        "postcode": "12435",
        "street": "Test",
        "updated_at": "2014-12-15T13:37:29+0000"
    },
    "channel": {
        "_links": {
            "self": {
                "href": "/app_dev.php/api/v1/channels/3"
            }
        },
        "code": "WEB-US",
        "color": "Pink",
        "created_at": "2014-12-03T09:54:28+0000",
        "enabled": true,
        "id": 3,
        "name": "United States Webstore",
        "type": "web",
        "updated_at": "2014-12-03T09:58:29+0000"
    },
    "checkout_state": "payment_selected",
    "comments": [],
    "created_at": "2014-12-15T13:15:22+0000",
    "updated_at": "2014-12-15T15:02:55+0000",
    "expires_at": "2014-12-15T16:15:22+0000",
    "id": 52,
    "items": [
        {
            "_links": {
                "product": {
                    "href": "/app_dev.php/api/v1/products/101"
                },
                "variant": {
                    "href": "/app_dev.php/api/v1/products/101/variants/779"
                }
            },
            "adjustments": [],
            "adjustments_total": 0,
            "id": 277,
            "immutable": false,
            "inventory_units": [
                {
                    "_links": {
                        "order": {
                            "href": "/app_dev.php/api/v1/orders/52"
                        }
                    },
                    "created_at": "2014-12-15T13:18:48+0000",
                    "id": 828,
                    "inventory_state": "checkout",
                    "updated_at": "2014-12-15T14:30:41+0000"
                },
                {
                    "_links": {
                        "order": {
                            "href": "/app_dev.php/api/v1/orders/52"
                        }
                    },
                    "created_at": "2014-12-15T13:18:48+0000",
                    "id": 829,
                    "inventory_state": "checkout",
                    "updated_at": "2014-12-15T14:30:41+0000"
                },
                {
                    "_links": {
                        "order": {
                            "href": "/app_dev.php/api/v1/orders/52"
                        }
                    },
                    "created_at": "2014-12-15T13:18:48+0000",
                    "id": 830,
                    "inventory_state": "checkout",
                    "updated_at": "2014-12-15T14:30:41+0000"
                }
            ],
            "quantity": 3,
            "total": 1500000,
            "unit_price": 500000,
            "variant": {
                "available_on": "2014-04-01T06:43:02+0000",
                "created_at": "2014-12-03T09:54:35+0000",
                "id": 779,
                "master": true,
                "object": {
                    "attributes": [
                        {
                            "id": 238,
                            "name": "Book author",
                            "presentation": "Author",
                            "value": "Marlen Yost"
                        },
                        {
                            "id": 239,
                            "name": "Book ISBN",
                            "presentation": "ISBN",
                            "value": "326ccbc7-92d1-3aec-b3af-df8afdc5651d"
                        },
                        {
                            "id": 240,
                            "name": "Book pages",
                            "presentation": "Number of pages",
                            "value": "149"
                        }
                    ],
                    "created_at": "2014-12-03T09:54:35+0000",
                    "description": "Et eveniet voluptas ut magni vero temporibus nihil. Omnis possimus accusantium quia corporis culpa. Et recusandae asperiores qui architecto culpa autem sint accusantium. Officiis iusto accusantium perferendis aliquid ducimus.",
                    "id": 101,
                    "name": "Book \"Quidem\" by \"Marlen Yost\"",
                    "options": [],
                    "short_description": "Distinctio quos est eaque fugit totam repellendus.",
                    "updated_at": "2014-12-03T09:54:35+0000"
                },
                "options": [],
                "sku": "326ccbc7-92d1-3aec-b3af-df8afdc5651d",
                "updated_at": "2014-12-03T09:54:35+0000"
            }
        }
    ],
    "items_total": 1500000,
    "payments": [
        {
            "_links": {
                "order": {
                    "href": "/app_dev.php/api/v1/orders/52"
                },
                "payment-method": {
                    "href": "/app_dev.php/api/v1/payment-methods/1"
                },
                "self": {
                    "href": "/app_dev.php/api/v1/payments/51"
                }
            },
            "amount": 1504750,
            "created_at": "2014-12-15T15:02:54+0000",
            "id": 51,
            "method": {
                "_links": {
                    "self": {
                        "href": "/app_dev.php/api/v1/payment-methods/1"
                    }
                },
                "created_at": "2014-12-03T09:54:28+0000",
                "id": 1,
                "name": "Dummy",
                "updated_at": "2014-12-03T09:54:28+0000"
            },
            "state": "new",
            "updated_at": "2014-12-15T15:02:55+0000"
        }
    ],
    "shipments": [
        {
            "_links": {
                "method": {
                    "href": "/app_dev.php/api/v1/shipping-methods/4"
                },
                "order": {
                    "href": "/app_dev.php/api/v1/orders/52"
                },
                "self": {
                    "href": "/app_dev.php/api/v1/shipments/51"
                }
            },
            "created_at": "2014-12-15T14:30:40+0000",
            "id": 51,
            "method": {
                "_links": {
                    "self": {
                        "href": "/app_dev.php/api/v1/shipping-methods/4"
                    },
                    "zone": {
                        "href": "/app_dev.php/api/v1/zones/4"
                    }
                },
                "calculator": "flexible_rate",
                "category_requirement": 1,
                "configuration": {
                    "additional_item_cost": 500,
                    "additional_item_limit": 10,
                    "first_item_cost": 4000
                },
                "created_at": "2014-12-03T09:54:28+0000",
                "enabled": true,
                "id": 4,
                "name": "FedEx World Shipping",
                "updated_at": "2014-12-03T09:54:28+0000"
            },
            "state": "checkout",
            "updated_at": "2014-12-15T14:30:41+0000"
        }
    ],
    "shipping_address": {
        "_links": {
            "country": {
                "href": "/app_dev.php/api/v1/countries/9"
            }
        },
        "city": "New York",
        "created_at": "2014-12-15T13:37:28+0000",
        "first_name": "John",
        "id": 105,
        "last_name": "Doe",
        "postcode": "12435",
        "street": "Test",
        "updated_at": "2014-12-15T13:37:29+0000"
    },
    "state": "cart",
    "total": 1504750
}

This is how your final order looks, if you are happy with that response, simply call another PUT to confirm the checkout, which will became a real order and appear in the backend.

PUT /api/v1/checkouts/44

Response

Final response contains the full order information, now you can call the purchase action to actually pay for the order.

STATUS: 200 OK
{
    "adjustments": [
        {
            "amount": 0,
            "created_at": "2014-12-15T13:37:29+0000",
            "label": "No tax (0%)",
            "id": 205,
            "type": "tax",
            "locked": false,
            "neutral": false,
            "updated_at": "2014-12-15T13:37:29+0000"
        },
        {
            "amount": 5000,
            "created_at": "2014-12-15T14:30:41+0000",
            "label": "FedEx World Shipping",
            "id": 207,
            "type": "shipping",
            "locked": false,
            "neutral": false,
            "updated_at": "2014-12-15T14:30:41+0000"
        },
        {
            "amount": -250,
            "created_at": "2014-12-15T14:30:41+0000",
            "description": "Christmas Sale for orders over 100 EUR.",
            "id": 208,
            "type": "order_promotion",
            "locked": false,
            "neutral": false,
            "updated_at": "2014-12-15T14:30:41+0000"
        }
    ],
    "adjustments_total": 4750,
    "billing_address": {
        "_links": {
            "country": {
                "href": "/app_dev.php/api/v1/countries/9"
            }
        },
        "city": "New York",
        "created_at": "2014-12-15T13:37:28+0000",
        "first_name": "John",
        "id": 106,
        "last_name": "Doe",
        "postcode": "12435",
        "street": "Test",
        "updated_at": "2014-12-15T13:37:29+0000"
    },
    "channel": {
        "_links": {
            "self": {
                "href": "/app_dev.php/api/v1/channels/3"
            }
        },
        "code": "WEB-US",
        "color": "Pink",
        "created_at": "2014-12-03T09:54:28+0000",
        "enabled": true,
        "id": 3,
        "name": "United States Webstore",
        "type": "web",
        "updated_at": "2014-12-03T09:58:29+0000"
    },
    "comments": [],
    "created_at": "2014-12-15T13:15:22+0000",
    "updated_at": "2014-12-15T15:02:55+0000",
    "expires_at": "2014-12-15T16:15:22+0000",
    "id": 52,
    "items": [
        {
            "_links": {
                "product": {
                    "href": "/app_dev.php/api/v1/products/101"
                },
                "variant": {
                    "href": "/app_dev.php/api/v1/products/101/variants/779"
                }
            },
            "adjustments": [],
            "adjustments_total": 0,
            "id": 277,
            "immutable": false,
            "inventory_units": [
                {
                    "_links": {
                        "order": {
                            "href": "/app_dev.php/api/v1/orders/52"
                        }
                    },
                    "created_at": "2014-12-15T13:18:48+0000",
                    "id": 828,
                    "inventory_state": "checkout",
                    "updated_at": "2014-12-15T14:30:41+0000"
                },
                {
                    "_links": {
                        "order": {
                            "href": "/app_dev.php/api/v1/orders/52"
                        }
                    },
                    "created_at": "2014-12-15T13:18:48+0000",
                    "id": 829,
                    "inventory_state": "checkout",
                    "updated_at": "2014-12-15T14:30:41+0000"
                },
                {
                    "_links": {
                        "order": {
                            "href": "/app_dev.php/api/v1/orders/52"
                        }
                    },
                    "created_at": "2014-12-15T13:18:48+0000",
                    "id": 830,
                    "inventory_state": "checkout",
                    "updated_at": "2014-12-15T14:30:41+0000"
                }
            ],
            "quantity": 3,
            "total": 1500000,
            "unit_price": 500000,
            "variant": {
                "available_on": "2014-04-01T06:43:02+0000",
                "created_at": "2014-12-03T09:54:35+0000",
                "id": 779,
                "master": true,
                "object": {
                    "attributes": [
                        {
                            "id": 238,
                            "name": "Book author",
                            "presentation": "Author",
                            "value": "Marlen Yost"
                        },
                        {
                            "id": 239,
                            "name": "Book ISBN",
                            "presentation": "ISBN",
                            "value": "326ccbc7-92d1-3aec-b3af-df8afdc5651d"
                        },
                        {
                            "id": 240,
                            "name": "Book pages",
                            "presentation": "Number of pages",
                            "value": "149"
                        }
                    ],
                    "created_at": "2014-12-03T09:54:35+0000",
                    "description": "Et eveniet voluptas ut magni vero temporibus nihil. Omnis possimus accusantium quia corporis culpa. Et recusandae asperiores qui architecto culpa autem sint accusantium. Officiis iusto accusantium perferendis aliquid ducimus.",
                    "id": 101,
                    "name": "Book \"Quidem\" by \"Marlen Yost\"",
                    "options": [],
                    "short_description": "Distinctio quos est eaque fugit totam repellendus.",
                    "updated_at": "2014-12-03T09:54:35+0000"
                },
                "options": [],
                "sku": "326ccbc7-92d1-3aec-b3af-df8afdc5651d",
                "updated_at": "2014-12-03T09:54:35+0000"
            }
        }
    ],
    "items_total": 1500000,
    "payments": [
        {
            "_links": {
                "order": {
                    "href": "/app_dev.php/api/v1/orders/52"
                },
                "payment-method": {
                    "href": "/app_dev.php/api/v1/payment-methods/1"
                },
                "self": {
                    "href": "/app_dev.php/api/v1/payments/51"
                }
            },
            "amount": 1504750,
            "created_at": "2014-12-15T15:02:54+0000",
            "id": 51,
            "method": {
                "_links": {
                    "self": {
                        "href": "/app_dev.php/api/v1/payment-methods/1"
                    }
                },
                "created_at": "2014-12-03T09:54:28+0000",
                "id": 1,
                "name": "Dummy",
                "updated_at": "2014-12-03T09:54:28+0000"
            },
            "state": "new",
            "updated_at": "2014-12-15T15:02:55+0000"
        }
    ],
    "shipments": [
        {
            "_links": {
                "method": {
                    "href": "/app_dev.php/api/v1/shipping-methods/4"
                },
                "order": {
                    "href": "/app_dev.php/api/v1/orders/52"
                },
                "self": {
                    "href": "/app_dev.php/api/v1/shipments/51"
                }
            },
            "created_at": "2014-12-15T14:30:40+0000",
            "id": 51,
            "method": {
                "_links": {
                    "self": {
                        "href": "/app_dev.php/api/v1/shipping-methods/4"
                    },
                    "zone": {
                        "href": "/app_dev.php/api/v1/zones/4"
                    }
                },
                "calculator": "flexible_rate",
                "category_requirement": 1,
                "configuration": {
                    "additional_item_cost": 500,
                    "additional_item_limit": 10,
                    "first_item_cost": 4000
                },
                "created_at": "2014-12-03T09:54:28+0000",
                "enabled": true,
                "id": 4,
                "name": "FedEx World Shipping",
                "updated_at": "2014-12-03T09:54:28+0000"
            },
            "state": "onhold",
            "updated_at": "2014-12-15T14:30:41+0000"
        }
    ],
    "shipping_address": {
        "_links": {
            "country": {
                "href": "/app_dev.php/api/v1/countries/9"
            }
        },
        "city": "New York",
        "created_at": "2014-12-15T13:37:28+0000",
        "first_name": "John",
        "id": 105,
        "last_name": "Doe",
        "postcode": "12435",
        "street": "Test",
        "updated_at": "2014-12-15T13:37:29+0000"
    },
    "total": 1504750,
    "state": "new",
    "number": "000000001",
    "checkout_completed_at": "2016-06-24T10:55:28+0200",
    "checkout_state": "completed",
}

Purchase step

TODO.

PUT /api/v1/checkouts/44

Parameters

type
Card type
cardholderName
Card holder name
number
Card number
securityCode
Card security code
expiryMonth
Month expire number
expiryYear
Year of card expiration

Response

You can check the payment status in the payment lists on order response.

STATUS: 200 OK
{"to": "do"}