Installation
Requires Python 3.10+pip install dime-python-sdk
Quickstart
from dime_payments import Client
dime = Client('your-api-token')
txn = dime.transactions.charge_card('YOUR_SID', {
'amount': '49.99',
'token': 'tok_abc123',
})
print(txn.transaction_status) # "Success"
Configuration
from dime_payments import Client, Config
# Simple setup
dime = Client('your-api-token')
# Full control
dime = Client(Config(
token='your-api-token',
base_url='https://app.dimepayments.com',
timeout=30.0,
max_retries=2,
))
Available Resources
| Property | Endpoints |
|---|---|
dime.transactions | charge_card, charge_ach, tokenize_card, refund, void, show, list |
dime.customers | list, show, create, update, delete |
dime.payment_methods | list, show, create, update, delete |
dime.merchants | list, show, create, update, get_form_link |
dime.addresses | list, show, create, update, delete |
dime.deposits | list, list_with_transactions, show |
dime.recurring_payments | list, show, create, edit, pause, cancel, activate, delete |
Pagination
# Stream all transactions across every page
for txn in dime.transactions.list('YOUR_SID', {
'start_date': '2026-01-01 00:00:00',
'end_date': '2026-01-31 23:59:59',
}).auto_paging():
print(txn.amount)
Error Handling
from dime_payments import DimeException, ValidationException
try:
dime.transactions.charge_card('YOUR_SID', {'amount': '0'})
except ValidationException as e:
print(e.get_errors()) # {'data.amount': ['must be greater than 0']}
except DimeException as e:
print(e.get_status_code())

