# Create an OffSessionPayment object Creates an OffSessionPayment object. ## Parameters - `amount` (object, required) The “presentment amount” to be collected from the customer. - `amount.currency` (string, required) A lowercase alpha3 currency code like “usd”. - `amount.value` (integer, required) In minor units like 123 for 1.23 USD. - `cadence` (enum, required) The frequency of the underlying payment. Possible enum values: - `recurring` Indicates a transaction occurring on a regular interval. - `unscheduled` Indicates a transaction occurring at irregular periods. - `customer` (string, required) ID of the Customer to which this OffSessionPayment belongs. - `metadata` (map, required) Set of [key-value pairs](https://docs.stripe.com/api/metadata.md) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Learn more about [storing information in metadata](https://docs.stripe.com/payments/payment-intents.md#storing-information-in-metadata). - `payment_method` (string, required) ID of the payment method used in this OffSessionPayment. - `on_behalf_of` (string, optional) The account (if any) for which the funds of the OffSessionPayment are intended. - `payment_method_options` (object, optional) Payment method options for the off-session payment. - `payment_method_options.card` (object, optional) Payment method options for the card payment type. - `retry_details` (object, optional) Details about the OffSessionPayment retries. - `retry_details.retry_policy` (string, optional) The pre-configured retry policy to use for the payment. - `retry_details.retry_strategy` (enum, optional) Indicates the strategy for how you want Stripe to retry the payment. Possible enum values: - `best_available` Indicates that you want Stripe to retry the payment automatically via the best available strategy. - `none` Indicates that you don’t want Stripe to retry the payment. - `statement_descriptor` (string, optional) Text that appears on the customer’s statement as the statement descriptor for a non-card charge. This value overrides the account’s default statement descriptor. For information about requirements, including the 22-character limit, see the [Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors.md). - `statement_descriptor_suffix` (string, optional) Provides information about a card charge. Concatenated to the account’s [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors.md#static) to form the complete statement descriptor that appears on the customer’s statement. - `test_clock` (string, optional) Test clock that can be used to advance the retry attempts in a sandbox. - `transfer_data` (object, optional) The data that automatically creates a Transfer after the payment finalizes. Learn more about the use case for [connected accounts](https://docs.stripe.com/payments/connected-accounts.md). - `transfer_data.amount` (integer, optional) The amount transferred to the destination account. This transfer will occur automatically after the payment succeeds. If no amount is specified, by default the entire payment amount is transferred to the destination account. The amount must be less than or equal to the [amount_requested](https://docs.stripe.com/api/v2/off-session-payments/object.md?api-version=2025-05-28.preview#v2_off_session_payment_object-amount_requested), and must be a positive integer representing how much to transfer in the smallest currency unit (e.g., 100 cents to charge $1.00). - `transfer_data.destination` (string, required) The account (if any) that the payment is attributed to for tax reporting, and where funds from the payment are transferred to after payment success. ## Returns ## Response attributes - `id` (string) Unique identifier for the object. - `object` (string, value is "v2.payments.off_session_payment") String representing the object’s type. Objects of the same type share the same value of the object field. - `amount_requested` (object) The “presentment amount” to be collected from the customer. - `amount_requested.currency` (string) A lowercase alpha3 currency code like “usd”. - `amount_requested.value` (integer) In minor units like 123 for 1.23 USD. - `cadence` (enum) The frequency of the underlying payment. Possible enum values: - `recurring` Indicates a transaction occurring on a regular interval. - `unscheduled` Indicates a transaction occurring at irregular periods. - `compartment_id` (string) ID of the owning compartment. - `created` (timestamp) Creation time of the OffSessionPayment. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. - `customer` (string) ID of the Customer to which this OffSessionPayment belongs. - `failure_reason` (enum, nullable) The reason why the OffSessionPayment failed. Possible enum values: - `authorization_expired` The payment failed because the authorization expired. - `rejected_by_partner` The payment failed because the payment partner returned a terminal failure. - `retries_exhausted` The payment failed because we ran out of retry attempts. - `last_authorization_attempt_error` (string, nullable) The payment error encountered in the previous attempt to authorize the payment. - `latest_payment_attempt_record` (string, nullable) Payment attempt record for the latest attempt, if one exists. - `livemode` (boolean) Has the value true if the object exists in live mode or the value false if the object exists in test mode. - `metadata` (map) Set of [key-value pairs](https://docs.stripe.com/api/metadata.md) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Learn more about [storing information in metadata](https://docs.stripe.com/payments/payment-intents.md#storing-information-in-metadata). - `on_behalf_of` (string, nullable) The account (if any) for which the funds of the OffSessionPayment are intended. - `payment_method` (string) ID of the payment method used in this OffSessionPayment. - `payment_record` (string, nullable) Payment record associated with the OffSessionPayment. - `payments_orchestration` (object) Details about the payments orchestration configuration. - `payments_orchestration.enabled` (boolean) True when you want to enable payments orchestration for this off-session payment. False otherwise. - `retry_details` (object) Details about the OffSessionPayment retries. - `retry_details.attempts` (integer) Number of authorization attempts so far. - `retry_details.retry_policy` (string, nullable) The pre-configured retry policy to use for the payment. - `retry_details.retry_strategy` (enum) Indicates the strategy for how you want Stripe to retry the payment. Possible enum values: - `heuristic` Indicates that you want Stripe to retry the payment automatically via pre-determined heuristics. - `none` Indicates that you don’t want Stripe to retry the payment. - `scheduled` Indicates that you want Stripe to retry the payment automatically on a fixed schedule. - `smart` Indicates that you want Stripe to retry the payment automatically via ML predictions. - `statement_descriptor` (string, nullable) Text that appears on the customer’s statement as the statement descriptor for a non-card charge. This value overrides the account’s default statement descriptor. For information about requirements, including the 22-character limit, see the [Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors.md). - `statement_descriptor_suffix` (string, nullable) Provides information about a card charge. Concatenated to the account’s [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors.md#static) to form the complete statement descriptor that appears on the customer’s statement. - `status` (enum) Status of this OffSessionPayment, one of `pending`, `pending_retry`, `processing`, `failed`, `canceled`, `requires_capture`, or `succeeded`. Possible enum values: - `canceled` The payment was manually canceled. - `failed` The payment is terminally failed. - `pending` Payment has not yet been attempted. - `pending_retry` The payment failed a previous attempt and will be retried automatically. - `processing` The payment is currently processing an authorization attempt. Any manual operations on it will be blocked. - `requires_capture` The payment is awaiting capture. - `succeeded` The payment has successfully moved money. - `test_clock` (string, nullable) Test clock that can be used to advance the retry attempts in a sandbox. - `transfer_data` (object, nullable) The data that automatically creates a Transfer after the payment finalizes. Learn more about the use case for [connected accounts](https://docs.stripe.com/payments/connected-accounts.md). - `transfer_data.amount` (integer, nullable) The amount transferred to the destination account. This transfer will occur automatically after the payment succeeds. If no amount is specified, by default the entire payment amount is transferred to the destination account. The amount must be less than or equal to the [amount_requested](https://docs.stripe.com/api/v2/off-session-payments/object.md?api-version=2025-05-28.preview#v2_off_session_payment_object-amount_requested), and must be a positive integer representing how much to transfer in the smallest currency unit (e.g., 100 cents to charge $1.00). - `transfer_data.destination` (string) The account (if any) that the payment is attributed to for tax reporting, and where funds from the payment are transferred to after payment success. ## Error Codes | HTTP status code | Code | Description | | ---------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | 400 | off_session_payment_heuristic_retries_not_supported_for_cards | Card payment methods do not support heuristic retries. | | 400 | off_session_payment_incorrect_payment_method_type_for_options | You may not provide payment method options that do not match the payment method type. | | 400 | off_session_payment_retry_policy_not_supported_for_debit_payment_methods | Debit payment methods do not support custom retry policies. | | 400 | off_session_payment_retry_policy_strategy_mutually_exclusive | You may not specify both a retry_policy and retry_strategy. These parameters are mutually exclusive. | | 400 | off_session_payment_smart_retries_not_supported_for_debit_payment_methods | Debit payment methods do not support smart retries. | | 400 | off_session_payment_test_clock_in_livemode | Test clocks may not be used with the Off-Session Payments API in livemode. Please use your sandbox keys to test with test clocks. | | 400 | osp_ach_retries_not_enabled | To schedule ACH payment retries with the Off-Session Payments API, you must first enable ACH retries on the Stripe dashboard. | | 400 | osp_amount_too_large | The Off-Session Payments API has limits on the maximum amount you may charge in each currency. | | 400 | osp_amount_too_small | The Off-Session Payments API has limits on the minimum amount you may charge in each currency. | | 400 | osp_generic_invalid_request | A generic error occurred during payment. See error message for more details. | | 400 | osp_invalid_payment_method_type | Indicates that the payment method you provided is not compatible with the Off-Session Payments API. The Off-Session Payments API currently only supports card payment methods, including ones generated from wallets. | | 400 | osp_payment_method_not_attached | To use the Off-Session Payments API, you must first attach the PaymentMethod to the Customer via the Setup Intents API. | | 400 | osp_payments_orchestration_not_supported_with_connect | Payments orchestration is not supported with connect integrations. | | 400 | osp_payments_orchestration_not_supported_with_smart_retries | Smart retries are not supported for orchestrated OSPS at this time. | | 400 | osp_payments_orchestration_only_supported_for_cards | Payments orchestration is currently only supported for card payment method types. | | 400 | osp_pm_not_setup_for_off_session | To use the Off-Session Payments API, you must first set up the PaymentMethod for off-session usage via the Setup Intents API. | | 400 | osp_pm_set_up_only_on_connected_account | To use the Off-Session Payments API, you must first set up the PaymentMethod for off-session usage via the Setup Intents API. You must use the same value for `on_behalf_of` when calling into the SetupIntent API as what you use in the Off-Session Payments API. | | 400 | osp_pm_set_up_only_on_platform | To use the Off-Session Payments API, you must first set up the PaymentMethod for off-session usage via the Setup Intents API. You must use the same value for `on_behalf_of` when calling into the SetupIntent API as what you use in the Off-Session Payments API. | | 400 | osp_sepa_debit_retries_not_enabled | To schedule SEPA Debit payment retries with the Off-Session Payments API, you must first enable SEPA Debit retries on the Stripe dashboard. | ```curl curl -X POST https://api.stripe.com/v2/payments/off_session_payments \ -H "Authorization: Bearer <>" \ -H "Stripe-Version: 2025-11-17.preview" \ --json '{ "amount": { "value": 2000, "currency": "usd" }, "retry_details": { "retry_strategy": "smart" }, "cadence": "recurring", "customer": "{{CUSTOMER_ID}}", "payment_method": "{{PAYMENT_METHOD_ID}}", "metadata": {} }' ``` ### Response ```json { "amount_requested": { "value": 2000, "currency": "usd" }, "cadence": "recurring", "compartment_id": "wksp_test_6OdsB30MSQB61rhH1uYqVKa", "created": "2025-01-01T00:00:00.000Z", "customer": "cus_SJjFsJvGPQKfH1", "failure_reason": null, "id": "osp_test_6pO5OrRN03IzV8rd3BaY", "last_authorization_attempt_error": null, "latest_payment_attempt_record": null, "livemode": false, "metadata": {}, "object": "v2.payments.off_session_payment", "on_behalf_of": null, "payment_method": "pm_1RP6TAG7mvlzf7RNfspLoGQ9", "payment_record": null, "payments_orchestration": null, "retry_details": { "attempts": 0, "retry_strategy": "smart" }, "statement_descriptor": null, "statement_descriptor_suffix": null, "status": "pending", "test_clock": null, "transfer_data": null } ```