Skip to main content

PER Transfer API

Endpoints

Live POST https://pay.onlinepay.ai/payout

Sandbox POST https://testpay.onlinepay.ai/payout

note

OnlinePay will obtain the HTTP Header referer to verify the website source. The website source must be configured by OnlinePay to be verified. If you do not access the interface through a browser, you need to actively add a referer.

Request Parameters

Basic Information

ParameterTypeRequiredDescription
merNointegerYesMerchant Number, Unique identifier assigned to the merchant by the onlinepay payment platform when registering with onlinepay
merOrderNostringYesMerchant Order Number, Each order must be unique, and each merchant order number can only be submitted once within 1 second
currencyCodestringYesfixed value "PER"
sourceAmountstringYesTotal amount of the order, keep two decimals
withdrawTypestringYesFix valued "5"
returnUrlstringYesJump address after payment is completed (max 512 characters)
notifyUrlstringNoAsynchronous notification address to notify the merchant of the final payment result (max 512 characters)
signstringYesSignature, MD5(merNo+merOrderNo+currencyCode+sourceAmount+PrivateKey) or RSA

Card Information

ParameterTypeRequiredDescription
cardNostringYes*Card number, Checkout mode Can be empty
accountTypestringYes*Recipient account type. 00:CORRIENTE 01:AHORROS

Identification Information

ParameterTypeRequiredDescription
customerIdentificationTypestringYescustomer identification type. 00:Identity card 01:Foreigner identity card 02:Duty number 03:Passport
customerIdentificationstringYesIdentity number

Billing Information

ParameterTypeRequiredDescription
billingFirstNamestringYesFirst Name (max 50 characters)
billingLastNamestringYesLast name (max 50 characters)
billingAddress1stringYesBilling address 1 (max 128 characters)
billingAddress2stringNoBilling address 2 (max 128 characters)
billingCitystringNoCity of residence (bill) (max 100 characters)
billingStatestringNoState Name (Bill) (max 100 characters)
billingCountrystringNoInternational ISO country abbreviation, Refer to the Country Code (max 2 characters)
billingZipCodestringNoPostal Code (max 20 characters)
billingPhonestringNoBilling phone (max 20 characters)
billingEmailstringNoBilling email (max 100 characters)

Additional Information

ParameterTypeRequiredDescription
ipAddressstringYesCardholder IP address (max 64 characters)
versionstringYesV3.0.0
appstringYesOrder app name
bankNamestringYesrefer to per-bank
CCIstringNoPayee transfer account,When bankName is not one of the four major banks (BCP, Interbank, BBVA, Scotiabank), this field must be passed.20 digits,and can not take the decimal point and "-" and other special symbols, only pure numbers.

* Required in Direct mode, can be empty in Checkout mode ** Required for physical goods, not needed for virtual goods

Example Request

{
"merNo": 111111,
"merOrderNo": "222222",
"currencyCode": "USD",
"sourceAmount": "100.05",
"withdrawType": "5",
"returnUrl": "https://example.com",
"notifyUrl": "https://example.com/notify",
"sign": "906FDF4880B00B00281F2AB61AE9A721",
"cardNo": "4242424242424242",
"cardExpireMonth": "01",
"cardExpireYear": "2022",
"cardSecurityCode": "335",
"billingFirstName": "Tati",
"billingLastName": "Moore",
"billingAddress1": "123 Main St",
"billingCity": "Anytown",
"billingState": "CA",
"billingCountry": "US",
"billingZipCode": "12345",
"billingPhone": "1234567890",
"billingEmail": "[email protected]",
"ipAddress": "192.168.1.1",
"beneficiaryType": "individual",
"version": "V3.0.0",
"app": "Example App",
"bankName": "01",
"CCI": "00911120111033371164"
}

Responses Body

ParameterTypeRequiredDescription
codestringYesIf the value is 00000, it will return success, other please refer to Error Code
messagestringYesInterface returns description
dataobjectYes**Request response data
-tradeNostringYesThe flow number generated after each order payment (unique marker)
-payCodestringYesPayment status code(Where: 1 means payment failure, 0 means payment success, 2 means pending)
-merOrderNostringYesCorresponds to the [OrderNo] parameter of the order submission parameter

Example Responses

{
"code":"00000",
"message":"SUCCESS",
"data":{
"payCode":0,
"tradeNo":"3333333",
"merorderNo":"222222"
}
}