Learn more about organizations, organization users, and the Tesouro account
structure.
Create an organization representing your customer
To create a new organization, callPOST /entities. The organization can be either an organization or an individual:
- Organization
- Individual
- For
organization-type organizations:business_structure- Required for organizations that accept payments. Possible values by region:- US organizations:
multi_member_llc,private_corporation,private_partnership,public_corporation,public_partnership,single_member_llc,sole_proprietorship,unincorporated_association
- US organizations:
- For
individual-type organizations:ssn_last_4- Required for US individuals to accept payments. The last four digits of the person’s Social Security Number (SSN).
- An organization’s country (
address.country) cannot be changed after the organization has been created. - After an organization is created, you must also add its bank accounts.
- An organization can optionally add their tax ID - this will then be displayed on invoices created by that organization.
Upload organization logo
You can provide the organization logo for use in the PDF documents generated by the organization (such as Accounts Receivable invoices and credit notes). The logo will also appear on the payment page if the organization uses Tesouro payment rails. The logo image can be PNG or JPG up to 10 MB in size. To upload the logo for an organization, call PUT /entities/logo with amultipart/form-data body containing the image in the file field:
logo response field when you retrieve organization information with GET /entities/{entity_id} or similar requests.
You can update the logo at any time later by uploading a new logo. You can also delete the logo by calling DELETE /entities//logo.
List all organizations
To get information about all the organizations managed by the partner, callGET /entities. This endpoint supports the standard pagination, sorting, and filtering parameters.
Get a single organization
To get information about a specific organization, callGET /entities/{entity_id}:
Requests authenticated with an organization user token can
access only that user’s organization. The user must have a role with the
entity.read permission.Update organization information
To update the details of an existing organization, callPATCH /entities/{entity_id}:
address.country. The country of existing organizations cannot be changed for regulatory reasons. The only way to change an organization’s country is to create a new organization.
Requests authenticated with an organization user token can
update only that user’s organization. The user must have a role with the
entity.update
permission.Deactivate and reactivate organizations
Organizations have astatus field that can be active or inactive. Partners can deactivate organizations to control access. New organizations are created as active by default.
- To deactivate an organization, call
POST /entities/{entity_id}/deactivate. - To reactivate an organization, call
POST /entities/{entity_id}/activate.
Only app tokens can activate/deactivate organizations.
Access the current user’s organization
If you use organization user tokens to authenticate Tesouro API requests, the following endpoints let you access the current user’s organization without providing its ID:GET /entity-users/my-organization- get organization information.PATCH /entity-users/my-organization- update organization information.
entity.read and entity.update permissions, respectively.