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 amount value you sent when creating the withdraw transaction

  • Name
    type
    Type
    string
    Description

    Transaction type ( withdrawal )

  • Name
    accountName
    Type
    string
    Description

    The accountName value you sent when creating the withdraw transaction

  • Name
    iban
    Type
    string
    Description

    The iban value you sent when creating the withdraw transaction

  • Name
    status
    Type
    string
    Description

    Transaction status ( pending )

  • Name
    name
    Type
    string
    Description

    The name value you sent when creating the withdraw transaction

  • Name
    userName
    Type
    string
    Description

    The userName value you sent when creating the withdraw transaction

  • Name
    userId
    Type
    string
    Description

    The userId value you sent when creating the withdraw transaction

  • Name
    processId
    Type
    string
    Description

    The processId value you sent when creating the withdraw transaction

  • Name
    convertedName
    Type
    string
    Description

    A 'slugified' version of the name value you sent when creating the withdraw transaction


POST/v1/transactions/withdraw

Create a withdraw

This endpoint allows you to request a new withdraw

Required attributes

  • Name
    bankId
    Type
    string
    Description

    The _id value 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

POST
/v1/transactions/withdraw
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"
}

Was this page helpful?