Failed Payment Details

August 21, 2026 ยท View on GitHub

The details for the failed payment of the subscription.

Structure

FailedPaymentDetails

Fields

NameTypeTagsDescriptionGetterSetter
AmountMoneyRequiredThe currency and amount for a financial transaction, such as a balance or payment due.Money getAmount()setAmount(Money amount)
TimeStringRequiredThe date and time, in Internet date and time format. Seconds are required while fractional seconds are optional. Note: The regular expression provides guidance but does not reject all invalid dates.

Constraints: Minimum Length: 20, Maximum Length: 64, Pattern: ^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$
String getTime()setTime(String time)
ReasonCodeReasonCodeOptional, Read-onlyThe reason code for the payment failure.

Constraints: Minimum Length: 1, Maximum Length: 120, Pattern: ^[A-Z_]+$
ReasonCode getReasonCode()setReasonCode(ReasonCode reasonCode)
NextPaymentRetryTimeStringOptionalThe date and time, in Internet date and time format. Seconds are required while fractional seconds are optional. Note: The regular expression provides guidance but does not reject all invalid dates.

Constraints: Minimum Length: 20, Maximum Length: 64, Pattern: ^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$
String getNextPaymentRetryTime()setNextPaymentRetryTime(String nextPaymentRetryTime)

Example

import com.paypal.sdk.models.FailedPaymentDetails;
import com.paypal.sdk.models.Money;

FailedPaymentDetails failedPaymentDetails = new FailedPaymentDetails.Builder(
    new Money.Builder(
        "currency_code6",
        "value0"
    )
    .build(),
    "time2"
)
.nextPaymentRetryTime("next_payment_retry_time8")
.build();