The purpose of this guide is to explain how to create a transaction in Peru step by step. Monnet has available 3 Payment methods in Chile: Cards (Tarjetas), Online (Banca por internet) and Cash (Pagar en efectivo).

900

Currently, the Monnet Payin API has 1 version:

  • For V3 a URL will be returned on the response, the merchant has to redirect the shopper to this URL

📘

URL

API v3 (for JSON format with an url as response):

Certification: https://cert.monnetpayments.com/api-payin/v3/online-payments

Production: https://payin.api.monnetpayments.com/api-payin/v3/online-payments

V3: Create a Transaction

To create an online payment using Monnet Payments API, you must call the method online-payments as shown in the following example:

🚧

IMPORTANT REMINDER:

All fields must be included on request no matter if they are required or optional. Also pay attention on payinCustomerName (fist name), payinCustomerLastName , payinCustomerEmail and payinCustomerPhone on each case. This four fields must NOT be sent with empty values on any case.

Creation - Online

Request

FieldDescription
payinMerchantIDInteger (Required)
Merchant Identifier for the Payin API.
payinAmountDecimal (Required)
The amount of the transaction. Use 2 decimals. (As CLP don't use cent, .00 value is required) p.e. 1000.00 for a thounsand Chilean pesos
payinCurrencyString (Required, ISO-4217)
The currency of the transaction
Example
CLP
payinMerchantOperationNumberString (Required, max-lenght = 50)
Reference number of the sale.
This value is used to notify Merchants about a payment.
payinMethodString (Required)
Payment Method Identifier for the Payin API.
EX: TCTD, TC, TD, BankTransfer,Cash, etc.
Full List
payinVerificationString (Required)
HASH SHA512 of:
payinMerchantID+
payinMerchantOperationNumber+
payinAmount+
payinCurrency+
KeyMonnet
payinTransactionOKURLString (Required, max-lenght = 200)
URL where the customer will be redirected from the online banking if payment was successful (Must be Https)
payinTransactionErrorURLString (Required, max-lenght = 200)
URL where the customer will be redirected from the online banking if payment was wrong.(Must be Https)
payinExpirationTimeInteger (Required)
Time in minutes to expire the token.
Minimum Suggested:
Online: 30 minutes
Cash: 2 hours
payinLanguageString (Required, ISO 639-1)
Example: EN, ES, PT, DE, etc.
payinCustomerEmailString (Required)
Contains the customer's email
payinCustomerNameString (Required)
Contains the customer's first name
payinCustomerLastNameString (Required)
Contains the customer's last name
payinCustomerTypeDocumentString (Required)
Contains the customer's type of document. payinCustomerTypeDocument
payinCustomerDocumentString (Required)
Contains the customer's document number
payinCustomerPhoneString (Required)
Contains the customer's mobile number
payinCustomerAddressString (Required)
Customer information
payinCustomerCityString (Required)
Customer information
payinCustomerRegionString (Required)
Customer information
payinCustomerCountryString (Required)
Customer information
payinCustomerZipCodeString (Required)
Customer information
payinCustomerShippingNameString (Required)
Customer information
payinCustomerShippingPhoneString (Required)
Customer information
payinCustomerShippingAddressString (Required)
Customer information
payinCustomerShippingCityString (Required)
Customer information
payinCustomerShippingRegionString (Required)
Customer information
payinCustomerShippingCountryString (Required)
Customer information
payinCustomerShippingZipCodeString (Required)
Customer information
payinRegularCustomerString (Optional)
Customer information
payinCustomerIDString (Optional)
Customer information (PSPs must complete submerchant name mandatory)
payinDiscountCouponString (Requied)
Customer information
payinFilterByString (Optional)
Customer information
payinProductIDString (Required)
Product information. Can not be empty, could send a default value i.e. "0"
payinProductDescriptionString (Required)
Product information. Can not be empty, could send a default value i.e. "0"
payinProductAmountString (Required)
Product information. Can not be empty, could send a default value i.e. "0"
payinDateTimeString (Required)
Date of the transaction. Can not be empty, could send a default value i.e. current date
payinProductSkuString (Required)
Product information. Can not be empty, could send a default value i.e. "0"
payinProductQuantityString (Required)
Product information. Can not be empty, could send a default value i.e. "0"
URLMonnet (For API v3)String (Required)
Value in cert environment: https://cert.monnetpayments.com/api-payin/v1/online-payments
Value in prod environment:
https://payin.api.monnetpayments.com/api-payin/v1/online-payments
typePost (For API v3)String (Required)
Value: json

Sample request

Pay attention on fields name format, must be Camel Case as shown below:

data: {
  "payinMerchantID": "00",
  "payinAmount": "00.00",
  "payinCurrency": "CLP",
  "payinMerchantOperationNumber": "0000",
  "payinMethod": "BankTransfer",
  "payinVerification": "string",
  "payinCustomerName": "string",
  "payinCustomerLastName": "string",
  "payinCustomerEmail": "[email protected]",
  "payinCustomerPhone": "0000",
  "payinCustomerTypeDocument": "RUT",
  "payinCustomerDocument": "12345678",
  "payinRegularCustomer": "string",
  "payinCustomerID": "string",
  "payinDiscountCoupon": "string",
  "payinLanguage": "ES",
  "payinExpirationTime": "000",
  "payinDateTime": "YYYY-MM-DD",
  "payinTransactionOKURL": "https://test.com",
  "payinTransactionErrorURL": "https://test.com",
  "payinFilterBy": "string",
  "payinCustomerAddress": "string",
  "payinCustomerCity": "string",
  "payinCustomerRegion": "string",
  "payinCustomerCountry": "Chile",
  "payinCustomerZipCode": "0000",
  "payinCustomerShippingName": "string",
  "payinCustomerShippingPhone": "0000",
  "payinCustomerShippingAddress": "string",
  "payinCustomerShippingCity": "string",
  "payinCustomerShippingRegion": "string",
  "payinCustomerShippingCountry": "Chile",
  "payinCustomerShippingZipCode": "0000",
  "payinProductID": "0000",
  "payinProductDescription": "string",
  "payinProductAmount": "0000",
  "payinProductSku": "string",
  "payinProductQuantity": "0000",
  "URLMonnet": "https://cert.monnetpayments.com/api-payin/v1/online-payments",
  "typePost": "json"
}

Response

🚧

V3

For V3 a URL will be returned on the response, the merchant has to redirect the shopper to this URL

{
"url": "https://test.test",
"payinErrorCode": "0000",
"payinErrorMessage": "Successfull process",
"payinTrxOperation": "MONTRX207249992409275755"
}

Test Credit Cards

📘

For testing porpuses on Chile we offer this set of credit card:

  • Approved transaction *: 4051 8856 0044 6623 CVV 123 - Expiration date: any future date
  • Transaction rejected *: 5186 0595 5959 0568 CVV 123 - Expiration date: any future date
  • Approved transaction AMEX: 3700 0000 0002 032 CVV 1234 - Expiration date: any future date

When an authentication form with RUT and key appears, the RUT must be used 11.111.111-1 y la passcode123.

BankTransfer Bank Direct

In the case of the bankTransfer method there is the possibility to choose a single bank, to which the user will be redirected to complete the payment.
In order to use this option, the following parameter must be added to the request: "payinUserBankCode". The possible values are listed in the following table:

ValueDescription
cl_falabellaString
Banco Falabella
cl_bciString
Banco de Crédito e Inversiones
cl_scotiabankString
Scotiabank
cl_bchString
Banco de Chile
cl_santanderString
Banco Santander
cl_itauString
Banco Itau

String## Payment

When the transaction is created, a redirection to the payment gateway will be done.

🚧

payinMerchantOperationNumber

The payinMerchantOperationNumber returned in the response is the unique identifier for the transaction inside of Monnet's system. It is not needed to complete the payment, so it shouldn't be shown to the shopper because it may confuse him.

Important

Just because the shopper is redirected to the payinTransactionOKURL does not mean that the payment has been billed correctly. We recommend you to work with the notification system in the following section.