Rye icon

Rye

Interact with the Rye Universal Checkout API

Actions4

Checkout Intent → Get State

AI-generated

Summary

Retrieve the current state of a checkout intent, polling exponentially until a terminal state (awaiting_confirmation, completed, or failed) is reached or max attempts are exhausted.

Inputs

  • checkoutIntentId (required) — The ID of the checkout intent to check. Typically obtained from the Create operation output.
  • enablePolling — Whether to automatically poll until the checkout reaches a terminal state. Defaults to true; when enabled, the node retries up to maxAttempts.
  • maxAttempts — Maximum number of polling attempts before returning the current state. Polling stops automatically when a terminal state is reached. Default 20.
  • initialIntervalSeconds — Starting wait time in seconds. This will double with each subsequent attempt. Set equal to maxIntervalSeconds for fixed interval polling. Default 5.
  • maxIntervalSeconds — Maximum wait time in seconds between attempts. The interval will not exceed this value. Set equal to initialIntervalSeconds for fixed interval polling. Default 60.

Output shape

object

Returns the API response from Rye containing the checkout intent object, including its state property. Without polling, a single GET request returns the intent state. With polling enabled, the node performs up to maxAttempts GET requests with exponential backoff, stopping early if the state is awaiting_confirmation, completed, or failed. If the final response is falsy, an empty object {} is returned instead.

Examples

Example 1: Polling enabled

checkoutIntentId: ci_abc123enablePolling: true maxAttempts: 20 initialIntervalSeconds: 5 maxIntervalSeconds: 60

Discussion