Withdraw
Create a withdraw request using the _id value you received from the Available Banks service.
The withdraw model
- Name
hash- Type
- string
- Description
Signature created by us for callback verification
- Name
transactionId- Type
- string
- Description
The unique ID number we give you when creating a transaction
- Name
bankId- Type
- string
- Description
Relevant bank id value
- Name
bank- Type
- string
- Description
Name of the relevant bank
- Name
amount- Type
- number
- Description
The
amountvalue you sent when creating the withdraw transaction
- Name
type- Type
- string
- Description
Transaction type (
withdrawal)
- Name
accountName- Type
- string
- Description
The
accountNamevalue you sent when creating the withdraw transaction
- Name
iban- Type
- string
- Description
The
ibanvalue you sent when creating the withdraw transaction
- Name
status- Type
- string
- Description
Transaction status (
pending)
- Name
name- Type
- string
- Description
The
namevalue you sent when creating the withdraw transaction
- Name
userName- Type
- string
- Description
The
userNamevalue you sent when creating the withdraw transaction
- Name
userId- Type
- string
- Description
The
userIdvalue you sent when creating the withdraw transaction
- Name
processId- Type
- string
- Description
The
processIdvalue you sent when creating the withdraw transaction
- Name
convertedName- Type
- string
- Description
A 'slugified' version of the
namevalue you sent when creating the withdraw transaction
Create a withdraw
This endpoint allows you to request a new withdraw
Required attributes
- Name
bankId- Type
- string
- Description
The
_idvalue you receive from the Available Banks service
- Name
processId- Type
- string
- Description
An ID value that will be unique to you for each transaction
- Name
amount- Type
- number
- Description
Withdraw amount
- Name
userId- Type
- string
- Description
Your user's ID in your system
- Name
userName- Type
- string
- Description
Your user's username
- Name
name- Type
- string
- Description
Your user's first and last name
- Name
accountName- Type
- string
- Description
Account name to send money to
- Name
iban- Type
- string
- Description
Account number to send money to
Request
curl --location --request POST 'https://<service-name>.api.payox.co/v1/transactions/withdraw' \
--header 'appKey={appKey}' \
--header 'sign:{signature}' \
--data-urlencode 'bankId=5fb103ee40c69600183ec990' \
--data-urlencode 'amount=100' \
--data-urlencode 'userId=123456789' \
--data-urlencode 'name=Test User' \
--data-urlencode 'userName=testUserName' \
--data-urlencode 'accountName=Test User' \
--data-urlencode 'iban=TR280006276256222621885935' \
--data-urlencode 'processId=1122334455'
Response
{
"data": {
"transactionId": "613a0dbd63f54d00182f6414",
"bankId": "5fe25f6e3e73770018d47b15",
"amount": 100,
"userId": "123456789",
"name": "Test User",
"userName": "testUserName",
"processId": "1122334455",
"type": "withdrawal",
"convertedName": "testuser",
"status": "pending",
"bank": "Fake Bank",
"accountName": "Test User",
"iban": "TR280006276256222621885935",
"hash": "ENWnqnoIYk5OG2yKtYQnXqByrSB9X65ehS6oKVU/d0E="
},
"status": 200,
"responseTime": "30ms",
"app_version": "payox-v1.7.3"
}