The OffSessionPayment object 

Core Resources
Off Session Payments
The OffSessionPayment object

Attributes

  • idstring

    ID of the OSP.

  • objectstring, 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_requestedobject

    The amount you requested to be collected on the OSP upon creation.

    • amount_requested.currencystring

      A lowercase alpha3 currency code like “usd”.

    • amount_requested.valueinteger

      In minor units like 123 for 1.23 USD.

  • cadenceenum

    The frequency of the underlying payment that this OSP represents.

    Possible enum values
    recurring

    Indicates a transaction occurring on a regular interval.

    unscheduled

    Indicates a transaction occurring at irregular periods.

  • compartment_idstring

    ID of owning compartment.

  • createdtimestamp

    Timestamp of creation.

  • customerstring

    Customer owning the supplied payment method.

  • failure_reasonnullable enum

    Reason why the OSP failed.

    Possible enum values
    rejected_by_partner

    OSP failed because the payment partner returned a terminal failure.

    retries_exhausted

    OSP failed because we ran out of retry attempts.

  • last_authorization_attempt_errornullable string

    Last error returned by the financial partner for a failed authorization.

  • latest_payment_attempt_recordnullable string

    Payment attempt record for the latest attempt, if one exists.

  • livemodeboolean

    True if the txn is livemode, false otherwise.

  • metadatamap

    Metadata you provided.

  • on_behalf_ofnullable string

    OBO, same as on the PI.

  • payment_methodstring

    ID of payment method.

  • payment_recordnullable string

    Payment record associated with the OSP. consistent across attempts.

  • retry_detailsobject

    Details about the OSP retries.

    • retry_details.attemptsinteger

      Number of authorization attempts so far.

    • retry_details.retry_strategyenum

      How you want Stripe to retry the payment.

      Possible enum values
      none

      Indicates that you don’t want Stripe to retry the payment.

      smart

      Indicates that you want Stripe to retry the payment automatically via ML predictions.

  • statement_descriptornullable string

    Statement descriptor you provided.

  • statement_descriptor_suffixnullable string

    Statement descriptor suffix you provided, similar to that on the PI.

  • statusenum

    Status of the OSP.

    Possible enum values
    canceled

    User canceled the OSP.

    failed

    OSP is terminally failed.

    pending

    OSP has not yet been attempted.

    pending_retry

    OSP failed a previous attempt and will be retried automatically.

    processing

    OSP is currently processing an attempt. Do not operate on it.

    requires_capture

    OSP is awaiting capture.

    succeeded

    OSP successfully moved money.

  • test_clocknullable string

    Test clock to be used to advance the retry attempts.

  • transfer_datanullable object

    Instructions for the transfer to be made with this OSP after successful money movement.

    • transfer_data.amountnullable integer

      Amount in minor units that you want to transfer.

    • transfer_data.destinationstring

      ID of the connected account where you want money to go.

The OffSessionPayment object
{
"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": "par_test_65ScpVhNz9xBDZWOi8n41LUaWUrHDArR0K",
"livemode": false,
"metadata": {},
"object": "v2.payments.off_session_payment",
"on_behalf_of": null,
"payment_method": "pm_1RP6TAG7mvlzf7RNfspLoGQ9",
"payment_record": "pr_test_65ScpUdmQCOf291sX8n41LUaWUrHDArBhg",
"retry_details": {
"attempts": 1,
"retry_strategy": "smart"
},
"statement_descriptor": null,
"statement_descriptor_suffix": null,
"status": "succeeded",
"test_clock": null,
"transfer_data": null
}