Tokenización
Search…
Transaction
It allows you to process transactions with or without token with the option to tokenize.

Parameters in JSON format in the body of the POST request.

Parameters
Request (without tokenize)
Request (tokenizing)
Request (with token)
Request(additional validations)
Response (example)
Campo
Requerido
Tipo
Descripción
merchantId
yes
Alphanumeric
Name of the merchant.
order
yes
Alphanumeric
Identification of the order previously created by the merchant. It is the code assigned by the merchant, not by Payvalida.
checksum
yes
Alphanumeric
Checksum formed as follows: SHA512(merchantId + order + fixed_hash)
valor
yes
numeric
Payment Amount. It must correspond to the one registered in the order at its creation time.
cvv
yes
numeric
Credit card security code. This parameter must be sent the first time a transaction is made with the credit card. It is optional to send it in the subsequent transactions for the MasterCard franchise. If this parameter is sent, then it will be used. Otherwise, the transaction will be processed as a recurring.
fechaExpiracion
yes
Alphanumeric
Credit card expiration date in MM/AA format. This parameter is required when the transaction is not by token. Otherwise, it will be ignored. In the last case the stored credit card information of the token will be used.
cuotas
yes
numeric
Number of installments in which the payment will be amortized. This field must be greater than or equal to one.
tipoDI
yes
Alphabetical
di
yes
Alphanumeric
Identification document number of the payer.
token
no
Alphanumeric
Credit card token. This field must be used only when the credit card was previously tokenized.
numeroTarjeta
no
Alphanumeric
Credit card number. This field is required if the transaction is without token. Otherwise, it will be ignored. In the last case the stored credit card information of the token will be used.
nombreTitular
no
Alphanumeric
Name of the credit card holder. This field is required when the transaction is not with token. Otherwise, it will be ignored. In the last case the stored credit card information of the token will be used.
apellidosTitular
no
Alphanumeric
Last name of the credit card holder. This field is required when the transaction is not with token. Otherwise, it will be ignored. In the last case the stored credit card information of the token will be used.
franquicia
no
Alphabetical
Credit card franchise. If this field is omitted and the transaction is without token, then the franchise will be inferred from the credit card number. This field is ignored when the transaction is with token, in this case the stored credit card information of the token will be used.
tokenizar
no
boolean
Indicate whether to tokenize the credit card or not. This parameter will be ignored if the transaction is made with token.
correo
no(only for additional validations)
Alphanumeric
Payer's email.
telefono
no(only for additional validations)
Alphanumeric
Payer's phone number.
ip
yes
Alphanumeric
IP address of the origin device of the end user.
line1
no (only for additional validations)
Alphanumeric
User address line 1
1
// Credit card transaction. It will not be tokenized.
2
3
{
4
"merchantId": "my_merchant_name",
5
"order": "1234567890",
6
"checksum": "573ADFB03SF9F6ADECCAAD5B849BE246D63039E06630C745EF652642B7E5151EC5486F9F53D24B9AF266B1CD3C3C452E8C7AD35CA6586B37B70CD73",
7
"valor": 70500,
8
"cuotas": 1,
9
"tipoDI": "CC",
10
"di": "1234567890",
11
"cvv": 123,
12
"numeroTarjeta": "53123456789083",
13
"fechaExpiracion": "12/21",
14
"nombreTitular": "John",
15
"apellidosTitular": "Doe",
16
"correo":"[email protected]",
17
"ip":"1.1.1.1"
18
}
Copied!
1
// Credit card transaction. It will be tokenized.
2
3
{
4
"merchantId": "my_merchant_name",
5
"order": "1234567890",
6
"checksum": "573ADFB03SF9F6ADECCAAD5B849BE246D63039E06630C745EF652642B7E5151EC5486F9F53D24B9AF266B1CD3C3C452E8C7AD35CA6586B37B70CD73",
7
"valor": 70500,
8
"cuotas": 1,
9
"tipoDI": "CC",
10
"di": "1234567890",
11
"cvv": 123,
12
"numeroTarjeta": "53123456789083",
13
"fechaExpiracion": "12/21",
14
"nombreTitular": "John",
15
"apellidosTitular": "Doe",
16
"correo":"[email protected]",
17
"tokenizar": true,
18
"ip":"1.1.1.1"
19
}
Copied!
1
// Token transaction. The token was generated from a previously tokenized transaction with the credit card details.
2
3
{
4
"merchantId": "my_merchant_name",
5
"order": "1234567890",
6
"checksum": "573ADFB03SF9F6ADECCAAD5B849BE246D63039E06630C745EF652642B7E5151EC5486F9F53D24B9AF266B1CD3C3C452E8C7AD35CA6586B37B70CD73",
7
"valor": 70500,
8
"cuotas": 1,
9
"tipoDI": "CC",
10
"di": "1234567890",
11
"cvv": 123, // Required for franchises other than Mastercard
12
"token": "12345678901234",
13
"correo":"[email protected]",
14
"ip":"1.1.1.1"
15
}
Copied!
1
//Transaction with additional validations.
2
//Take into account whether you want to tokenize or not,
3
// sending the tokenize field.
4
{
5
"merchantId": "mi_comercio",
6
"order": "1234567890",
7
"checksum": "573ADFB03SF9F6ADECCAAD5B849BE246D63039E06630C745EF652642B7E5151EC5486F9F53D24B9AF266B1CD3C3C452E8C7AD35CA6586B37B70CD73",
8
"valor": 70500,
9
"cuotas": 1,
10
"tipoDI": "CC",
11
"di": "1234567890",
12
"cvv": 123,
13
"numeroTarjeta": "53123456789083",
14
"fechaExpiracion": "12/21",
15
"nombreTitular": "Juan",
16
"apellidosTitular": "Pérez",
17
"correo":"[email protected]",
18
"telefono":"3002222222",
19
"line1":"cll 65 # 28-97",
20
"line2":"Apto segundo piso",
21
"line3": "Bogota",
22
"country": "Colombia",
23
"city": "Bogota",
24
"state":"Cundinamarca",
25
"postCode": "050001",
26
"ip":"1.1.1.1"
27
}
Copied!
1
{
2
"result": "200",
3
"data": {
4
"token": "5388846254108783",
5
"order": {
6
"amount": "44000.00",
7
"date": "2020-09-30",
8
"tax": "0",
9
"total": "44000.00"
10
},
11
"transaction": {
12
"date": "2020-10-01",
13
"responseCode": "APROBADA",
14
"installments": "1",
15
"accountType": "CREDITO",
16
"cus": "2020-10-01_112233",
17
"invoiceNumber": "112233",
18
"franchise": "MasterCard",
19
"response": "Aprobado",
20
"cardNumber": "************8783",
21
"numAprobacion": "112233",
22
"idTransaccionAutorizador": "332211"
23
},
24
"commerce": {
25
"url": "https://www.payvalida.com",
26
"terminal": "abcdef",
27
"name": "VALIDDA S.A.S",
28
"code": "73",
29
"email": "[email protected]",
30
"net": "REDEBAN"
31
},
32
"user": {}
33
},
34
"error": ""
35
}
Copied!
The result code 200 indicates that the transaction was sent to the bank's processor, but it does not necessarily mean that it was approved. To verify if transaction was successful verify the field data.transaction.responseCode == "APROBADA". In case it is tokenized, the token is responded in the field data.token. In case of error the API will respond with the error message in the field error.