Credit Card Update DIM Callbacks

The documentation for the credit card update DIM callbacks

For the credit card update module, there are required parameters that must be included when invoking the module, so that the proper context is given to update a specific users card details. The module itself will fire events at different stages, depending on the user interaction, success, failure, and other important points in the DIM flow.

For invoking, the following should be utilized:

dropinConfig: {
    module: 'credit-card-update',
    token: token,
    liabilityId: liabilityId,
    fields: ["CREDIT_CARD_NUMBER"]
  },

For the Credit Card Update specific events, the following are available for context as a user navigates the module:

onSuccess

The Credit Card Update module triggers the following onSuccess method:

  • UPDATE_SUCCESS - The card has been successfully updated
onSuccess(metadata){
    // your code
}

{
    'eventName': 'UPDATE_SUCCESS',
    'message': 'Card update is successful'
}

onEvent

The Credit Card Update module triggers the following onEvent methods:

  • USER_SUBMISSION - User has submitted the updated information
  • UPDATE_FAILED - Updating the information has failed and the user will be prompted for retry
onEvent(metadata){
    // your code
}

{
    'eventName': '{eventName}',
    'message': '{message}'
}

onError

The Credit Card Update module triggers the following onError methods:

  • MISSING_PARAMETER - The liabilityId was not sent or a field was not correct to enable updating
  • LIABILITY_NOT_FOUND - The liabilityId sent does not exist for this user
  • DIM_ERROR - Default error for a DIM error (eg. failure to load, unhandled exception)
onError(metadata){
    // your code
}

{
    'eventName': '{eventName}',
    'message': '{message}',
    'metadata': {
        // details related to error
    }
}

To learn more about our debt APIs and 1-click solutions, visit spinwheel.io.