SCPConfirmPaymentIntentError

Objective-C


@interface SCPConfirmPaymentIntentError : NSError

Swift

class ConfirmPaymentIntentError : NSError

An error from -[SCPTerminal confirmPaymentIntent:completion:].

  • The updated PaymentIntent after confirmPaymentIntent failed.

    1. If the status of the updated PaymentIntent is still .requiresConfirmation (e.g the request failed because your app is not connected to the internet), you may call confirmPaymentIntent again with the updated PaymentIntent to retry the request.

    2. If the status of the updated PaymentIntent is .requiresPaymentMethod (e.g. the request failed because the card was declined), you should call collectPaymentMethod with the updated PaymentIntent to try charging another card.

    3. If this value is nil, the request timed out, and the status of the PaymentIntent is unknown. We recommend that you retry confirmPaymentIntent using the original PaymentIntent. If you instead choose to abandon the original PaymentIntent and create a new one, you should be sure not to capture the original PaymentIntent.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) SCPPaymentIntent *paymentIntent;

    Swift

    var paymentIntent: SCPPaymentIntent? { get }
  • If confirmPaymentIntent failed because the underlying network request errored, this property contains additional details about the error.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSError *requestError;

    Swift

    var requestError: (any Error)? { get }
  • If confirmPaymentIntent failed because the payment method was declined, this property contains the decline code.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSString *declineCode;

    Swift

    var declineCode: String? { get }
  • Unavailable

    You cannot directly instantiate this class.

    Declaration

    Objective-C

    - (nonnull instancetype)init;
  • Unavailable

    You cannot directly instantiate this class.

    Declaration

    Objective-C

    + (nonnull instancetype)new;