SCPProcessPaymentError

Objective-C


@interface SCPProcessPaymentError : NSError

Swift

class ProcessPaymentError : NSError

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

  • The updated PaymentIntent after processPayment 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 processPayment 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 processPayment 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 processPayment 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: Error? { get }
  • If processPayment 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;