zimpler-developers

Withdrawal for Peru

This part of the documentation describes the withdrawal flow for Peru.

Withdrawals for Peru will be valid after the user has performed it’s first deposit.

Flow

For Peru a bank_account of type national-PE (with fields bank, account_number, first_name and last_name) is required.

{
// required
  "country_code": "PE",
  "site_display_name": "Best Website.com",
  "ref": "merchant-transaction-ref",
  "amount": "100.00",
  "currency": "PEN",
  "site": "example.com",
  "success_url": "https://example.com/return_path/transaction_identifier",
  "failure_url": "https://example.com/return_path/transaction_identifier",
  "close_url": "https://example.com/return_path/transaction_identifier",
  "bank_account": {
    "type": "national-PE",
    "bic": "BCPLPE",
    "account_number": "19103922592012",
    "first_name": "Maria",
    "last_name": "Aguilar"
  },
  "user_ip":"123.456.78.90"
  // optional
  "notification_url": "https://example.com/return_path/transaction_identifier",
  "account_ref": "CustomerRefOnMerchantSide",
  "email": "bobben@example.com",
  "locale": "xx",
  "mobile_phone": "+372700000000",
}

# RESPONSES

All responses will include the full withdrawal object sent within your request. This is pointed out with the […] in below documentation.

{
  ...
  "id": "6a734480-a051-4a05-8405-ac2d8f49102f",
  "state": "authorized",
  "user_form_url": null,
  "user_id": null,
  "kyc_info": null,
  "user_ip": "123.456.78.90"
}

# POST /v4/withdrawals/:id/approve

Note: Amount has to be the same as provided in the POST /v4/withdrawals.

# REQUEST

{
  // required
  "amount": "100.00"
}

# RESPONSE

{
    ...
    "state": "approved"
}

# POST /v4/withdrawals/:id/reject

# RESPONSE

{
    ...
    "state": "rejected"
}

# GET /v4/withdrawals/:id

Will return the full transaction object with the current state.