Deletes single payment instrument specified with instrument type and identifier.
instrumentId and instrumentType
A Promise that resolves to the deleted payment instrument
if HTTP request fails
paymentInstrumentService.delete()
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error('Error deleting specified payment instrument.');
})
Returns single payment instrument specified with instrument type and identifier.
instrumentId and instrumentType
A Promise that resolves to the retrieved payment instrument
if HTTP request fails
paymentInstrumentService.get({ instrumentId: '2438764', instrumentType: InstrumentType.US_BANK_ACCOUNT })
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error('Error retrieving specified payment instrument.');
})
Retrieves a list of active payment instruments for the customer. Customer identifier is implicit. It is taken from the authorization token. Instruments can be additionally filtered by instrumentType and paymentOption filters.
filter parameters
A Promise that resolves to the retrieved customer payment instruments
if HTTP request fails
paymentInstrumentService.getAll({ instrumentType: InstrumentType.US_BANK_ACCOUNT })
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error('Error fetching payment instruments for the customer.');
})
Retrieves list of user instrument verifications.
Optional
parameters: InstrumentVerificationParametersThe request parameters.
A promise that resolves to an instrument verifications list.
If the HTTP request fails.
// Example usage:
paymentInstrumentService.getAllVerifications(parameters)
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error('Error fetching instrument verification list.');
});
Retrieves a user specific instrument verification.
The ID of the verification/session to retrieve.
A promise that resolves to an instrument verification.
If the HTTP request fails.
// Example usage:
paymentInstrumentService.getVerification(sessionId)
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error('Error fetching instrument verification.');
});
Starts instrument verification.
Instrument verification request body.
A promise that resolves to the instrument verification.
If the HTTP request fails.
// Example usage:
paymentInstrumentService.startVerification(request)
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error('Error starting instrument verification.');
});
Static
getRetrieves the singleton instance of the PaymentInstrumentService class.
The singleton instance of the PaymentInstrumentService class.
// Usage:
const paymentInstrumentService = PaymentInstrumentService.getInstance();
Service class for managing payment instrument related operations.