Account Model

The Charge_Account model is used as part of the Connect feature.

You'll reference the account model when passing the details as part of a payment for a connected account, to the payment options method, in your payment form.

Additionally, you can access details about connected accounts from the resultant Charge models, and via the parent elements.

Accessing #

On the front-end Charge_Account models can be accessed in 2 ways.

1. On an Element #

You'll need to access the account model on the element before creating a charge, so you can pass the payment(s) to the appropriate account.

This is all handled via the Charge_Connect fieldtype. When you have this on the element, you can access it from the name you have the field, ie. something like connectedAccount.

2. On a Charge #

After a charge has been made and sent to a connected account, you can access the details of that account on the Charge model itself.

This is done via the account property on the charge model, ie. {{ }}.

Always check if the account is null before attempting to access it's attributes. The value will be null if the charge wasn't sent to a connected account.

Attributes #

The following attributes are available on the Charge_Account model.

id Number
The id for the account.
stripeId String
The stripe id of the connected account.
elementId Number
The element id of the parent element for this account
livemode Bool
If this account is in live mode or not.
parentElement Object
The parent element for this account.
stripeLink String
A direct link to the stripe account dashboard url
title String
A short helper to access the parent element's title.