> This page is for Afterpay.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.cash.app/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.cash.app/_mcp/server.

# Get Checkout

GET https://global-api-sandbox.afterpay.com/v2/checkouts/{token}

This endpoint retrieves an incomplete individual checkout by token.

Checkout details are only retained in this temporary format for up to 60 minutes. If a checkout token expires or has an order created against it, it can no longer be retrieved from this endpoint.
To retrieve a [Payment](../docs/ONLINE-API/Payment-object.md) record (Afterpay Order) along with its associated checkout details, see Get Payment By Token.


Reference: https://developers.cash.app/afterpay/api-reference/reference/checkouts/get-checkout

## Authentication

- `Authorization` header (basic auth, required) — Basic authentication of the form `Basic <base64(username:password)>`.

## Servers

- `https://global-api-sandbox.afterpay.com` (Sandbox, default)
- `https://global-api.afterpay.com` (Production)

## Request

### Path parameters

- `token` (string, required) — The token of the checkout to be retrieved.

### Headers

- `Accept` (string, optional, default: application/json)

## Response

### 200

Returns an object combining the [Checkout Request](reference/Checkouts.v2.yaml/components/schemas/Checkout-Request) and [Checkout Response](reference/Checkouts.v2.yaml/components/schemas/Checkout-Response) for a provided token.

- `amount` (Money, required) — Object containing amount and currency
- `consumer` (Consumer, required) — The consumer data model is used for gathering essential user information. It captures details such as the individual's first name, represented by `givenNames`, and their last name, captured under `surname`. In addition, it stores the user's contact number under `phoneNumber` and their email address under `email`. These fields collectively provide contact and identification details for a user.
- `merchant` (V2CheckoutsTokenGetResponsesContentApplicationJsonSchemaMerchant, required) — The URLs required depend on the checkout flow: - To use popup, `merchant.popupOriginUrl` must be provided. - To use redirect, `merchant.redirectConfirmUrl` and `merchant.redirectCancelUrl` must be provided.
- `token` (string, optional) — Checkout token to be used to complete payment.
- `expires` (string, optional) — The UTC timestamp of when the checkout token will expire, in ISO 8601 format.
- `redirectCheckoutUrl` (string, optional) — A URL that can be used to redirect the customer to the Afterpay screenflow directly from the merchant backend.
- `merchantReference` (string, optional)
- `billing` (Contact, optional) — This data model is used for storing an individual's contact information. Mandatory fields such as **name**, **line1**, **area1**, **region**, **postcode**, and **countryCode** help in capturing vital information about a user's location. The `line2` and `area2` fields provide additional space for extended addresses, while `phoneNumber` can be used to store the user's contact number. The `area1`, `area2` and `region` properties feature localized terminology based on country. Refer to the property descriptions for insights on each country's specific usage
- `shipping` (Contact, optional) — This data model is used for storing an individual's contact information. Mandatory fields such as **name**, **line1**, **area1**, **region**, **postcode**, and **countryCode** help in capturing vital information about a user's location. The `line2` and `area2` fields provide additional space for extended addresses, while `phoneNumber` can be used to store the user's contact number. The `area1`, `area2` and `region` properties feature localized terminology based on country. Refer to the property descriptions for insights on each country's specific usage
- `items` (list of Item, optional)
- `courier` (Shipping-Courier, optional) — Essential information for tracking a shipment. The `shippedAt` key represents the date and time when the item was shipped. This value follows the [ISO 8601 standard format](https://www.iso.org/iso-8601-date-and-time-format.html) for date and time representations. The `name` field indicates the courier service employed to handle the shipment (e.g. FEDEX, UPS). For orders that are picked up in-store (also known as Buy-Online-Pickup-Instore), please use "INSTORE_PICKUP" as the `name` field value. The `tracking` key represents a unique tracking number provided by the courier service to monitor the shipment's progress. It's a valuable tool for customers and businesses to track and trace their packages. The `priority` field tracks the shipping speed or service level associated with the delivery.
- `taxAmount` (Money, optional) — Object containing amount and currency
- `shippingAmount` (Money, optional) — Object containing amount and currency
- `discounts` (list of Discount, optional)
- `mode` (string, optional, default: standard) — Must be set to `express` to enable express checkout. Allowed values: `express` `standard`
- `description` (string, optional, deprecated)

## Errors

### 404 Not Found Error

No checkout token was provided.

- `any`

### 412 Precondition Failed Error

The checkout token is invalid, expired, completed, or does not exist.

- `any`

## Types

### Money

Object containing amount and currency

- `amount` (string, required) — The amount as a string representation of a decimal number, rounded to 2 decimal places.
- `currency` (enum, required)
  - Allowed values: `AUD`, `NZD`, `USD`, `CAD`, `GBP`

### Consumer

The consumer data model is used for gathering essential user information. It captures details such as the individual's first name, represented by `givenNames`, and their last name, captured under `surname`. In addition, it stores the user's contact number under `phoneNumber` and their email address under `email`. These fields collectively provide contact and identification details for a user.

- `email` (string, required)
- `givenNames` (string, optional) — The consumer's first name
- `surname` (string, optional) — The consumer's last name
- `phoneNumber` (string, optional)

### V2CheckoutsTokenGetResponsesContentApplicationJsonSchemaMerchant

The URLs required depend on the checkout flow: - To use popup, `merchant.popupOriginUrl` must be provided. - To use redirect, `merchant.redirectConfirmUrl` and `merchant.redirectCancelUrl` must be provided.

- `redirectConfirmUrl` (string, optional) — The URL the consumer is redirected to after confirming payment. Required for redirect.
- `redirectCancelUrl` (string, optional) — The URL the consumer is redirected to after cancelling payment. Required for redirect.
- `popupOriginUrl` (string, optional) — The URL location from which Afterpay is initiated. Required for popup, including Express Checkout.
- `name` (string, optional) — The merchant name displayed in the Afterpay checkout flow, confirmation & refund emails, and the consumer portal

### Contact

This data model is used for storing an individual's contact information. Mandatory fields such as **name**, **line1**, **area1**, **region**, **postcode**, and **countryCode** help in capturing vital information about a user's location. The `line2` and `area2` fields provide additional space for extended addresses, while `phoneNumber` can be used to store the user's contact number. The `area1`, `area2` and `region` properties feature localized terminology based on country. Refer to the property descriptions for insights on each country's specific usage

- `name` (string, required)
- `line1` (string, required) — First line of the address
- `area1` (string, required) — - AU: Suburb - NZ: Town or City - UK: Postal Town - US: City - Canada: City
- `region` (string, required) — - AU: State - NZ: Region - UK: County - US: State - CA: Province or Territory
- `postcode` (string, required)
- `countryCode` (enum, required)
  - Allowed values: `AU`, `NZ`, `US`, `CA`, `GB`
- `line2` (string, optional) — Second line of the address
- `area2` (string, optional) — - NZ: suburb - UK: village or local area.
- `phoneNumber` (string, optional) — The phone number, in [E.123](https://en.wikipedia.org/wiki/E.123) format.

### Item

This data model is used to store crucial product details. The `price.amount` field represents the unit price of the individual item. The `quantity` field shows the number of units of the item. The `name` field denotes the name of the product, while `sku` holds the Stock Keeping Unit identifier. 100 is the maximum number of item objects in the items array. It is crucial that the `price.amount` represents the unit price of the individual item. **Never** populate the `price.amount` by multiplying the quantity by the unit cost. Always enter the price for a single unit to maintain data accuracy.

- `name` (string, required)
- `quantity` (integer, required)
- `price` (Money, required) — Object containing amount and currency
- `sku` (string, optional)
- `pageUrl` (string, optional)
- `imageUrl` (string, optional)
- `categories` (list of list of string, optional)
- `estimatedShipmentDate` (date, optional)
- `preorder` (boolean, optional, default: false)

### Shipping-Courier

Essential information for tracking a shipment. The `shippedAt` key represents the date and time when the item was shipped. This value follows the [ISO 8601 standard format](https://www.iso.org/iso-8601-date-and-time-format.html) for date and time representations. The `name` field indicates the courier service employed to handle the shipment (e.g. FEDEX, UPS). For orders that are picked up in-store (also known as Buy-Online-Pickup-Instore), please use "INSTORE_PICKUP" as the `name` field value. The `tracking` key represents a unique tracking number provided by the courier service to monitor the shipment's progress. It's a valuable tool for customers and businesses to track and trace their packages. The `priority` field tracks the shipping speed or service level associated with the delivery.

- `shippedAt` (datetime, optional)
- `name` (string, optional)
- `tracking` (string, optional)
- `priority` (enum, optional)
  - Allowed values: `STANDARD`, `EXPRESS`

### Discount

Discount applied to an order

- `displayName` (string, optional)
- `amount` (Money, optional) — Object containing amount and currency

## Examples

**Response**

```json
{
  "amount": {
    "amount": "100.00",
    "currency": "AUD"
  },
  "consumer": {
    "email": "test@example.com",
    "givenNames": "Joe",
    "surname": "Consumer",
    "phoneNumber": "0400 000 000"
  },
  "merchant": {
    "redirectConfirmUrl": "https://example.com/checkout/confirm",
    "redirectCancelUrl": "https://example.com/checkout/cancel",
    "popupOriginUrl": "https://example.com/cart",
    "name": "string"
  },
  "token": "005.2fkv5o963b132z8ppa34srlh60987y87d55re237wsg9tr4q2",
  "expires": "2023-08-29T00:00:00.000Z",
  "redirectCheckoutUrl": "https://portal.sandbox.afterpay.com/us/checkout/?token=005.2fkv5o963b132z8ppa34srlh60987y87d55re237wsg9tr4q2",
  "merchantReference": "string",
  "billing": {
    "name": "Joe Consumer",
    "line1": "Level 5",
    "area1": "Melbourne",
    "region": "VIC",
    "postcode": "3000",
    "countryCode": "AU",
    "line2": "390 Collins Street",
    "phoneNumber": "0400 000 000"
  },
  "shipping": {
    "name": "Joe Consumer",
    "line1": "Level 5",
    "area1": "Melbourne",
    "region": "VIC",
    "postcode": "3000",
    "countryCode": "AU",
    "line2": "390 Collins Street",
    "phoneNumber": "0400 000 000"
  },
  "items": [
    {
      "name": "Blue Carabiner",
      "quantity": 1,
      "price": {
        "amount": "100.00",
        "currency": "AUD"
      },
      "sku": "string",
      "pageUrl": "https://example.com/carabiner-354193.html",
      "imageUrl": "https://example.com/carabiner-7378-391453-1.jpg",
      "categories": [
        [
          "string"
        ]
      ],
      "estimatedShipmentDate": "2023-08-01",
      "preorder": false
    }
  ],
  "courier": {
    "shippedAt": "2025-08-24T14:15:22Z",
    "name": "USA Post",
    "tracking": "AA0000000000000",
    "priority": "STANDARD"
  },
  "taxAmount": {
    "amount": "100.00",
    "currency": "AUD"
  },
  "shippingAmount": {
    "amount": "100.00",
    "currency": "AUD"
  },
  "discounts": [
    {
      "displayName": "New Customer Coupon",
      "amount": {
        "amount": "100.00",
        "currency": "AUD"
      }
    }
  ],
  "mode": "standard",
  "description": "string"
}
```

**SDK Code**

```python
import requests

url = "https://global-api-sandbox.afterpay.com/v2/checkouts/token"

headers = {
    "User-Agent": "User-Agent"
}

response = requests.get(url, headers=headers, auth=("<username>", "<password>"))

print(response.json())
```

```javascript
const url = 'https://global-api-sandbox.afterpay.com/v2/checkouts/token';
const credentials = btoa("<username>:<password>");

const options = {
  method: 'GET',
  headers: {'User-Agent': 'User-Agent', Authorization: `Basic ${credentials}`}
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://global-api-sandbox.afterpay.com/v2/checkouts/token"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("User-Agent", "User-Agent")
	req.SetBasicAuth("<username>", "<password>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://global-api-sandbox.afterpay.com/v2/checkouts/token")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["User-Agent"] = 'User-Agent'
request.basic_auth("<username>", "<password>")

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://global-api-sandbox.afterpay.com/v2/checkouts/token")
  .header("User-Agent", "User-Agent")
  .basicAuth("<username>", "<password>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://global-api-sandbox.afterpay.com/v2/checkouts/token', [
  'headers' => [
    'User-Agent' => 'User-Agent',
  ],
    'auth' => ['<username>', '<password>'],
]);

echo $response->getBody();
```

```csharp
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://global-api-sandbox.afterpay.com/v2/checkouts/token");
client.Authenticator = new HttpBasicAuthenticator("<username>", "<password>");
var request = new RestRequest(Method.GET);
request.AddHeader("User-Agent", "User-Agent");

IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let credentials = Data("<username>:<password>".utf8).base64EncodedString()

let headers = [
  "User-Agent": "User-Agent",
  "Authorization": "Basic \(credentials)"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://global-api-sandbox.afterpay.com/v2/checkouts/token")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```