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 guides: Checkout Experience and Checkout Sessions API

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}' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "id": "21210021c2855007efa2d657018",
  "currency": {
    "iso": "usd",
    "scale": 2
  },
  "description": null,
  "mode": "payment",
  "ui_mode": "hosted",
  "amount_total": 100,
  "amount_subtotal": 100,
  "total_details": {
    "amount_discount": 100,
    "amount_shipping": 100,
    "amount_tax": 100
  },
  "shipping_options": [
    {
      "shipping_rate": {
        "id": "shr_standard",
        "display_name": "Standard shipping",
        "type": "fixed_amount",
        "fixed_amount": {
          "amount": 100,
          "currency": "EUR"
        },
        "delivery_estimate": {
          "minimum": {
            "unit": "business_day",
            "value": 3
          },
          "maximum": {
            "unit": "business_day",
            "value": 3
          }
        },
        "tax_behavior": "unspecified",
        "tax_code": null,
        "metadata": {
          "additionalProperty": "string"
        },
        "active": true
      }
    }
  ],
  "shipping_cost": {
    "shipping_rate": "shr_standard",
    "amount_subtotal": 100,
    "amount_tax": 100,
    "amount_total": 100,
    "currency": {
      "iso": "usd",
      "scale": 2
    }
  },
  "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": "01K755J9SV2364REVHB915Z2FW",
      "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": "daily",
          "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": {
    "allow_redisplay_filters": [
      "always"
    ],
    "payment_method_remove": "disabled",
    "payment_method_save": "disabled"
  },
  "payment_method_options": {
    "card": {
      "request_three_d_secure": "any"
    }
  },
  "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",
  "subscription": "01HD7M6DRKZ4Q4QEVWJB0RC1S6",
  "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"
}