Deposit

POST

api/v2/deposit



API Error Code

Status code Description
20000 Current project is no found an currency
20001 No found valid PG Saving account
20002 The processing fee is over than amount
20003 Invalid Deposit form
20004 Deposit res is expired
20005 Repeat submit payment page
20006 Image is not valid (size / mime type / s3 server problem) (pls contact customer service)


Parameters that need to be pass for the request.

Parameters Type Required Description
redirect_url string no Redirect URL
callback_url string no Callback URL
client_transaction string yes Client transaction ID
project_id string yes Project ID
token string yes Token details view Encryption & Decryption
amount decimal yes Deposit amount
currency_code string yes Project's currency code
payment_method string no Custom deposit payment method (bank_transfer / qr_pay / wire_transfer)
site_url string no Current site URL
client_first_name string no Client's first name
client_last_name string no Client's last name
client_ip_address string yes User's IP address


Parameters

  • redirect_url: https://www.example.com/ (string, optional) - Redirect URL
  • callback_url: https://www.example.com/ (string, optional) - Callback URL
  • client_transaction: 1 (string, required) - Generated client transaction ID
  • project_id: 9 (string, required) - Project ID
  • token: 9BC97D2BCC7990F84F05202205E53D14 (string, required) - Token
  • amount: 10000 (decimal, required) - Amount
  • currency_code: VND (string, required) - Project's currency code
  • payment_method: null (string, optional) - (bank_transfer / qr_pay / wire_transfer)
  • site_url: https://www.example.com/ (string, optional) - Current site URL
  • client_first_name: Alan (string, optional) - Client's first name
  • client_last_name: Teo (string, optional) - Client's last name
  • client_ip_address: 192.168.1.12 (string, required) - User's IP address


Response 200 (application/json)

  
            {
                "status": 0,
                "ret_msg": "Success",
                "data": {
                    "call_back_url": "https://paystation.me/#/topup/?signature=....",
                    "transaction_id": "XXXXXX",
                    "client_transaction_id": "XXXXXX",
                    "token": "259680784193BA14739EBABE0B683AEE",
                }
            }
                                

Callback for deposit


    {
        "return_type" => "status-response",
        "type" => "deposit",
        "transaction_id" => "DP2021000001",
        "amount" => '1000',
        'payment_method' => 'Bank Transfer',
        "client_transaction" => "testing",
        "currency" => 'VND',
        "return_status" => 'approve',
        "remark" => 'success',
        "created_at" => '2021-05-05 21:21:21',
        "token": "259680784193BA14739EBABE0B683AEE",
    }
                                

Transaction is approved:

return_status : "approve"

Transaction is rejected:

return_status : "reject"

Transaction is expired:

return_status : "expire"

Transaction is cancel:

return_status : "cancel"

Payment Method:

payment_method : "Bank Transfer / QR Pay"

Requirement response by merchant:


        {
            "status" : "successful"
        } 
                                

If didn't get this message, then it will failed, VNPAY only send 3 time for a single callback.