# Checkout

Current payer instructions for one checkout token.

[Definition in OpenAPI](https://api.cadmospay.com/static/api/gateway-machine-api.json#/components/schemas/Checkout)

## JSON schema

```json
{
  "type": "object",
  "description": "Current payer instructions for one checkout token.",
  "required": [
    "kind",
    "description",
    "ownerDisplayName",
    "receiverAddress",
    "rhinoAddresses",
    "status",
    "grossReceivedUsd",
    "amountUsd",
    "leftUsd",
    "paid",
    "cryptoRoutes",
    "methods"
  ],
  "examples": [
    {
      "kind": "order",
      "description": "Example order",
      "ownerDisplayName": "Example merchant",
      "receiverAddress": "0x0000000000000000000000000000000000000042",
      "rhinoAddresses": [],
      "status": "unpaid",
      "grossReceivedUsd": "0.00",
      "amountUsd": "100.00",
      "leftUsd": "100.00",
      "paid": false,
      "cryptoRoutes": [
        {
          "coin": "USDC",
          "chain": "ARBITRUM",
          "network": "Arbitrum",
          "depositAddress": "0x0000000000000000000000000000000000000042",
          "minUsd": null
        },
        {
          "coin": "USDT",
          "chain": "ARBITRUM",
          "network": "Arbitrum",
          "depositAddress": "0x0000000000000000000000000000000000000042",
          "minUsd": null
        }
      ],
      "methods": [
        {
          "code": "whish",
          "title": "Whish",
          "iconUrl": null,
          "countries": [
            "lb"
          ],
          "currency": "USD",
          "minUsd": "5",
          "maxUsd": "500",
          "whatsappNumber": "12025550123",
          "chatUrl": "https://wa.me/12025550123?text=Pay%20ABC123",
          "payUsd": "101.00"
        }
      ]
    }
  ],
  "properties": {
    "kind": {
      "type": "string",
      "enum": [
        "order",
        "remittance"
      ]
    },
    "description": {
      "type": "string"
    },
    "ownerDisplayName": {
      "type": "string"
    },
    "ownerPhoneLast4": {
      "type": "string",
      "description": "Optional last four digits the owner chose to share."
    },
    "receiverAddress": {
      "$ref": "#/components/schemas/Address"
    },
    "returnUrl": {
      "type": "string",
      "description": "Verified return destination.",
      "format": "uri"
    },
    "expiresAt": {
      "type": "string",
      "description": "Expiry of checkout instructions.",
      "format": "date-time"
    },
    "rhinoAddresses": {
      "type": "array",
      "items": {
        "type": "object",
        "description": "Provisioned bridge bindings. Use cryptoRoutes to display instructions.",
        "required": [
          "depositChain",
          "depositAddress",
          "payAsset"
        ],
        "properties": {
          "depositChain": {
            "type": "string"
          },
          "depositAddress": {
            "type": "string"
          },
          "payAsset": {
            "type": "string"
          },
          "receiveAsset": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      }
    },
    "status": {
      "type": "string",
      "enum": [
        "unpaid",
        "received"
      ]
    },
    "grossReceivedUsd": {
      "type": "string",
      "description": "Gross amount received, in USD."
    },
    "amountUsd": {
      "type": [
        "string",
        "null"
      ],
      "description": "The order price in dollars, or null for an open amount."
    },
    "leftUsd": {
      "type": [
        "string",
        "null"
      ],
      "description": "Amount still due, or null for an open amount."
    },
    "paid": {
      "type": "boolean",
      "description": "A fixed-price order has been paid in full. Stop displaying payment instructions."
    },
    "cryptoRoutes": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/CheckoutRoute"
      }
    },
    "methods": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/CheckoutMethod"
      }
    },
    "payments": {
      "type": "array",
      "items": {
        "type": "object",
        "description": "Payment summary on a reusable remittance link.",
        "required": [
          "asset",
          "amountUsd",
          "paidAt"
        ],
        "properties": {
          "asset": {
            "type": "string"
          },
          "amountUsd": {
            "type": "string"
          },
          "paidAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      }
    }
  }
}
```
