Retrieve a Checkout Session

Retrieves the details of an existing Checkout Session by ID.

Use this endpoint to check the session status after redirect-based checkout, inspect the related payment intent, or confirm which URLs and line items were used for the payment attempt.

Related guide: Checkout Experience

Path Parameters
  • id
    Type: string
    max length:  
    200
    required
Query Parameters
  • expand
    Type: array string[]
Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for get/v1/checkouts/{id}
curl 'https://api.paypercut.io/v1/checkouts/{id}?expand=' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "id": "21210021c2855007efa2d657018",
  "currency": {
    "iso": "usd",
    "scale": 2
  },
  "description": null,
  "mode": "payment",
  "ui_mode": "hosted",
  "amount_total": 100,
  "url": "https://www.example.com",
  "cancel_url": null,
  "success_url": null,
  "return_url": null,
  "payment_method_types": [
    "string"
  ],
  "submit_type": "auto",
  "wallet_options": {
    "apple_pay": {
      "display": "auto"
    },
    "google_pay": {
      "display": "auto"
    }
  },
  "client_reference_id": null,
  "client_customer_id": null,
  "expires_at": null,
  "line_items": [
    {
      "quantity": 2,
      "price_data": {
        "active": true,
        "billing_scheme": "per_unit",
        "created": 1,
        "currency": "string",
        "livemode": true,
        "lookup_key": null,
        "product": "01K755J9SV2364REVHB915Z2FW",
        "product_data": {
          "active": true,
          "name": "string",
          "description": "string",
          "unit_label": "string",
          "id": "string"
        },
        "recurring": {
          "interval": "day",
          "interval_count": 1,
          "meter": null,
          "usage_type": "licensed"
        },
        "type": "one_time",
        "unit_amount": null,
        "unit_amount_decimal": null,
        "id": "string"
      },
      "metadata": {
        "additionalProperty": "string"
      }
    }
  ],
  "saved_payment_method_options": {
    "payment_method_save": "disabled"
  },
  "metadata": {
    "additionalProperty": "string"
  },
  "after_completion": {
    "type": "redirect",
    "redirect": {
      "url": "https://example.com"
    },
    "hosted": {
      "custom_message": "string"
    }
  },
  "locale": null,
  "customer": "01K755J9SV2364REVHB915Z2FW",
  "customer_email": null,
  "customer_creation": "always",
  "payment_intent": "01K755J9SY55CS04SQ3JX1NX36",
  "setup_intent": "01K755J9SY55CS04SQ3JX1NX36",
  "payment_link": "01K755J9SV2364REVHB915Z2FW",
  "payment_status": "no_payment_required",
  "status": "complete",
  "next_action": {
    "redirect_to_url": {
      "return_url": null,
      "url": null
    },
    "type": "string",
    "three_d_secure": {
      "flow": "frictionless",
      "status_url": "https://api.yourco.com/v1/payment_intents/pi_123",
      "return_url": null,
      "message": {
        "allowed_origins": [
          "https://merchant.example.com"
        ]
      },
      "hint": {
        "scheme": "visa",
        "version": "2.2.0"
      },
      "idempotency_key": "string"
    }
  },
  "livemode": true,
  "billing_address_collection": "auto"
}