@mbanq/core-sdk-js / commands / CreateCreditAccountAutoPayExternal
Function: CreateCreditAccountAutoPayExternal()
CreateCreditAccountAutoPayExternal(
creditAccountId,data):Command<{creditAccountId:number;data: {fromAccountNumber:string;fromAccountRoutingNumber:string;fromAccountType:number;fromClientId:number;fromOfficeId:number;instructionType:InstructionType;isAccountExternal:boolean;locale:string;name:string;priority:Priority;status:Status;toAccountId:number;toAccountType:number;toClientId:number;toOfficeId:number;transferType:number; }; }, {clientId:number;id:number;resourceId:number; }>
Defined in: src/commands/rest/creditAccount.ts:512
Create an external auto-pay instruction for a credit account
Sets up an automatic payment instruction that transfers funds from an external bank account (using ACH or external transfer) to pay off a credit account balance. The auto-pay can be configured to pay either the minimum due or the full statement balance. This is useful for customers who want to use accounts from other financial institutions.
Parameters
creditAccountId
number
The unique identifier of the credit account to receive auto-payments
data
fromAccountNumber
string = ...
fromAccountRoutingNumber
string = ...
fromAccountType
number = ...
fromClientId
number = ...
fromOfficeId
number = ...
instructionType
InstructionType = ...
isAccountExternal
boolean = ...
locale
string = ...
name
string = ...
priority
Priority = ...
status
Status = ...
toAccountId
number = ...
toAccountType
number = ...
toClientId
number = ...
toOfficeId
number = ...
transferType
number = ...
Returns
Command<{ creditAccountId: number; data: { fromAccountNumber: string; fromAccountRoutingNumber: string; fromAccountType: number; fromClientId: number; fromOfficeId: number; instructionType: InstructionType; isAccountExternal: boolean; locale: string; name: string; priority: Priority; status: Status; toAccountId: number; toAccountType: number; toClientId: number; toOfficeId: number; transferType: number; }; }, { clientId: number; id: number; resourceId: number; }>
Command object that executes the API request and returns auto-pay setup result
Example
const command = CreateCreditAccountAutoPayExternal(388, {
name: 'External Auto Pay - Chase',
transferType: 5,
priority: 2,
status: 1,
isAccountExternal: true,
fromOfficeId: 1,
fromClientId: 4132,
fromAccountType: 2,
fromAccountNumber: '123456789',
fromAccountRoutingNumber: '021000021',
toOfficeId: 1,
toClientId: 4132,
toAccountType: 3,
toAccountId: 388,
instructionType: 3,
locale: 'en'
});
const result = await client.request(command);