Precision Pay DIM Callbacks

The documentation for the Precision Pay DIM callbacks

onSuccess

When a user creates a payment and moves to the payment confirmation screen, the onSuccess method is triggered when the user wants to close the dropin module and clicks the "Done" button. We pass the required data in the event callback and then close the dropin module.

onSuccess(metadata){
    // your code
}

{
    'eventName': 'PAYMENT_DROPIN_CLOSE',
    'message': 'Payment Dropin Closed',
    'metadata': {
        'daysSaved': '{daysSaved}',
        'savingsAmount': '{savingsAmount}'
    }
}

onEvent

The following events are triggered by the Precision Pay DIM

  • PAYMENT_SCH - A payment is scheduled
  • SUBSCRIPTION_SAVE - A subscription is saved/updated
onEvent(metadata){
    // your code
}

{
    'eventName': 'PAYMENT_SCH',
    'message': 'Payment Processed',
    'metadata': {
        'paymentAmount': '{paymentAmount}'
    }
}

{
    'eventName': 'SUBSCRIPTION_SAVE',
    'message': 'Subscription Saved',
    'metadata': {
        'paymentAmount': '{paymentAmount}',
        'mode': 'oneTime | recurring | roundUp'
    }
}

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