Link E-Wallet Account API


The following endpoint Links Gopay Account:

/ewallet/account/bind

Request parameters

Following are the parameters to be sent in the request body:

Fieldis required?Description
mobilemandatorystring The mobile to link e-wallet account
wallet_typemandatorystring The e-wallet you want to link ex GOPAY

Example

curl -u [Base64({Your_Server_Key}:)] \ 
-X POST 'https://api.durianpay.id/v1/ewallet/account/bind' \
-H 'Is-live: true' \
-H 'Content-Type: application/json' \
-d '{"mobile": "8888888888", 
     "wallet_type": "GOPAY"
     }' 

Response Code : 200 Bind Success

Here is an example of success response

{
    "data": {
        "wallet_type": "GOPAY",
        "mobile": "8888888888",
        "ref_id": "7f125e70-095e-481d-8db8-241df9d5b86d",
        "status": "pending",
        "app_redirect_url": "https://simulator.sandbox.midtrans.com/gopay/partner/web/otp?id=14c95e30-0586-4270-961e-f3b0b3d3d2b0",
        "message": "use redirection url to bind the account"
    }
}

Error Response Code : 400

Here is an example error response for invalid request

{
    "error": "Mobile number is missing in request",
    "error_code": "DPAY_INVALID_REQUEST"
}

Error Response Code : 401

Here is an example error response for unauthorized access

{
    "error": "invalid Authorization header in request",
    "error_code": "DPAY_UNAUTHORIZED_ACCESS"
}

Error Response Code : 500

Here is an example error response

{
    "error": "Error in binding e-wallet account",
    "error_code": "DPAY_INTERNAL_ERROR"
}