Praxis Wiki logo

Agent API


{manage-withdrawal-request} API function is a tool to perform the basic operations upon the withdrawal requests, including the ability to send the remaining part of the request to customer's account, or to cancel the request.

Two possible scenarios:

  1. The same withdrawal_request_id is managed, meaning one and the same id is used for withdrawal request and for its completion or cancellation.
  2. There is a withdrawal_request_id and a separate trace_id is created (similar to split flow). As a result, withdrawal request will have the status: split and related trace_id to it. Please note: for this case, it is needed to enable the corresponding option for the application in our Admin panel.

{danger.fa-exclamation} IMPORTANT #1: If your payment method is Credit Card and a default gateway is configured, the 'gateway' field is optional.

Endpoints

Name URL
Sandbox https://pci-gw-test.praxispay.com/agent/manage-withdrawal-request
Live https://gw.praxisgate.com/agent/manage-withdrawal-request

Request Parameters

✓ - required value
? - optional, value or null
✕ - always appears as null

Variable Type complete cancel Description
merchant_id varchar(50) Merchant API client account identifier
application_key varchar(32) Identifier of your application (website)
intent varchar(32) Action intended to be executed:
- complete-withdrawal-request to process the remaining part of the withdrawal request amount, in case if the withdrawal request is not fully processed and not cancelled
- cancel-withdrawal-request to cancel the withdrawal request in case if it's processing (including partial) has never been started
withdrawal_request_id int(11) withdrawal request identifier
gateway varchar(32) Gateway to process the transaction
version varchar(3) API version
timestamp int(11) Request time (unix timestamp, seconds)

Response Parameters

Variable Type Description
status int API communication status - for transaction processing status please refer to transaction.transaction.status
- 0 if the request was successful
- Negative integer if internal server/network error occurs
- Positive integer if application/logical error occurs
description varchar(256) Accurate description of the result. Return the actual error for any exception as it helps to diagnose issues in production
transaction <Object> ? Transaction object. Appears in all cases except the authentication/validation error, or application malfunction
version varchar(3) API version
timestamp int(11) Response time (unix timestamp, seconds)

Signature

The full signature generation algorithm can be found in the Authentication section.

Request signature parameters

  1. merchant_id
  2. application_key
  3. timestamp
  4. intent
  5. withdrawal_request_id

Response signature parameters

  1. status
  2. timestamp
  3. transaction.tid
  4. transaction.transaction_status
  5. transaction.processed_currency
  6. transaction.processed_amount

Example

Request

{
    "merchant_id": "Test-Integration-Merchant",
    "application_key": "Sandbox",
    "intent": "complete-withdrawal-request",
    "withdrawal_request_id": 756850,
    "gateway": "s-pTSZyK23E1Ee5KZpcNbX_aFl0HuhQ0",
    "version": "1.3",
    "timestamp": 1590613956
}

Response (Approved)

{
    "status": 0,
    "description": "Ok",
    "transaction": {
        "transaction_type": "payout",
        "transaction_status": "approved",
        "tid": 756859,
        "transaction_id": "13397",
        "currency": "EUR",
        "amount": 100,
        "conversion_rate": 1.000000,
        "charge_currency": "EUR",
        "charge_amount": 100,
        "fee": 0,
        "payment_method": "Credit Card",
        "payment_processor": "TestCardProcessor",
        "gateway": "s-pTSZyK23E1Ee5KZpcNbX_aFl0HuhQ0",
        "card": {
            "card_token": "J-4-a0vPhjZ9R75JP98VDUFgbh9y8sYr",
            "card_type": "VISA",
            "card_number": "411111******1111",
            "card_exp": "12\/2024",
            "card_issuer_name": "Bank of Somewhere",
            "card_issuer_country": "GB"
        },
        "wallet": null,
        "is_3d": 0,
        "is_cascade": 0,
        "cascade_level": 0,
        "reference_id": null,
        "withdrawal_request_id": 756850,
        "account_identifier": null,
        "created_by": "INTERNET",
        "edited_by": "INTERNET",
        "status_code": "SC-002",
        "status_details": "Transaction approved"
    },
    "version": "1.3",
    "timestamp": 1590611635
}

Response (Rejected)

{
    "status": 0,
    "description": "Ok",
    "transaction": {
        "transaction_type": "payout",
        "transaction_status": "rejected",
        "tid": 756860,
        "transaction_id": "13348",
        "currency": "EUR",
        "amount": 100,
        "conversion_rate": 1.000000,
        "charge_currency": "EUR",
        "charge_amount": 100,
        "fee": 0,
        "payment_method": "Credit Card",
        "payment_processor": "TestCardProcessor",
        "gateway": "s-pTSZyK23E1Ee5KZpcNbX_aFl0HuhQ0",
        "avs_alert": 0,
        "verification_alert": 0,
        "cid": "1",
        "card": null,
        "wallet": null,
        "is_3d": 0,
        "is_cascade": 0,
        "cascade_level": 0,
        "reference_id": null,
        "withdrawal_request_id": 756860,
        "account_identifier": null,
        "created_by": "INTERNET",
        "edited_by": "INTERNET",
        "status_code": "SC-003",
        "status_details": "Transaction rejected"
    },
    "version": "1.3",
    "timestamp": 1590611635
}