@paydock/client-sdk
Version:
Paydock client sdk
36 lines • 1.04 kB
TypeScript
import { Api } from './api';
declare class ApiCharge {
protected api: Api;
constructor(api: Api);
/**
* Current method allows to work with charge related endpoints
*
* @example
* api.charge().preAuth('payload', cb);
*
* @param {object} payload - Payload for pre authorization.
* @param {number} payload.amount - Charge amount.
* @param {string} payload.currency - Charge currency.
* @param {string} payload.token - Payment source token.
* @param {string} [payload._3ds.redirect_url] - Redirect url after 3d secure processing.
* @param {listener} [cb]
*/
preAuth(payload: PreAuthBody, cb?: (data: any) => void): void | Promise<PreAuthResponse>;
}
interface PreAuthResponse {
_3ds: {
token: string;
id: string;
};
status: string;
}
interface PreAuthBody {
token: string;
amount: string | number;
currency: string;
_3ds?: {
redirect_url?: string;
};
}
export { ApiCharge };
//# sourceMappingURL=api-charge.d.ts.map