UNPKG

paystack-sdk

Version:
55 lines (54 loc) 2.07 kB
"use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.Verification = void 0; /** * ## Verification * The Verification API allows you perform KYC processes. */ class Verification { constructor(http) { this.http = http; } /** * #### Resolve Account * Confirm an account belongs to the right customer * @param {ResolveAccount} data **Query Param** */ resolveAccount(data) { return __awaiter(this, void 0, void 0, function* () { return yield this.http.get('/bank/resolve', { params: Object.assign({}, data) }); }); } /** * #### Validate Account * Confirm the authenticity of a customer's account number * before sending money * @param {ValidateAccount} data **Data Param** */ validateAccount(data) { return __awaiter(this, void 0, void 0, function* () { return yield this.http.post('/bank/validate', JSON.stringify(data)); }); } /** * #### Resolve Card BIN * Get more information about a customer's card * using the first 6 characters of the card * @param {string} bin **Path Param** */ resolveCard(bin) { return __awaiter(this, void 0, void 0, function* () { return yield this.http.get(`/decision/bin/${bin}`); }); } } exports.Verification = Verification;