Execute partial or full refunds against existing deposits.
Note: You must grab a successful
deposit_id from the Deposit
Playground to test this effectively.
import asyncio
from pawapay_sdk import ApiClient
# 1. Initialize Client
config = {
'api_token': , # Use Your Own Sandbox Account Token
'environment': 'sandbox',
'api_version': # toggle v1/v2
}
client = ApiClient(config)
# 2. Define Refund Targets
deposit_id = # successful deposit id
amount = # refund amount - partial or full amount
currency = # see `SDK Config` below
# 3. Execute Refund (async)
response = await client.initiate_refund(
deposit_id=deposit_id,
amount=amount,
currency=currency
)
print(f"Refund Status: {response.status}")
$ Awaiting execution...