success(successData)
Most SubscriptionJS methods provide a success callback. Please refer to each method to see in which form successData will be provided.
error(errorData)
Most SubscriptionJS methods provide a callback to handle errors.
{
"errorCode" : ["InvalidCardCvc"],
"errorMessage" : "",
"referenceId" : "",
"referenceUrl" : "",
"details" : ""
}
When handling errors in SubscriptionJS
, it's essential to validate the structure of the error object, as it may vary under certain conditions. Below is guidance on understanding and utilizing error messages:
Error Object Details
errorMessage
: Designed for developer insight and not for customer communication.referenceId
,referenceUrl
,details
: Reserved for future functionality and not currently active.errorCode
: An array indicating specific error conditions which allows for targeted troubleshooting on your interface.
Guidance for Developers
- Internal Use: Utilize
errorMessage
for logging and troubleshooting within your development team. - Future Proofing:
referenceId
,referenceUrl
, anddetails
are placeholders for upcoming features and should be included in error object models for forward compatibility. - User Interaction: Design user-friendly messages and prompts based on
errorCode
to help users rectify input errors or payment issues.
Common errorCode
Values and Responses
errorCode
Values and ResponsesThe following table lists the potential error codes generated by SubscriptionJS
, which can be used to diagnose and provide specific guidance or corrective action to the user:
ErrorCode | Description |
---|---|
Aborted | The user or system aborted the process. |
AcquirerServerError | Server error at the acquirer's end. |
AmountLimitExceeded | The transaction amount exceeds the permitted limit. |
AuthorizationRejected | The authorization for the transaction was rejected. |
BearerExpired | The bearer token used for the transaction has expired. |
BearerRejected | The provided bearer token was rejected. |
InvalidAccountHolder | The account holder's name is invalid. |
InvalidAccountNumber | The provided account number is invalid. |
InvalidAmount | The amount specified in the transaction is invalid. |
InvalidBankCode | The bank code provided is invalid. |
InvalidBic | The BIC provided is invalid. |
InvalidCardType | The type of card provided is invalid. |
InvalidCardNumber | The card number provided is invalid. |
InvalidCardCvc | The CVC code for the card is invalid. |
InvalidCardHolder | The name of the cardholder is invalid. |
InvalidConfiguration | There is a configuration error with the payment. |
InvalidCountry | The specified country is invalid or unsupported. |
InvalidCouponCode | The coupon code provided is invalid. |
InvalidCurrency | The currency specified is not supported. |
InvalidData | General invalid data error. |
InvalidExpirationDate | The card's expiration date is invalid. |
InvalidKey | An invalid key was used in the transaction. |
InvalidIban | The IBAN provided is invalid. |
InvalidName | The customer name provided is invalid. |
InvalidPaymentData | The payment data submitted is invalid. |
InvalidPaymentMethod | The chosen payment method is invalid. |
InvalidTransaction | The transaction is invalid. |
InvalidVatId | The VAT ID provided is invalid. |
IteroServerError | Server error at Itero's end. |
PspServerError | Server error at the Payment Service Provider's end. |
RateLimit | The rate limit for requests has been exceeded. |
Timeout | The transaction timed out. |
UnmappedError | An error not specifically mapped to a Billwerk+ Transform code. |
3DsProblem | Problem with 3D Secure verification. |
Server Error Codes for Failed Payments
The following table lists the potential error codes returned by the server when a payment fails, which helps in identifying the cause and responding accordingly:
ErrorCode | Description |
---|---|
AlreadyExecuted | The payment or operation has already been processed. |
BearerInvalid | The bearer token provided is invalid or not recognized. |
BearerExpired | The bearer token used has expired. |
Canceled | The payment or operation was canceled. |
LimitExceeded | A predefined limit has been exceeded. |
LoginError | There was an error logging in or authenticating. |
InsufficientBalance | The account balance is insufficient for the transaction. |
InternalError | An unspecified internal error occurred. |
InvalidAmount | The transaction amount specified is invalid. |
InvalidBic | The BIC (Bank Identifier Code) provided is invalid. |
InvalidCountry | The specified country is invalid or unsupported. |
InvalidConfiguration | There is a configuration error with the system. |
InvalidCurrency | The currency specified is not supported or is invalid. |
InvalidData | The data provided for the transaction is invalid. |
InvalidIBAN | The IBAN (International Bank Account Number) is invalid. |
InvalidPreconditions | Preconditions for the transaction are not met. |
InternalProviderError | An error occurred within the payment provider's system. |
PermissionDenied | Permission for the transaction was denied. |
PSPConnectionProblem | There was a problem connecting to the payment service provider. |
PSPConnectionTimeout | Connection to the payment service provider timed out. |
RateLimit | The rate of requests exceeded the allowed threshold. |
Rejected | The transaction was rejected. |
UnmappedError | A payment service provider error that is not mapped to a specific Billwerk code. |