Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions src/transaction/interface.ts

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not see where in their api this is, can you send me the link to check?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i added the link in the commit message already

Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,29 @@ export interface InitializeTransaction {
* `account` or `subaccount` (defaults to `account`)
*/
bearer?: string;

/**
* A dynamic split configuration for this transaction.
* Use this to create splits on the fly without pre-creating a split.
*/
split?: {
/**
* The type of split. Can be `flat` or `percentage`
*/
type: "flat" | "percentage";
/**
* An array of subaccount objects with subaccount code and share.
* @example [{ "subaccount": "ACCT_pwwualwty4nhq9d", "share": 6000 }]
*/
subaccounts: { subaccount: string; share: number }[];
/**
* Unique reference for the split
*/
reference?: string;
} & (
| { bearer_type: "all" | "all-proportional" | "account" }
| { bearer_type: "subaccount"; bearer_subaccount: string }
);
}

export interface Response {
Expand Down