{
    "shipments": [
        125,
        126,
        127
    ]
}
No Content

Overview

This endpoint can be used to finalize a checkout session and pay for the shipments.

Endpoint: /api/v1/checkout

Method: POST

A maximum of 10 shipments can be included in a single checkout session.

You must first use the GET endpoint so that the price may be calculated for each shipment. If you attempt to finalize a shipment that does not have a price, then you will receive an error.

This endpoint will charge the total price of each shipment in the checkout session to the organization’s payment method.

Please ensure that each shipment’s details are correct, and that all addresses have been verified before finalising the checkout session.

Failure to do so may result in delays, lost shipments, or extra charges.

Request

shipments
array
required

An array of up to 10 shipment IDs to be included in the finalized checkout session.

Response (204)

If the checkout session is successfully stored, the API will return a 204 No Content status code.

The response will not contain any content.

Response (403)

If the organization does not have a valid payment method to charge, then the API will return a 403 Forbidden status code.

Response (402)

If the checkout session was not successfully stored because the payment provider declined the organization’s card, then the API will return a 402 Payment Required status code.

Receiving this response will automatically invalidate your payment method. You will need to address this via the ArtPort website before you can make further payment attempts.

The response will contain the following content:

status
integer
required

The internal status code of the error.

message
string
required

A human-readable message explaining the error.

Response (409)

If the checkout session was not successfully created because payment failed, then the API will return a 409 Conflict status code.

In most cases, this is a temporary error and you can simply retry the request. It is recommended that you wait a minute or so before retrying. This increases the chance that your request will be processed successfully.

The response will contain the following content:

status
integer
required

The internal status code of the error.

message
string
required

A human-readable message explaining the error.

{
    "shipments": [
        125,
        126,
        127
    ]
}
No Content