Skip to content

Commit 25377c9

Browse files
committed
docs(readme): add correct subaccount type and definition, and link to split payment docs
1 parent 5c1003d commit 25377c9

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

README.md

+12-2
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ Hi :wave:, so there are cases where you have already initialized a payment with
182182
| redirect_url | No | string | undefined | URL to redirect to when a transaction is completed. This is useful for 3DSecure payments so we can redirect your customer back to a custom page you want to show them. |
183183
| payment_options | No | string | undefined | This allows you to select the payment option you want for your users, see [Choose Payment Methods](https://developer.flutterwave.com/v2.0/docs/splitting-payment-methods) for more info. |
184184
| payment_plan | No | number | undefined | This is the payment plan ID used for [Recurring billing](https://developer.flutterwave.com/v2.0/docs/recurring-billing). |
185-
| subaccounts | No | array | undefined | This is an array of objects containing the subaccount IDs to split the payment into. |
185+
| subaccounts | No | array of [FlutterwaveInitSubAccount](#flutterwaveinitsubaccount) | undefined | This is an array of objects containing the subaccount IDs to [split the payment](https://developer.flutterwave.com/v2.0/docs/split-payment) into. |
186186
| country | No | string | NG | Route country. Defaults to NG |
187187
| pay_button_text | No | string | undefined | Text to be displayed on the Rave Checkout Button. |
188188
| custom_title | No | string | undefined | Text to be displayed as the title of the payment modal. |
@@ -253,6 +253,16 @@ interface FlutterwaveInitResult {
253253
}
254254
````
255255

256+
### FlutterwaveInitSubAccount
257+
```typescript
258+
interface FlutterwaveInitSubAccount {
259+
id: string;
260+
transaction_split_ratio?: number;
261+
transaction_charge_type?: string;
262+
transaction_charge?: number;
263+
}
264+
```
265+
256266
#### FlutterwavePaymentMeta
257267
````typescript
258268
interface FlutterwavePaymentMeta {
@@ -275,7 +285,7 @@ export interface FlutterwaveInitOptions {
275285
redirect_url?: string;
276286
payment_options?: string;
277287
payment_plan?: number;
278-
subaccounts?: Array<number>;
288+
subaccounts?: Array<FlutterwaveInitSubAccount>;
279289
country?: string;
280290
pay_button_text?: string;
281291
custom_title?: string;

0 commit comments

Comments
 (0)