Skip to content

Latest commit

 

History

History
689 lines (521 loc) · 68.6 KB

README.md

File metadata and controls

689 lines (521 loc) · 68.6 KB

Accounts

(accounts)

Overview

Available Operations

  • create - You can create business or individual accounts for your users (i.e., customers, merchants) by passing the required information to Moov. Requirements differ per account type and requested capabilities.

If you're requesting the wallet, send-funds, collect-funds, or card-issuing capabilities, you'll need to:

  • Send Moov the user platform terms of service agreement acceptance. This can be done upon account creation, or by patching the account using the termsOfService field. If you're creating a business account with the business type llc, partnership, or privateCorporation, you'll need to:
  • Provide business representatives after creating the account.
  • Patch the account to indicate that business representative ownership information is complete.

Visit our documentation to read more about creating accounts and verification requirements. Note that the mode field (for production or sandbox) is only required when creating a facilitator account. All non-facilitator account requests will ignore the mode field and be set to the calling facilitator's mode.

To access this endpoint using an access token you'll need to specify the /accounts.write scope.

  • list - List or search accounts to which the caller is connected.

All supported query parameters are optional. If none are provided the response will include all connected accounts. Pagination is supported via the skip and count query parameters. Searching by name and email will overlap and return results based on relevance.

To access this endpoint using an access token you'll need to specify the /accounts.read scope.

  • get - Retrieves details for the account with the specified ID.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/profile.read scope.

  • update - When can profile data be updated:

    • For unverified accounts, all profile data can be edited.
    • During the verification process, missing or incomplete profile data can be edited.
    • Verified accounts can only add missing profile data.

    When can't profile data be updated:

    • Verified accounts cannot change any existing profile data.

If you need to update information in a locked state, please contact Moov support.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/profile.write scope.

  • disconnect - This will sever the connection between you and the account specified and it will no longer be listed as active in the list of accounts. This also means you'll only have read-only access to the account going forward for reporting purposes.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/profile.disconnect scope.

  • get_countries - Retrieve the specified countries of operation for an account.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/profile.read scope.

This endpoint will always overwrite the previously assigned values.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/profile.write scope.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/profile.read scope.

This token can only be generated via API. Any Moov account requesting the collect funds, send funds, wallet, or card issuing capabilities must accept Moov's terms of service, then have the generated terms of service token patched to the account. Read more in our documentation.

create

You can create business or individual accounts for your users (i.e., customers, merchants) by passing the required information to Moov. Requirements differ per account type and requested capabilities.

If you're requesting the wallet, send-funds, collect-funds, or card-issuing capabilities, you'll need to:

  • Send Moov the user platform terms of service agreement acceptance. This can be done upon account creation, or by patching the account using the termsOfService field. If you're creating a business account with the business type llc, partnership, or privateCorporation, you'll need to:
  • Provide business representatives after creating the account.
  • Patch the account to indicate that business representative ownership information is complete.

Visit our documentation to read more about creating accounts and verification requirements. Note that the mode field (for production or sandbox) is only required when creating a facilitator account. All non-facilitator account requests will ignore the mode field and be set to the calling facilitator's mode.

To access this endpoint using an access token you'll need to specify the /accounts.write scope.

Example Usage

from moovio_sdk import Moov
from moovio_sdk.models import components


with Moov(
    security=components.Security(
        username="",
        password="",
    ),
) as moov:

    res = moov.accounts.create(account_type=components.AccountType.BUSINESS, profile=components.CreateProfile(
        individual=components.CreateIndividualProfile(
            name=components.IndividualName(
                first_name="Jordan",
                middle_name="Reese",
                last_name="Lee",
                suffix="Jr",
            ),
            phone=components.PhoneNumber(
                number="8185551212",
                country_code="1",
            ),
            email="jordan.lee@classbooker.dev",
            address=components.Address(
                address_line1="123 Main Street",
                address_line2="Apt 302",
                city="Boulder",
                state_or_province="CO",
                postal_code="80301",
                country="US",
            ),
            birth_date=components.BirthDate(
                day=9,
                month=11,
                year=1989,
            ),
        ),
        business=components.CreateBusinessProfile(
            legal_business_name="Classbooker, LLC",
            business_type=components.BusinessType.LLC,
            address=components.Address(
                address_line1="123 Main Street",
                address_line2="Apt 302",
                city="Boulder",
                state_or_province="CO",
                postal_code="80301",
                country="US",
            ),
            phone=components.PhoneNumber(
                number="8185551212",
                country_code="1",
            ),
            email="jordan.lee@classbooker.dev",
            description="Local fitness gym paying out instructors",
            tax_id=components.TaxID(
                ein=components.Ein(
                    number="12-3456789",
                ),
            ),
            industry_codes=components.IndustryCodes(
                naics="713940",
                sic="7991",
                mcc="7997",
            ),
        ),
    ), metadata={
        "optional": "metadata",
    }, terms_of_service={
        "token": "kgT1uxoMAk7QKuyJcmQE8nqW_HjpyuXBabiXPi6T83fUQoxsyWYPcYzuHQTqrt7YRp4gCwyDQvb6U5REM9Pgl2EloCe35t-eiMAbUWGo3Kerxme6aqNcKrP_6-v0MTXViOEJ96IBxPFTvMV7EROI2dq3u4e-x4BbGSCedAX-ViAQND6hcreCDXwrO6sHuzh5Xi2IzSqZHxaovnWEboaxuZKRJkA3dsFID6fzitMpm2qrOh4",
    }, customer_support={
        "phone": {
            "number": "8185551212",
            "country_code": "1",
        },
        "email": "jordan.lee@classbooker.dev",
        "address": {
            "address_line1": "123 Main Street",
            "address_line2": "Apt 302",
            "city": "Boulder",
            "state_or_province": "CO",
            "postal_code": "80301",
            "country": "US",
        },
    }, settings={
        "card_payment": {
            "statement_descriptor": "Whole Body Fitness",
        },
        "ach_payment": {
            "company_name": "WholeBodyFitness",
        },
    }, mode=components.Mode.PRODUCTION)

    # Handle response
    print(res)

Parameters

Parameter Type Required Description Example
account_type components.AccountType ✔️ The type of entity represented by this account. business
profile components.CreateProfile ✔️ N/A
metadata Dict[str, str] Free-form key-value pair list. Useful for storing information that is not captured elsewhere. {
"optional": "metadata"
}
terms_of_service Optional[components.CreateAccountTermsOfService] N/A
foreign_id Optional[str] Optional alias from a foreign/external system which can be used to reference this resource.
customer_support Optional[components.CustomerSupport] User-provided information that can be displayed on credit card transactions for customers to use when
contacting a customer support team. This data is only allowed on a business account.
settings Optional[components.Settings] User provided settings to manage an account.
capabilities List[components.CapabilityID] N/A
mode Optional[components.Mode] The operating mode for an account. production
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

operations.CreateAccountResponse

Errors

Error Type Status Code Content Type
errors.GenericError 400, 409 application/json
errors.CreateAccountResponseBody 422 application/json
errors.APIError 4XX, 5XX */*

list

List or search accounts to which the caller is connected.

All supported query parameters are optional. If none are provided the response will include all connected accounts. Pagination is supported via the skip and count query parameters. Searching by name and email will overlap and return results based on relevance.

To access this endpoint using an access token you'll need to specify the /accounts.read scope.

Example Usage

from moovio_sdk import Moov
from moovio_sdk.models import components


with Moov(
    security=components.Security(
        username="",
        password="",
    ),
) as moov:

    res = moov.accounts.list(type_=components.AccountType.BUSINESS, skip=60, count=20)

    # Handle response
    print(res)

Parameters

Parameter Type Required Description Example
name Optional[str] Filter connected accounts by name.

If provided, this query will attempt to find matches against the following Account and Profile fields:

  • Account displayName

  • Individual Profile firstName, middleName, and lastName

  • Business Profile legalBusinessName

email Optional[str] Filter connected accounts by email address.

Provide the full email address to filter by email.
type Optional[components.AccountType] Filter connected accounts by AccountType.

If the type parameter is used in combination with name, only the corresponding type's name fields will
be searched. For example, if type=business and name=moov, the search will attempt to find matches against
the display name and Business Profile name fields (legalBusinessName, and doingBusinessAs).
business
foreign_id Optional[str] Serves as an optional alias from a foreign/external system which can be used to reference this resource.
include_disconnected Optional[bool] Filter disconnected accounts.

If true, the response will include disconnected accounts.
capability Optional[components.CapabilityID] Filter connected accounts by the capability.
capability_status Optional[components.CapabilityStatus] Filter connected accounts by the capability.
skip Optional[int] N/A 60
count Optional[int] N/A 20
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

operations.ListAccountsResponse

Errors

Error Type Status Code Content Type
errors.APIError 4XX, 5XX */*

get

Retrieves details for the account with the specified ID.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/profile.read scope.

Example Usage

from moovio_sdk import Moov
from moovio_sdk.models import components


with Moov(
    security=components.Security(
        username="",
        password="",
    ),
) as moov:

    res = moov.accounts.get(account_id="b888f774-3e7c-4135-a18c-6b985523c4bc")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
account_id str ✔️ N/A
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

operations.GetAccountResponse

Errors

Error Type Status Code Content Type
errors.APIError 4XX, 5XX */*

update

When can profile data be updated:

  • For unverified accounts, all profile data can be edited.
  • During the verification process, missing or incomplete profile data can be edited.
  • Verified accounts can only add missing profile data.

When can't profile data be updated:

  • Verified accounts cannot change any existing profile data.

If you need to update information in a locked state, please contact Moov support.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/profile.write scope.

Example Usage

from moovio_sdk import Moov
from moovio_sdk.models import components


with Moov(
    security=components.Security(
        username="",
        password="",
    ),
) as moov:

    res = moov.accounts.update(account_id="95fa7f0e-7432-4ce4-a7cb-60cc78135dde", profile=components.PatchProfile(
        individual=components.PatchIndividual(
            name=components.IndividualNameUpdate(
                first_name="Jordan",
                middle_name="Reese",
                last_name="Lee",
                suffix="Jr",
            ),
            phone=components.PhoneNumber(
                number="8185551212",
                country_code="1",
            ),
            email="jordan.lee@classbooker.dev",
            address=components.AddressUpdate(
                address_line1="123 Main Street",
                address_line2="Apt 302",
                city="Boulder",
                state_or_province="CO",
                postal_code="80301",
                country="US",
            ),
            birth_date=components.BirthDateUpdate(
                day=9,
                month=11,
                year=1989,
            ),
        ),
        business=components.PatchBusiness(
            business_type=components.BusinessType.LLC,
            address=components.AddressUpdate(
                address_line1="123 Main Street",
                address_line2="Apt 302",
                city="Boulder",
                state_or_province="CO",
                postal_code="80301",
                country="US",
            ),
            phone=components.PhoneNumber(
                number="8185551212",
                country_code="1",
            ),
            email="jordan.lee@classbooker.dev",
            tax_id=components.TaxIDUpdate(
                ein=components.TaxIDUpdateEin(
                    number="12-3456789",
                ),
            ),
            industry_codes=components.IndustryCodes(
                naics="713940",
                sic="7991",
                mcc="7997",
            ),
        ),
    ), metadata={
        "optional": "metadata",
    }, terms_of_service={
        "accepted_ip": "172.217.2.46",
        "accepted_user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36",
    }, customer_support={
        "phone": {
            "number": "8185551212",
            "country_code": "1",
        },
        "email": "jordan.lee@classbooker.dev",
        "address": {
            "address_line1": "123 Main Street",
            "address_line2": "Apt 302",
            "city": "Boulder",
            "state_or_province": "CO",
            "postal_code": "80301",
            "country": "US",
        },
    })

    # Handle response
    print(res)

Parameters

Parameter Type Required Description Example
account_id str ✔️ N/A
profile Optional[components.PatchProfile] Describes the fields available when patching a profile.
Each object can be patched independent of patching the other fields.
metadata Dict[str, str] N/A {
"optional": "metadata"
}
terms_of_service Optional[components.PatchAccountTermsOfService] N/A
foreign_id Optional[str] N/A
customer_support OptionalNullable[components.PatchAccountCustomerSupport] N/A
settings Optional[components.CreateAccountSettings] N/A
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

operations.UpdateAccountResponse

Errors

Error Type Status Code Content Type
errors.GenericError 400, 409 application/json
errors.UpdateAccountResponseBody 422 application/json
errors.APIError 4XX, 5XX */*

disconnect

This will sever the connection between you and the account specified and it will no longer be listed as active in the list of accounts. This also means you'll only have read-only access to the account going forward for reporting purposes.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/profile.disconnect scope.

Example Usage

from moovio_sdk import Moov
from moovio_sdk.models import components


with Moov(
    security=components.Security(
        username="",
        password="",
    ),
) as moov:

    res = moov.accounts.disconnect(account_id="ac3cbe09-fcd4-4c5e-ada2-89eaaa9c149e")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
account_id str ✔️ N/A
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

operations.DisconnectAccountResponse

Errors

Error Type Status Code Content Type
errors.GenericError 400, 409 application/json
errors.APIError 4XX, 5XX */*

get_countries

Retrieve the specified countries of operation for an account.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/profile.read scope.

Example Usage

from moovio_sdk import Moov
from moovio_sdk.models import components


with Moov(
    security=components.Security(
        username="",
        password="",
    ),
) as moov:

    res = moov.accounts.get_countries(account_id="b49c57bf-7b36-4308-8206-c1f5ce8067ac")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
account_id str ✔️ N/A
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

operations.GetAccountCountriesResponse

Errors

Error Type Status Code Content Type
errors.APIError 4XX, 5XX */*

assign_countries

Assign the countries of operation for an account.

This endpoint will always overwrite the previously assigned values.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/profile.write scope.

Example Usage

from moovio_sdk import Moov
from moovio_sdk.models import components


with Moov(
    security=components.Security(
        username="",
        password="",
    ),
) as moov:

    res = moov.accounts.assign_countries(account_id="aa2dc19b-77dd-481f-a0a8-c76f2cfc1372", countries=[
        "United States",
    ])

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
account_id str ✔️ N/A
countries List[str] ✔️ N/A
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

operations.AssignAccountCountriesResponse

Errors

Error Type Status Code Content Type
errors.GenericError 400, 409 application/json
errors.AssignCountriesError 422 application/json
errors.APIError 4XX, 5XX */*

get_merchant_processing_agreement

Retrieve a merchant account's processing agreement.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/profile.read scope.

Example Usage

from moovio_sdk import Moov
from moovio_sdk.models import components


with Moov(
    security=components.Security(
        username="",
        password="",
    ),
) as moov:

    res = moov.accounts.get_merchant_processing_agreement(account_id="d2cfd0d3-6efb-4bc4-a193-53f35dd0d912")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
account_id str ✔️ N/A
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

operations.GetMerchantProcessingAgreementResponse

Errors

Error Type Status Code Content Type
errors.APIError 4XX, 5XX */*

get_terms_of_service_token

Generates a non-expiring token that can then be used to accept Moov's terms of service.

This token can only be generated via API. Any Moov account requesting the collect funds, send funds, wallet, or card issuing capabilities must accept Moov's terms of service, then have the generated terms of service token patched to the account. Read more in our documentation.

Example Usage

from moovio_sdk import Moov
from moovio_sdk.models import components


with Moov(
    security=components.Security(
        username="",
        password="",
    ),
) as moov:

    res = moov.accounts.get_terms_of_service_token()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
origin Optional[str] Indicates the domain from which the request originated. Required if referer header is not present.
referer Optional[str] Specifies the URL of the resource from which the request originated. Required if origin header is not present.
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

operations.GetTermsOfServiceTokenResponse

Errors

Error Type Status Code Content Type
errors.APIError 4XX, 5XX */*