# CapitalPayments
This Api has been made Crypto Payments based on USDT.TRC20
All examples are available into examples/ folder.
# Install with pip
> pip install capitalpayments
1. Create an account [Create account](capitalpayments.me/apps/signup "Create account")
2. Create api key [here](https://www.capitalpayments.co/apps/api/ "here")
3. Follow next steps to connect your account
(NOTE: Sandbox mode needs test coins request [here](https://www.capitalpayments.co/apps/api/ "here"))
# Login
```
from sdk import SDK
sdk = SDK('api_key','api_secret')
response = sdk.login()
```
# Get environment
```
from sdk import SDK
sdk = SDK('api_key','api_secret')
# get the environment : response >= int $sandobox (0 or 1)
response = sdk.getEnvironment()
```
# Get account
```
from sdk import SDK
sdk = SDK('api_key','api_secret')
# get the account data
response = sdk.getAccount()
```
# Get balance
```
from sdk import SDK
sdk = SDK('api_key','api_secret')
# get the balance from the api
response = sdk.getBalance()
```
# Get main wallet
```
from sdk import SDK
sdk = SDK('api_key','api_secret')
# get main wallet data (private key is included)
response = sdk.getMainWallet()
```
# Get wallets
```
from sdk import SDK
sdk = SDK('api_key','api_secret')
# retrieves all wallets attached to api
response = sdk.getWallets()
```
# Create invoice
```
from sdk import SDK
sdk = SDK('api_key','api_secret')
# retrieves invoice data
response = sdk.createInvoice({
'invoice_id' : 'invoice_id' # string
'amount' : 'amount' # float|int
'whatsApp' : 'whatsApp' # (optional) int whatsapp full number
'name' : 'customer_name' # (optional) string customer's name
})
```
# Create invoices
```
from sdk import SDK
sdk = SDK('api_key','api_secret')
# retrieves invoices data
response = sdk.createInvoices([
{
'invoice_id' : 'invoice_id' # string
'amount' : 'amount' # float|int
'whatsApp' : 'whatsApp' # (optional) int whatsapp full number
'name' : 'customer_name' # (optional) string customer's name
},
{
'invoice_id' : 'invoice_id' # string
'amount' : 'amount' # float|int
'whatsApp' : 'whatsApp' # (optional) int whatsapp full number
'name' : 'customer_name' # (optional) string customer's name
}
])
```
# Get invoice status
```
from sdk import SDK
sdk = SDK('api_key','api_secret')
# get the invoice status
response = sdk.getInvoiceStatus({
'invoice_id' : 'invoice_id' # string
})
```
# Cancel invoice
```
from sdk import SDK
sdk = SDK('api_key','api_secret')
# get the invoice status
response = sdk.cancelInvoice({
'invoice_id' : 'invoice_id' # string
})
```
# Create payout
```
from sdk import SDK
sdk = SDK('api_key','api_secret')
# retrieve the payout data
response = sdk.createPayout({
'payout_id' : 'payout_id' # string
'amount' : 'amount' # float|int
'address' : 'USDT.TRC20WalletAddress' # string
})
```
# Create payouts
```
from sdk import SDK
sdk = SDK('api_key','api_secret')
# retrieves payouts data
response = sdk.createPayouts([
{
'payout_id' : 'payout_id' # string
'amount' : 'amount' # float|int
'address' : 'USDT.TRC20WalletAddress' # string
},
{
'payout_id' : 'payout_id' # string
'amount' : 'amount' # float|int
'address' : 'USDT.TRC20WalletAddress' # string
},
])
```
# Get payout status
```
from sdk import SDK
sdk = SDK('api_key','api_secret')
# get the payout status
response = sdk.getPayoutStatus({
'payout_id' : 'payout_id' # string
})
```
# Cancel payout
```
from sdk import SDK
sdk = SDK('api_key','api_secret')
# cancel payout
response = sdk.cancelPayout({
'payout_id' : 'PayoutId', # @string
})
```
# create item
```
from sdk import SDK
sdk = SDK('api_key','api_secret')
# cancel payout
response = sdk.createItem({
'title' : 'title', # @string
'description' : 'description', # @string
'price' : 10 # @int|float
})
```
# delete item
```
from sdk import SDK
sdk = SDK('api_key','api_secret')
# delete item
response = sdk.deleteItem({
'item_id' : 'item_id', # @string
})
```
# get items
```
from sdk import SDK
sdk = SDK('api_key','api_secret')
# get array items
response = sdk.getItems()
```
# get item
```
from sdk import SDK
sdk = SDK('api_key','api_secret')
# get item
response = sdk.getItem({
'item_id' : 'item_id', # @string
})
```
# create customer
```
from sdk import SDK
sdk = SDK('api_key','api_secret')
# create customer
response = sdk.createCustomer({
'name' : 'title', # @string
'email' : 'description', # @string
'whatsapp' : 'full_whatsapp', # @string
'address' : 'USDT.TRC20WalletAddress', # @string
})
```
# delete customer
```
from sdk import SDK
sdk = SDK('api_key','api_secret')
# delete customer
response = sdk.deleteCustomer({
'customer_id' : 'customer_id', # @string
})
```
# get customers
```
from sdk import SDK
sdk = SDK('api_key','api_secret')
# get array customers
response = sdk.getCustomers()
```
# get customer
```
from sdk import SDK
sdk = SDK('api_key','api_secret')
# get customer by id
response = sdk.getCustomer({
'customer_id' : 'customer_id', # @string
})
```
# set test invoice as payed
```
from sdk import SDK
sdk = SDK('api_key','api_secret')
# requires invoice_id
response = sdk.setTestInvoiceAsPayed({
'invoice_id' : 'invoice_id'
})
```
```
# set deposit wallet
```
from sdk import SDK
sdk = SDK('api_key','api_secret')
# requires tron wallet address
response = sdk.setDepositWallet({
'address' : 'TTCkwzmTZHjN4VSVRVz7s1h5btjWGfvnF9'
})
```
Raw data
{
"_id": null,
"home_page": "",
"name": "capitalpayments",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "python,capitalpayments,paymentprocessor,usdt.trc20",
"author": "Javier (leqjl93)",
"author_email": "<javier.fernandez.pa93@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/d1/32/ce6ce9208e03f2665eff6a40e57428a50f3f4eb41fc7b25b59a40db0ecd8/capitalpayments-0.1.4.tar.gz",
"platform": null,
"description": "\n# CapitalPayments\nThis Api has been made Crypto Payments based on USDT.TRC20\nAll examples are available into examples/ folder.\n\n#\u00a0Install with pip\n> pip install capitalpayments\n\n1. Create an account [Create account](capitalpayments.me/apps/signup \"Create account\")\n2. Create api key [here](https://www.capitalpayments.co/apps/api/ \"here\")\n3. Follow next steps to connect your account\n\n(NOTE: Sandbox mode needs test coins request [here](https://www.capitalpayments.co/apps/api/ \"here\"))\n\n# Login \n\n```\n\nfrom sdk import SDK\n\nsdk = SDK('api_key','api_secret')\n\nresponse = sdk.login()\n\n```\n\n# Get environment \n\n```\n\nfrom sdk import SDK\n\nsdk = SDK('api_key','api_secret')\n\n# get the environment : response >= int $sandobox (0 or 1)\nresponse = sdk.getEnvironment()\n\n```\n\n# Get account\n\n```\n\nfrom sdk import SDK\n\nsdk = SDK('api_key','api_secret')\n\n# get the account data\nresponse = sdk.getAccount()\n\n```\n\n# Get balance\n\n```\n\nfrom sdk import SDK\n\nsdk = SDK('api_key','api_secret')\n\n# get the balance from the api\nresponse = sdk.getBalance()\n\n```\n\n# Get main wallet\n\n```\n\nfrom sdk import SDK\n\nsdk = SDK('api_key','api_secret')\n\n# get main wallet data (private key is included)\nresponse = sdk.getMainWallet()\n\n```\n\n# Get wallets\n\n```\n\nfrom sdk import SDK\n\nsdk = SDK('api_key','api_secret')\n\n# retrieves all wallets attached to api \nresponse = sdk.getWallets()\n\n```\n# Create invoice\n\n```\n\nfrom sdk import SDK\n\nsdk = SDK('api_key','api_secret')\n\n# retrieves invoice data\nresponse = sdk.createInvoice({\n 'invoice_id' : 'invoice_id' # string \n 'amount' : 'amount' # float|int \n 'whatsApp' : 'whatsApp' # (optional) int whatsapp full number\n 'name' : 'customer_name' # (optional) string customer's name\n})\n\n```\n# Create invoices\n\n```\n\nfrom sdk import SDK\n\nsdk = SDK('api_key','api_secret')\n\n# retrieves invoices data\nresponse = sdk.createInvoices([\n {\n 'invoice_id' : 'invoice_id' # string \n 'amount' : 'amount' # float|int \n 'whatsApp' : 'whatsApp' # (optional) int whatsapp full number\n 'name' : 'customer_name' # (optional) string customer's name\n },\n {\n 'invoice_id' : 'invoice_id' # string \n 'amount' : 'amount' # float|int \n 'whatsApp' : 'whatsApp' # (optional) int whatsapp full number\n 'name' : 'customer_name' # (optional) string customer's name\n }\n])\n\n```\n# Get invoice status\n\n```\n\nfrom sdk import SDK\n\nsdk = SDK('api_key','api_secret')\n\n# get the invoice status\nresponse = sdk.getInvoiceStatus({\n 'invoice_id' : 'invoice_id' # string \n})\n\n```\n\n# Cancel invoice\n\n```\n\nfrom sdk import SDK\n\nsdk = SDK('api_key','api_secret')\n\n# get the invoice status\nresponse = sdk.cancelInvoice({\n 'invoice_id' : 'invoice_id' # string \n})\n\n```\n\n# Create payout\n\n```\n\nfrom sdk import SDK\n\nsdk = SDK('api_key','api_secret')\n\n# retrieve the payout data\nresponse = sdk.createPayout({\n 'payout_id' : 'payout_id' # string \n 'amount' : 'amount' # float|int \n 'address' : 'USDT.TRC20WalletAddress' # string\n})\n\n```\n\n# Create payouts\n\n```\n\nfrom sdk import SDK\n\nsdk = SDK('api_key','api_secret')\n\n# retrieves payouts data\nresponse = sdk.createPayouts([\n {\n 'payout_id' : 'payout_id' # string \n 'amount' : 'amount' # float|int \n 'address' : 'USDT.TRC20WalletAddress' # string\n },\n {\n 'payout_id' : 'payout_id' # string \n 'amount' : 'amount' # float|int \n 'address' : 'USDT.TRC20WalletAddress' # string\n },\n])\n\n```\n\n# Get payout status\n\n```\n\nfrom sdk import SDK\n\nsdk = SDK('api_key','api_secret')\n\n# get the payout status\nresponse = sdk.getPayoutStatus({\n 'payout_id' : 'payout_id' # string \n})\n\n```\n\n# Cancel payout \n\n```\n\nfrom sdk import SDK\n\nsdk = SDK('api_key','api_secret')\n\n# cancel payout \nresponse = sdk.cancelPayout({\n 'payout_id' : 'PayoutId', # @string\n})\n\n```\n\n# create item\n\n```\n\nfrom sdk import SDK\n\nsdk = SDK('api_key','api_secret')\n\n# cancel payout \nresponse = sdk.createItem({\n 'title' : 'title', # @string\n 'description' : 'description', # @string\n 'price' : 10 # @int|float\n})\n```\n\n# delete item\n\n```\n\nfrom sdk import SDK\n\nsdk = SDK('api_key','api_secret')\n\n# delete item\nresponse = sdk.deleteItem({\n 'item_id' : 'item_id', # @string\n})\n```\n\n# get items\n\n```\n\nfrom sdk import SDK\n\nsdk = SDK('api_key','api_secret')\n\n# get array items\nresponse = sdk.getItems()\n```\n\n# get item\n\n```\n\nfrom sdk import SDK\n\nsdk = SDK('api_key','api_secret')\n\n# get item\nresponse = sdk.getItem({\n 'item_id' : 'item_id', # @string\n})\n```\n\n# create customer\n\n```\n\nfrom sdk import SDK\n\nsdk = SDK('api_key','api_secret')\n\n# create customer\nresponse = sdk.createCustomer({\n 'name' : 'title', # @string\n 'email' : 'description', # @string\n 'whatsapp' : 'full_whatsapp', # @string\n 'address' : 'USDT.TRC20WalletAddress', # @string\n})\n```\n\n# delete customer\n\n```\n\nfrom sdk import SDK\n\nsdk = SDK('api_key','api_secret')\n\n# delete customer\nresponse = sdk.deleteCustomer({\n 'customer_id' : 'customer_id', # @string\n})\n```\n\n# get customers\n\n```\n\nfrom sdk import SDK\n\nsdk = SDK('api_key','api_secret')\n\n# get array customers\nresponse = sdk.getCustomers()\n```\n\n# get customer\n\n```\n\nfrom sdk import SDK\n\nsdk = SDK('api_key','api_secret')\n\n# get customer by id\nresponse = sdk.getCustomer({\n 'customer_id' : 'customer_id', # @string\n})\n```\n\n# set test invoice as payed\n\n```\n\nfrom sdk import SDK\n\nsdk = SDK('api_key','api_secret')\n\n# requires invoice_id\nresponse = sdk.setTestInvoiceAsPayed({\n 'invoice_id' : 'invoice_id'\n})\n\n```\n```\n\n# set deposit wallet\n\n```\n\nfrom sdk import SDK\n\nsdk = SDK('api_key','api_secret')\n\n# requires tron wallet address \nresponse = sdk.setDepositWallet({\n 'address' : 'TTCkwzmTZHjN4VSVRVz7s1h5btjWGfvnF9'\n})\n\n```\n",
"bugtrack_url": null,
"license": "",
"summary": "For Api Capital Payments",
"version": "0.1.4",
"project_urls": null,
"split_keywords": [
"python",
"capitalpayments",
"paymentprocessor",
"usdt.trc20"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "ad67593fefc9d5936be2248a588e9254c2bf20b3ba781fbe726649c19a9184bb",
"md5": "e36a9ba5bb45fecca754a6538665e993",
"sha256": "9ba2b6c8ef9e5831fab59449b10c54bafdb448611a38d19f8d8dc8880692dc72"
},
"downloads": -1,
"filename": "capitalpayments-0.1.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e36a9ba5bb45fecca754a6538665e993",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 5431,
"upload_time": "2023-06-30T19:22:04",
"upload_time_iso_8601": "2023-06-30T19:22:04.517514Z",
"url": "https://files.pythonhosted.org/packages/ad/67/593fefc9d5936be2248a588e9254c2bf20b3ba781fbe726649c19a9184bb/capitalpayments-0.1.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d132ce6ce9208e03f2665eff6a40e57428a50f3f4eb41fc7b25b59a40db0ecd8",
"md5": "b5222ae7553b1f8e5724a9c6103f42d4",
"sha256": "ce2cbc172aea17bad89b9a34d98a1205eb8b4633ba097ef06fe052fa9b470ed1"
},
"downloads": -1,
"filename": "capitalpayments-0.1.4.tar.gz",
"has_sig": false,
"md5_digest": "b5222ae7553b1f8e5724a9c6103f42d4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 5136,
"upload_time": "2023-06-30T19:22:05",
"upload_time_iso_8601": "2023-06-30T19:22:05.939583Z",
"url": "https://files.pythonhosted.org/packages/d1/32/ce6ce9208e03f2665eff6a40e57428a50f3f4eb41fc7b25b59a40db0ecd8/capitalpayments-0.1.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-06-30 19:22:05",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "capitalpayments"
}