Accounts
The Accounts module allows you to structure your payment stack based on how your business works. An Account is an entity that you can use to group some payment providers together. Each Account has its own API key pair.
You can use a single Account for your business or create multiple Accounts for different sides of your business, such as geographic locations, platforms, products, or sub-merchants.
If you have a global business with customers in multiple countries, you might want to create separate accounts for each country, with payment providers that support the local currency and payment methods. Or, if you have a platform that connects buyers and sellers, you might want to create separate accounts for each seller, with payment providers that support their preferred payment methods.
Create Accounts on the Dashboard
To create and edit Accounts:
- Go to the Organization > Accounts tab in your Dashboard’s menu.
- Click the [+] button
- Choose your account's name.
Once an Account is created, you can view account name, date created, and the Access Token of this account.
Access Tokens are used to allow an authorized sub-merchant view of dashboard functionality. Please refer to Accounts API for more details.
Using Multiple Accounts in a Single Provider Connection:
MoneyHash also allows you to use multiple accounts within a single provider connection. This means that you can connect multiple accounts to the same payment provider, and use them for different purposes or business units. For example, you might connect multiple accounts to the same PayPal provider, with one account for each seller on your platform.
Supported Currencies in an Account:
MoneyHash provides an easy way to connect payment providers and accept payments in multiple currencies. When you connect an account to a provider, that provider can support multiple currencies through its payment methods. This means that that account can accept payments for multiple currencies, giving you the freedom to choose the currency you prefer.
If you want to know which providers are connected to each account, you can do so through the dashboard under providers, connected provider, and then choose the account in the filter.
Here are some of the changes you can make to your account:
- Account Name: Modify the name of your account
- Company Details: Update the details that show on invoices, payment links, and different pages. This includes the company name, address, phone number, and email address
- Tax Number: Specify a tax number for your account (optional)
- Taxes: Set the tax percentage for your account (applies only to new invoices)
- Email Settings: Enable transaction receipt emails and customize the reply-to email address and name used in receipt emails.
Creating Accounts using API
POST /api/v1.1/accounts/
Parameters
Name | Required | Description |
---|---|---|
Content-Type | Yes | application/json |
X-Api-Key | Yes | The secret organization API key in your MoneyHash dashboard |
name | Yes | The name of the account |
Code samples
curl -XPOST -H 'X-Api-Key: SZq9HSjZ.vqYJYA1ggvOknCYhHKauGxrENJwo6Onp' -H "Content-type: application/json" -d '{
"name": "Merchant Account X",
}' 'https://web.moneyhash.io/api/v1.1/accounts/'
import requests
url = "https://moneyhash.io/api/v1/accounts/"
payload = "{\"name\": \"Mustafa\"}"
headers = {
'X-Api-Key': 'Brd7FTmS.wMYHOZPgri8DyBjHbctmxQCpMoZ1rIW5',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data = payload)
print(response.text.encode('utf8'))
Get account details
This endpoint shows you all the details related to a specific account
GET /api/v1.1/accounts/{ACCOUNT_ID}/
Parameters
Name | Required | Description |
---|---|---|
Content-Type | Yes | application/json |
X-Api-Key | Yes | The secret organization API key in your MoneyHash dashboard |
Payload
curl -XGET -H 'X-Api-Key: SZq9HSjZ.vqYJYA1ggvOknCYhHKauGxrENJwo6Onp' -H "Content-type: application/json" 'https://web.moneyhash.io/api/v1.1/accounts/{ACCOUNT_ID}/'
List accounts
This endpoint lists all the accounts in your organization.
GET /api/v1.1/accounts/
Parameters
Name | Required | Description |
---|---|---|
Content-Type | Yes | application/json |
X-Api-Key | Yes | The secret organization API key in your MoneyHash dashboard |
Payload
curl -XGET -H 'X-Api-Key: SZq9HSjZ.vqYJYA1ggvOknCYhHKauGxrENJwo6Onp' -H "Content-type: application/json" 'https://web.moneyhash.io/api/v1.1/accounts/'
List Account Payment Methods
This endpoint retrieves a list of available payment methods associated with a specific account based on the currency.
Endpoint
GET /api/v1/accounts/payment_methods/
Parameters
Name | Required | Description |
---|---|---|
Content-Type | Yes | application/json |
X-Api-Key | Yes | The secret organization API key in your MoneyHash dashboard |
currency | Yes | The currency for which payment methods are listed. |
amount | No | The amount associated with the transaction. |
customer | No | The unique identifier of the customer. |
flow_id | No | The identifier for the flow of the transaction. |
operation | No | The type of operation being performed. |
default_evaluation_for_needed_fields | No | A boolean flag indicating whether to evaluate default values from the dynamic checkout triggers. |
Payload
curl --location --request GET '/api/v1/accounts/payment_methods/' \
--header 'X-Api-Key;' \
--header 'Content-Type: application/json' \
--data '{
"currency": "usd",
"amount": "10",
"customer": "9ec2386b-11d0-4e24-932e-a9afd4ea353a"
}'
Updated about 1 year ago