Cashout Creation Endpoint

Cashout Request

POST https://api-stg.tupayonline.com/v3/cashout

This endpoint allows you to generate cashout requests

Headers

Name
Type
Description

Content-Type*

string

application/json

Payload-Signature*

string

Control signature

Request Body

Name
Type
Description

login*

string

(max length: 32)

Tupay "Retiros" login key, found in the merchant panel under Configuration -> API Access

pass*

string

Tupay "Withdrawals" Passphrase key, found in the merchant panel under Settings -> API Access.

external_id*

string

(max length: 100)

Unique cashout ID on the merchant end

country*

string

(PE)

Retirement country

amount*

number

(up to 2 decimal places) Withdrawal amount in the specified currency

currency*

string

(PEN/USD)

Retirement currency type

(ISO 4217 format)

document_id*

string

(max length: 12)

Document ID of the beneficiary

document_type*

string

(max length: 4)

beneficiary_name*

string

(max length: 100)

Beneficiary's last name

beneficiary_lastname

string

(max length: 100)

Beneficiary's last name

bank_account*

string

(max length: 20)

CCI - Interbank Account, numbers only.

notification_url*

string

(max length: 300)

If the notification URL is different from the one configured in the merchant panel, it can be configured with this parameter

comments

string

(max length: 200)

Commentaries about the cashout

account_type*

string

(C/S)

"C" Current Account (Checking) "S" Savings account

{
    "cashout_id": "8405147"
}

Example Request

{
  "login": "BcWeAdKs",
  "pass": "OGJSucxztCMEEPTdGPaxvdEzjWEM",
  "account_type": "S",
  "amount": "20",
  "bank_account": "00320001310356642337",
  "beneficiary_lastname": "Gonzales",
  "beneficiary_name": "Alex",
  "country": "PE",
  "currency": "PEN",
  "document_type": "DNI",
  "document_id": "71594743",
  "external_id": "65b3d062f0da510ead84f11d",
  "notification_url": "https://tupaypagos.com/0/notify/tupay",
  "comments":"Comentarios adicionales"
}
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n    \"login\": \"tKoFCFdhgI\",\n    \"pass\": \"7/s!w8@S:hDC2v\",\n    \"external_id\":\"postmanV3Public5321\",\n    \"account_type\": \"DNI\",\n    \"amount\": \"20\",\n    \"bank_account\": \"00320001310356642337\",\n    \"beneficiary_lastname\": \"Gonzales\",\n    \"beneficiary_name\": \"Alex\",\n    \"country\": \"PE\",\n    \"currency\": \"PEN\",\n    \"document_type\": \"DNI\",\n    \"document_id\": \"71594743\",\n    \"notification_url\": \"https://tupaypagos.com/0/notify/tupay\",\n    \"comments\":\"Comentarios adicionales\"\n}");
Request request = new Request.Builder()
  .url("https://api-stg.tupayonline.com/v3/deposits")
  .method("POST", body)
  .addHeader("Content-Type", "application/json")
  .addHeader("Payload-Signature", "af9b8d360fa1adde79db12eb700629a28dcc2b0fb61d7ddbf0b8ecc88d212056")
  .addHeader("Cookie", "GCLB=CLODnJ__1rqLhQE")
  .build();
Response response = client.newCall(request).execute();

Identity Document Type Validation

Within the Tupay API, it will be possible to find different types of identity documents, for this there is validation by the number of digits. "document_type":"DNI" , "document_id":"86970864"

document_type (value)
document (Character length)

PASS

Numeric 12 digits

RUC

Numeric 11 digits

CE

Numeric 9 digits

DNI

Numeric 8 digits

Cashout Rejection Error Codes

The error information is the one (if) provided by the Bank.

Code
Name
Description

800

ERROR_ACCOUNT_INCORRECT

Invalid bank account

801

ERROR_ACCOUNT_CLOSED

Bank account is closed

802

ERROR_AMOUNT_INCORRECT

Invalid amount

803

ERROR_BANK_INVALID

Invalid bank code

804

ERROR_BANK_BRANCH_INCORRECT

Invalid bank branch

805

ERROR_BENEFICIARY_DOCUMENT_ID_INVALID

Invalid beneficiary document

806

ERROR_BENEFICIARY_NAME_INCORRECT

Beneficiary name doesn't match bank details

807

ERROR_REJECTED_BY_BANK

Rejected by bank

808

ERROR_OTHER

Other error

809

WITHDRAWAL_EXPIRED

Withdrawal expired

810

LIMIT_EXCEEDED

Beneficiary limit exceeded

811

RISK_POLICY

Violates bank risk policy

812

BLOCKED_FROZEN_ACCOUNT

Bank account blocked/frozen

813

DOCUMENT_ACCOUNT_MISMATCH

Beneficiary document doesn't match bank details

816

INVALID_ACCOUNT_OR_IFSC_CODE

Invalid bank account or IFSC code

818

ACCOUNT_UNABLE

The bank account is unable to receive transfers

Cashout Internal Error Codes

Code
Description

300

Invalid params + [param name] + [reason]

302

Invalid control string.

303

Invalid bank code

401

Invalid credentials

402

Unregistered IP address (Go to API Access to whitelist the IP in the Merchant Panel)

502

Invalid request body - Please check that the JSON is well formatted

504

User unauthorized due to cadastral situation.

508

Limit exceeded: {TRANSACTION|DAILY|MONTHLY|USER MONTHLY QUANTITY}

509

Cashout not found with this ID

510

Invalid status: cashout is not Pending

511

External ID already used

514

Insufficient funds

515

Invalid user status: {BLACKLISTED|BLOCKED|SUSPENDED}

518

Country not available

519

Merchant not enabled. Contact your Account Manager

524

Invalid Credentials. Contact integration@tupaypagos.com

525

Close loop rejection

526

Invalid currency

533

Invalid Amount. The minimum amount is {currency} {amount} or equivalent in USD

537

Could not make the cashout. Contact integration@tupaypagos.com

538

Invalid account status: {BLACKLISTED}

539

Payout method unavailable. The country and/or bank selected is not available. Please check with your Account Manager

540

Beneficiary email or phone is required

541

email already used by another beneficiary

542

phone already used by another beneficiary

543

702

Could not cancel cashout

703

Could not make the cashout. Contact integration@tupaypagos.com

Última actualización

¿Te fue útil?