Mayson Monorepo Documentation
    Preparing search index...
    interface LastSetupError {
        advice_code?: string;
        charge?: string;
        code?: Stripe.SetupIntent.LastSetupError.Code;
        decline_code?: string;
        doc_url?: string;
        message?: string;
        network_advice_code?: string;
        network_decline_code?: string;
        param?: string;
        payment_intent?: Stripe.PaymentIntent;
        payment_method?: Stripe.PaymentMethod;
        payment_method_type?: string;
        request_log_url?: string;
        setup_intent?: Stripe.SetupIntent;
        source?: CustomerSource;
        type: Stripe.SetupIntent.LastSetupError.Type;
    }
    Index

    Properties

    advice_code?: string

    For card errors resulting from a card issuer decline, a short string indicating how to proceed with an error if they provide one.

    charge?: string

    For card errors, the ID of the failed charge.

    For some errors that could be handled programmatically, a short string indicating the error code reported.

    decline_code?: string

    For card errors resulting from a card issuer decline, a short string indicating the card issuer's reason for the decline if they provide one.

    doc_url?: string

    A URL to more information about the error code reported.

    message?: string

    A human-readable message providing more details about the error. For card errors, these messages can be shown to your users.

    network_advice_code?: string

    For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error.

    network_decline_code?: string

    For payments declined by the network, an alphanumeric code which indicates the reason the payment failed.

    param?: string

    If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field.

    payment_intent?: Stripe.PaymentIntent

    A PaymentIntent guides you through the process of collecting a payment from your customer. We recommend that you create exactly one PaymentIntent for each order or customer session in your system. You can reference the PaymentIntent later to see the history of payment attempts for a particular session.

    A PaymentIntent transitions through multiple statuses throughout its lifetime as it interfaces with Stripe.js to perform authentication flows and ultimately creates at most one successful charge.

    Related guide: Payment Intents API

    payment_method?: Stripe.PaymentMethod

    PaymentMethod objects represent your customer's payment instruments. You can use them with PaymentIntents to collect payments or save them to Customer objects to store instrument details for future payments.

    Related guides: Payment Methods and More Payment Scenarios.

    payment_method_type?: string

    If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors.

    request_log_url?: string

    A URL to the request log entry in your dashboard.

    setup_intent?: Stripe.SetupIntent

    A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment. Later, you can use PaymentIntents to drive the payment flow.

    Create a SetupIntent when you're ready to collect your customer's payment credentials. Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid. The SetupIntent transitions through multiple statuses as it guides you through the setup process.

    Successful SetupIntents result in payment credentials that are optimized for future payments. For example, cardholders in certain regions might need to be run through Strong Customer Authentication during payment method collection to streamline later off-session payments. If you use the SetupIntent with a Customer, it automatically attaches the resulting payment method to that Customer after successful setup. We recommend using SetupIntents or setup_future_usage on PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods.

    By using SetupIntents, you can reduce friction for your customers, even as regulations change over time.

    Related guide: Setup Intents API

    The type of error returned. One of api_error, card_error, idempotency_error, or invalid_request_error