Introduction
Welcome to the Blumon Pay REST API Documentation. You can use it mainly to process POS and e-commerce transactions, which can be made with different configurations (retail, restaurant, hotel and car rent) and many methods such as checkout, tokenization, recurrence, pluggins, libs or payment button.
We have code bindings in the most common programming languages. You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right.
Sandbox environment is only available from Monday to Friday from 8:00 to 2:00 HRS. If you have any specific doubt with development or integration, you can send an email to soporte@blumonpay.com and through the support channel we will respond to your requests.
Sandbox Registration
To obtain your Sandbox credentials, it is necessary to register on our portal. In the registry, these data will be requested:
Commerce Data
- Commcerce Name
- Commercial Business
- IP Origin (IP from where the tests will be held)
Contact Data
- Name
- Last name
- Maternal Surname (optional)
- Phone
- Additional phone (optional)
Fiscal Data
- RFC
- Business Name
- Fiscal Regime
Address
- Street
- Outdoor Number
- Interior number (optional)
- Settlement
- Delegation or Municipality
- State
- Town
- Postal Code
Once the registration was successful, two emails will arrive, one with the password for access to the platform and another for access to the e-commerce API (the accesses are different). Once you have the accesses, you must enter the URL and log in.
Authentication
E-commerce Token
REQUEST (CODE EXAMPLE)
var settings = {
"url": "https://sandbox-tokener.blumonpay.net/oauth/token",
"method": "POST",
"timeout": 0,
"headers": {
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Basic Ymx1bW9uX3BheV9lY29tbWVyY2VfYXBpOmJsdW1vbl9wYXlfZWNvbW1lcmNlX2FwaV9wYXNzd29yZA=="
},
"data": {
"grant_type": "password",
"username": "user@email.com",
"password": "5994471abb01112afcc18159f6cc74b4f511b99806da59b3caf5a9c173cacfc5"
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
RESPONSE (JSON EXAMPLE)
{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5...",
"token_type": "bearer",
"refresh_token": "eyJhbGciOiJIUzI1NiIs...",
"expires_in": 10799,
"scope": "read write",
"user_entity": 290,
"country": "mx",
"user_id": 370,
"user_system": 6,
"business_id": 290,
"jti": "66e5042c-b29c-47df-86d1-d3ad608a1227"
}
The first step for the integration is obtaining an authentication token to consume all services, the token is with the standard OAuth 2.0.
The request data is sent as content multipart/form-data
and the response is received as application/json
.
The following API endpoints will occupy the Token that returns this service in the access_token
field as Authorization, you should always select the option Bearer
.
HTTP Request URL
POST https://sandbox-tokener.blumonpay.net/oauth/token
AUTHORIZATION Request Parameters
- Basic Auth (keys must not be changed with this profile and must be the same regardless of the environment)
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
username | String | true | blumon_pay_ecommerce_api | The username used in Sandbox. |
password | String | true | blumon_pay_ecommerce_api_password | The password used in Sandbox. |
FORM DATA Request Parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
grant_type | String | true | password | The type of authentication used, in this case "password". |
username | String | true | sandbox@blumonpay.com | Email that is used for registration on the platform. |
password | String | true | c5c0974a98c8a502d2... | Password that was made via email in SHA-256 in Hex format. |
RAW/JSON Response Parameters
Parameter | Type | Example | Description |
---|---|---|---|
access_token | String | eyJhbGciOiJIUzI1NiIsInR5... | Token to access the following services. |
token_type | String | bearer | Type of authentication to be used in the following services. |
refresh_token | String | eyJhbGciOiJIUzI1NiIs... | TODO. |
expires_in | Integer | 10799 | TODO. |
scope | String | read write | TODO. |
user_entity | Integer | 290 | TODO. |
country | String | mx | TODO. |
user_id | Integer | 370 | TODO. |
user_system | Integer | 6 | TODO. |
business_id | Integer | 290 | TODO. |
jti | String | 66e5042c-b29c-47df-86d1-d3ad608a1227 | TODO. |
Payment Devices (POS) Token
REQUEST (CODE EXAMPLE)
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_URL, "https://sandbox-tokener.blumonpay.net/oauth/token");
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Content-Type: application/x-www-form-urlencoded");
headers = curl_slist_append(headers, "Authorization: Basic Ymx1bW9uX3BheV9jb3JlX2FwaTpibHVtb25fcGF5X2NvcmVfYXBpX3Bhc3N3b3Jk");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
const char *data = "grant_type=password&username=123-123-123&password=c5c0974a98c8a502d22a1e4141b67cddcaf8e2a64c813bdfc14fe071b6e80ddb&client_id=blumon_pay_core_api";
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data);
res = curl_easy_perform(curl);
}
curl_easy_cleanup(curl);
var client = new RestClient("https://sandbox-tokener.blumonpay.net/oauth/token");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/x-www-form-urlencoded");
request.AddHeader("Authorization", "Basic Ymx1bW9uX3BheV9jb3JlX2FwaTpibHVtb25fcGF5X2NvcmVfYXBpX3Bhc3N3b3Jk");
request.AddParameter("grant_type", "password");
request.AddParameter("username", "123-123-123");
request.AddParameter("password", "c5c0974a98c8a502d22a1e4141b67cddcaf8e2a64c813bdfc14fe071b6e80ddb");
request.AddParameter("client_id", "blumon_pay_core_api");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
RequestBody body = RequestBody.create(mediaType, "grant_type=password&username=123-123-123&password=c5c0974a98c8a502d22a1e4141b67cddcaf8e2a64c813bdfc14fe071b6e80ddb&client_id=blumon_pay_core_api");
Request request = new Request.Builder()
.url("https://sandbox-tokener.blumonpay.net/oauth/token")
.method("POST", body)
.addHeader("Content-Type", "application/x-www-form-urlencoded")
.addHeader("Authorization", "Basic Ymx1bW9uX3BheV9jb3JlX2FwaTpibHVtb25fcGF5X2NvcmVfYXBpX3Bhc3N3b3Jk")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/x-www-form-urlencoded");
myHeaders.append("Authorization", "Basic Ymx1bW9uX3BheV9jb3JlX2FwaTpibHVtb25fcGF5X2NvcmVfYXBpX3Bhc3N3b3Jk");
var urlencoded = new URLSearchParams();
urlencoded.append("grant_type", "password");
urlencoded.append("username", "123-123-123");
urlencoded.append("password", "c5c0974a98c8a502d22a1e4141b67cddcaf8e2a64c813bdfc14fe071b6e80ddb");
urlencoded.append("client_id", "blumon_pay_core_api");
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: urlencoded,
redirect: 'follow'
};
fetch("https://sandbox-tokener.blumonpay.net/oauth/token", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://sandbox-tokener.blumonpay.net/oauth/token',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => 'grant_type=password&username=123-123-123&password=c5c0974a98c8a502d22a1e4141b67cddcaf8e2a64c813bdfc14fe071b6e80ddb&client_id=blumon_pay_core_api',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/x-www-form-urlencoded',
'Authorization: Basic Ymx1bW9uX3BheV9jb3JlX2FwaTpibHVtb25fcGF5X2NvcmVfYXBpX3Bhc3N3b3Jk'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
RESPONSE (JSON EXAMPLE)
{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6I...",
"token_type": "bearer",
"refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6...",
"expires_in": 86399,
"scope": "read write",
"businessId": 651,
"corpLogo": "254.png",
"jti": "02611b56-154e-4b18-8e08-e10310704c84"
}
The first step for the integration is obtaining an authentication token to consume all services, the token is with the standard OAuth 2.0. In order to consume this service, it is necessary to have the device data (serial number, brand and model) given high in the portal.
The request data is sent as content multipart/form-data
and the response is received as application/json
.
The following API endpoints will occupy the Token that returns this service in the access_token
field as Authorization, you should always select the option Bearer
.
HTTP Request URL
POST https://sandbox-tokener.blumonpay.net/oauth/token
AUTHORIZATION Request Parameters
- Basic Auth (keys must not be changed with this profile and must be the same regardless of the environment)
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
username | String | true | blumon_pay_core_api | The username used in Sandbox. |
password | String | true | blumon_pay_core_api_password | The password used in Sandbox. |
FORM DATA Request Parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
grant_type | String | true | password | The type of authentication used, in this case "password". |
username | String | true | 123-123-123 | The serial number of the device to be used. |
password | String | true | c5c0974a98c8a502d2... | Serial Number + Brand + Model of the device in SHA-256 in Hex format. |
client_id | String | true | blumon_pay_core_api | Client ID Used in Sandbox. |
RAW/JSON Response Parameters
Parameter | Type | Example | Description |
---|---|---|---|
access_token | String | eyJhbGciOiJIUzI1NiIsInR5... | Token to access the following services. |
token_type | String | bearer | Type of authentication to be used in the following services. |
refresh_token | String | eyJhbGciOiJIUzI1NiIs... | TODO. |
expires_in | Integer | 86399 | TODO. |
scope | String | read write | TODO. |
business_id | Integer | 651 | TODO. |
corpLogo | String | 254.png | TODO. |
jti | String | 02611b56-154e-4b18-8e08-e10310704c84 | TODO. |
Tokenization
Add Token
REQUEST (CODE EXAMPLE)
var settings = {
"url": "https://sandbox-ecommerce.blumonpay.net/ecommerce/charge",
"method": "POST",
"timeout": 0,
"headers": {
"Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"Content-Type": "application/json"
},
"data": JSON.stringify({
"amount": 173.01,
"currency": "484",
"customerInformation": {
"firstName": "Homer",
"lastName": "Simpson",
"middleName": "",
"email": "user@email.com",
"phone1": "5544332211",
"city": "Mexico",
"address1": "Av. Springfield 6734",
"postalCode": "01620",
"state": "Mexico",
"country": "MX",
"ip": "0.0.0.0"
},
"noPresentCardData": {
"cardNumber": "4915661111113980",
"cvv": "138",
"cardholderName": "Homer Simpson",
"expirationYear": "25",
"expirationMonth": "03"
}
}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
REQUEST (JSON EXAMPLE)
{
"pan": "1234123412341234",
"expMonth": "01",
"expYear": "2021",
"holderName": "/HOMER JAY SIMPSON",
"customerInformation": {
"firstName": "Homer",
"lastName": "Simpson",
"email": "homer@gmail.com",
"address1": "742 Evergreen Terrace",
"city": "Springfield",
"country": "United States",
"ip": "123.123.123.123"
}
}
RESPONSE (JSON EXAMPLE CORRECT)
{
"status": true,
"requestId": "4152f8f8-9e98-40f8-9ad9-1effccd5815c",
"date": "2021-05-27",
"time": "13:26:01",
"dataResponse": {
"id": "1e990c35-b53d-43c4-b92a-efd11cef23b8",
"creationDate": "2021-05-27T18:26:01.214+0000"
}
}
RESPONSE (JSON EXAMPLE ERROR)
{
"status": false,
"error": {
"description": "EL CAMPO 'PAN' NO DEBE ESTAR VACÍO"
}
}
This endpoint generates the Token of a card with the clear card data and cardholder data. The generated Token is a unique alphaumeric value that can be used in the Charge Tokenization endpoint. The generated token should be stored safely.
HTTP Request URL
POST https://sandbox-ecommerce.blumonpay.net/cardToken/add
Auth Header Request
- Bearer Token
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Authorization | String | true | Bearer + eyJhbGciOiJIUzI1NiIsInR5cCI6I... | The access_token of the authentication service. |
RAW/JSON Request Parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
pan | String | true | 1234123412341234 | Card number (PAN). |
expMonth | String | true | 01 | Card expiration month (MM). |
expYear | String | true | 2021 | Card expiration year (YYYY). |
holderName | String | true | HOMER JAY SIMPSON | Cardholder name (Same as card). |
customerInformation | Object | true | customerInformation | Customer information JSON object. |
firstName | String | true | Homer | Customer first name. |
lastName | String | true | Simpson | Customer last name. |
String | true | homer@gmail.com | Customer email. | |
address1 | String | true | 742 Evergreen Terrace | Customer address. |
city | String | true | Springfield | Customer city. |
country | String | true | United States | Customer country. |
ip | String | true | 123.123.123.123 | Customer origin IP address (The one that was recorded for Merchant). |
RAW/JSON Response Parameters
Parameter | Type | Example | Description |
---|---|---|---|
status | Boolean | true | Petition status (true = correct/false = error). |
requestId | String | b0018aeb-05e9-4ac0-8110-b1296d4d6e00 | ID of the operation request. |
date | String | 2021-05-27 | Date of operation yyyy-mm-dd. |
time | String | 13:26:01 | Time of operation hh:mm:ss. |
dataResponse | Object | dataResponse | Data object for e-commerce. |
id | String | 1e990c35-b53d-43c4-b92a-efd11cef23b8 | Token of the card generated by the service. |
creationDate | String | 2021-05-27T19:16:46.425+0000 | Date on which the token was created. |
error | Object | error | Error object for e-commerce. |
description | String | EL CAMPO 'PAN' NO DEBE ESTAR VACÍO | Text with operation information. The complete list of descriptions is in the error section. |
Get Card
REQUEST (CODE EXAMPLE)
var settings = {
"url": "https://sandbox-ecommerce.blumonpay.net/ecommerce/charge",
"method": "POST",
"timeout": 0,
"headers": {
"Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"Content-Type": "application/json"
},
"data": JSON.stringify({
"amount": 173.01,
"currency": "484",
"customerInformation": {
"firstName": "Homer",
"lastName": "Simpson",
"middleName": "",
"email": "user@email.com",
"phone1": "5544332211",
"city": "Mexico",
"address1": "Av. Springfield 6734",
"postalCode": "01620",
"state": "Mexico",
"country": "MX",
"ip": "0.0.0.0"
},
"noPresentCardData": {
"cardNumber": "4915661111113980",
"cvv": "138",
"cardholderName": "Homer Simpson",
"expirationYear": "25",
"expirationMonth": "03"
}
}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
RESPONSE (JSON EXAMPLE CORRECT)
{
"status": true,
"requestId": "7da358ba-fc21-42c8-93dd-196bda8da8d4",
"date": "2021-05-27",
"time": "15:53:34",
"dataResponse": {
"pan": "123412******1234",
"cardHolderName": "HOMER JAY SIMPSON",
"binInformation": {
"bin": "123412",
"bank": "BANAMEX",
"product": null,
"type": "CRÉDITO",
"brand": "MASTERCARD"
},
"customerInformation": {
"id": 6515,
"firstName": "HOMER",
"lastName": "SIMPSON",
"email": "homer@gmail.com",
"address1": "742 Evergreen Terrace",
"city": "Springfield",
"country": "United States",
"ip": "123.123.123.123",
"editDate": null,
"editor": null,
"creationDate": "2021-05-27T19:21:52.556+0000",
"creator": 1,
"status": true
}
}
}
RESPONSE (JSON EXAMPLE ERROR)
{
"status": false,
"requestId": "282b8dd2-c60d-4229-a815-9be2c5e14fed",
"date": "2021-05-27",
"time": "16:02:05",
"error": {
"description": "EL TOKEN NO EXISTE"
}
}
This endpoint obtains the information of a card with the Token obtained in Add Token. The card number (PAN) is not show complete for safety, this service is only informative.
HTTP Request URL
GET https://sandbox-ecommerce.blumonpay.net/cardToken/get/{card_token}
Auth Header Request
- Bearer Token
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Authorization | String | true | Bearer + eyJhbGciOiJIUzI1NiIsInR5cCI6I... | The access_token of the authentication service. |
RAW/JSON Response Parameters
Parameter | Type | Example | Description |
---|---|---|---|
status | Boolean | true | Petition status (true = correct/false = error). |
requestId | String | b0018aeb-05e9-4ac0-8110-b1296d4d6e00 | ID of the operation request. |
date | String | 2021-05-27 | Date of operation yyyy-mm-dd. |
time | String | 13:26:01 | Time of operation hh:mm:ss. |
dataResponse | Object | dataResponse | Data object for e-commerce. |
pan | String | 123412******1234 | Card number (PAN). |
cardholderName | String | HOMER JAY SIMPSON | Cardholder name (Same as card). |
binInformation | Object | binInformation | Bin object for e-commerce. For international cards or unknown cards this object will not returned |
bin | String | 491566 | First six digits of card PAN. |
bank | String | BANORTE | Name of the card bank. |
product | String | BANORTE ELECTRON | Bank product name. |
type | String | DÉBITO | Nature of the Card (Debit/Credit). |
brand | String | VISA | Application of the card. |
customerInformation | Object | customerInformation | Customer information JSON object. |
id | Integer | 1321 | TODO. |
firstName | String | Homer | Customer first name. |
lastName | String | Simpson | Customer last name. |
String | homer@gmail.com | Customer email. | |
address1 | String | 742 Evergreen Terrace | Customer address. |
city | String | Springfield | Customer city. |
country | String | United States | Customer country. |
ip | String | 123.123.123.123 | Customer origin IP address (The one that was recorded for Merchant). |
editDate | String | -- | TODO. |
editor | String | -- | TODO. |
creationDate | String | 2021-05-27T19:16:46.425+0000 | Date on which the token was created. |
creator | Integer | -- | TODO. |
status | Boolean | true | TODO. |
error | Object | error | Error object for e-commerce. |
description | String | EL TOKEN NO EXISTE | Text with operation information. The complete list of descriptions is in the error section. |
Update Card
REQUEST (CODE EXAMPLE)
var settings = {
"url": "https://sandbox-ecommerce.blumonpay.net/ecommerce/charge",
"method": "POST",
"timeout": 0,
"headers": {
"Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"Content-Type": "application/json"
},
"data": JSON.stringify({
"amount": 173.01,
"currency": "484",
"customerInformation": {
"firstName": "Homer",
"lastName": "Simpson",
"middleName": "",
"email": "user@email.com",
"phone1": "5544332211",
"city": "Mexico",
"address1": "Av. Springfield 6734",
"postalCode": "01620",
"state": "Mexico",
"country": "MX",
"ip": "0.0.0.0"
},
"noPresentCardData": {
"cardNumber": "4915661111113980",
"cvv": "138",
"cardholderName": "Homer Simpson",
"expirationYear": "25",
"expirationMonth": "03"
}
}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
REQUEST (JSON EXAMPLE)
{
"pan": "1234123412341234",
"expMonth": "01",
"expYear": "2021",
"holderName": "/HOMER JAY SIMPSON",
"customerInformation": {
"firstName": "Homer",
"lastName": "Simpson",
"email": "homer@gmail.com",
"address1": "742 Evergreen Terrace",
"city": "Springfield",
"country": "United States",
"ip": "123.123.123.123"
}
}
RESPONSE (JSON EXAMPLE CORRECT)
{
"status": true,
"requestId": "4152f8f8-9e98-40f8-9ad9-1effccd5815c",
"date": "2021-05-27",
"time": "13:26:01",
"dataResponse": {
"id": "1e990c35-b53d-43c4-b92a-efd11cef23b8",
"creationDate": "2021-05-27T18:26:01.214+0000",
"editDate": "2021-06-01T18:28:03.978+0000"
}
}
RESPONSE (JSON EXAMPLE ERROR)
{
"status": false,
"error": {
"description": "EL CAMPO 'PAN' NO DEBE ESTAR VACÍO"
}
}
This endpoint updates the information stored of a card with an specific Token. It is necessary to send the full data of the request so that the service can update the data. The generated token should be stored safely.
HTTP Request URL
POST https://sandbox-ecommerce.blumonpay.net/cardToken/update/{card_token}
Auth Header Request
- Bearer Token
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Authorization | String | true | Bearer + eyJhbGciOiJIUzI1NiIsInR5cCI6I... | The access_token of the authentication service. |
RAW/JSON Request Parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
pan | String | true | 1234123412341234 | Card number (PAN). |
expMonth | String | true | 01 | Card expiration month (MM). |
expYear | String | true | 2021 | Card expiration year (YYYY). |
holderName | String | true | HOMER JAY SIMPSON | Cardholder name (Same as card). |
customerInformation | Object | true | customerInformation | Customer information JSON object. |
firstName | String | true | Homer | Customer first name. |
lastName | String | true | Simpson | Customer last name. |
String | true | homer@gmail.com | Customer email. | |
address1 | String | true | 742 Evergreen Terrace | Customer address. |
city | String | true | Springfield | Customer city. |
country | String | true | United States | Customer country. |
ip | String | true | 123.123.123.123 | Customer origin IP address (The one that was recorded for Merchant). |
RAW/JSON Response Parameters
Parameter | Type | Example | Description |
---|---|---|---|
status | Boolean | true | Petition status (true = correct/false = error). |
requestId | String | b0018aeb-05e9-4ac0-8110-b1296d4d6e00 | ID of the operation request. |
date | String | 2021-05-27 | Date of operation yyyy-mm-dd. |
time | String | 13:26:01 | Time of operation hh:mm:ss. |
dataResponse | Object | dataResponse | Data object for e-commerce. |
id | String | 1e990c35-b53d-43c4-b92a-efd11cef23b8 | Token of the card generated by the service. |
creationDate | String | 2021-05-27T19:16:46.425+0000 | Date on which the token was created. |
editDate | String | 2021-06-01T19:16:46.425+0000 | Date on which the token was edited. |
error | Object | error | Error object for e-commerce. |
description | String | EL CAMPO 'PAN' NO DEBE ESTAR VACÍO | Text with operation information. The complete list of descriptions is in the error section. |
E-commerce Payment Methods
Charge
REQUEST (CODE EXAMPLE)
var settings = {
"url": "https://sandbox-ecommerce.blumonpay.net/ecommerce/charge",
"method": "POST",
"timeout": 0,
"headers": {
"Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"Content-Type": "application/json"
},
"data": JSON.stringify({
"amount": 173.01,
"currency": "484",
"customerInformation": {
"firstName": "Homer",
"lastName": "Simpson",
"middleName": "",
"email": "user@email.com",
"phone1": "5544332211",
"city": "Mexico",
"address1": "Av. Springfield 6734",
"postalCode": "01620",
"state": "Mexico",
"country": "MX",
"ip": "0.0.0.0"
},
"noPresentCardData": {
"cardNumber": "4915661111113980",
"cvv": "138",
"cardholderName": "Homer Simpson",
"expirationYear": "25",
"expirationMonth": "03"
}
}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
REQUEST (JSON EXAMPLE)
{
"amount": 10.00,
"currency": "484",
"customerInformation": {
"firstName": "Homer",
"lastName": "Simpson",
"middleName": "Jay",
"email": "homer@gmail.com",
"phone1": "5511223344",
"city": "Springfield",
"address1": "742 Evergreen Terrace",
"postalCode": "12345",
"state": "New York",
"country": "United States",
"ip": "123.123.123.123"
},
"noPresentCardData": {
"cardNumber": "1234123412341234",
"cvv": "123",
"cardholderName": "/HOMER JAY SIMPSON",
"expirationYear": "21",
"expirationMonth": "01"
}
}
RESPONSE (JSON EXAMPLE CORRECT)
{
"status": true,
"requestId": "b0018aeb-05e9-4ac0-8110-b1296d4d6e00",
"id": "29902",
"date": "2021-01-27",
"time": "12:27:08",
"dataResponse": {
"authorization": "633581",
"description": "APROBADA",
"binInformation": {
"bin": "491566",
"bank": "BANORTE",
"product": "BANORTE ELECTRON",
"type": "DÉBITO",
"brand": "VISA"
},
"lastFour": "3980"
}
}
RESPONSE (JSON EXAMPLE ERROR)
{
"status": false,
"requestId": "9100acbb-ba22-4138-a31e-8b79ce4e6ff9",
"id": "34298",
"date": "2021-05-24",
"time": "15:09:03",
"error": {
"httpStatusCode": 200,
"code": "56",
"description": "TARJETA INVALIDA",
"binInformation": {
"bin": "530056",
"bank": "BANAMEX",
"product": "CLASICA",
"type": "CRÉDITO",
"brand": "MASTERCARD"
}
}
}
This endpoint process transactions with the clear card information. It is important that, in order to consume this service, it is made from a secure backend that can process transactions with the card data and it must be remembered that it is not allowed to store sensitive information from the cards in logs or databases.
HTTP Request URL
POST https://sandbox-ecommerce.blumonpay.net/ecommerce/charge
Auth Header Request
- Bearer Token
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Authorization | String | true | Bearer + eyJhbGciOiJIUzI1NiIsInR5cCI6I... | The access_token of the authentication service. |
RAW/JSON Request Parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
amount | Double | true | 10.00 | Payment amount with two decimals. |
currency | String | true | 484 | Currency Code with the ISO 4217 standard. |
customerInformation | Object | true | customerInformation | Customer information JSON object. |
firstName | String | true | Homer | Customer first name. |
lastName | String | true | Simpson | Customer last name. |
middleName | String | true | Jay | Customer middle name. |
String | true | homer@gmail.com | Customer email. | |
phone1 | String | true | 5511223344 | Customer phone. |
city | String | true | Springfield | Customer city. |
address1 | String | true | 742 Evergreen Terrace | Customer address. |
postalCode | String | true | 12345 | Customer postal code. |
state | String | true | New York | Customer state. |
country | String | true | United States | Customer country. |
ip | String | true | 123.123.123.123 | Customer origin IP address (The one that was recorded for Merchant). |
noPresentCardData | Object | true | noPresentCardData | Card data object for e-commerce. |
cardNumber | String | true | 1234123412341234 | Card number (PAN). |
cvv | String | true | 123 | Security code (CVV/CVC/CSC). |
cardholderName | String | true | /HOMER JAY SIMPSON | Cardholder name (Same as card). |
expirationYear | String | true | 21 | Card expiration year (YY). |
expirationMonth | String | true | 01 | Card expiration month (MM). |
RAW/JSON Response Parameters
Parameter | Type | Example | Description |
---|---|---|---|
status | Boolean | true | Petition status (true = correct/false = error). |
requestId | String | b0018aeb-05e9-4ac0-8110-b1296d4d6e00 | ID of the transaction request. |
id | String | 1651 | Transaction number (consecutive). |
date | String | 2021-01-27 | Date of transaction yyyy-mm-dd. |
time | String | 12:27:08 | Time of transaction hh:mm:ss. |
dataResponse | Object | dataResponse | Data object for e-commerce. |
authorization | String | 468465 | Code for approved transactions (can be alfanumeric). |
description | String | APROBADA | Text with transaction information. The complete list of descriptions is in the error section. |
lastFour | String | 5482 | Last four digits of card PAN. |
binInformation | Object | binInformation | Bin object for e-commerce. For sale or cancel transactions, this object will be returned with "DEFAULT" description if international cards or unknown cards are sent |
bin | String | 491566 | First six digits of card PAN. |
bank | String | BANORTE | Name of the card bank. |
product | String | BANORTE ELECTRON | Bank product name. |
type | String | DÉBITO | Nature of the Card (Debit/Credit). |
brand | String | VISA | Application of the card. |
error | Object | error | Error object for e-commerce. |
httpStatusCode | Integer | 200 | Error code for http request. |
code | String | 56 | Error code for api. The complete list of codes is in the error section. |
Charge (Installments)
REQUEST (CODE EXAMPLE)
var settings = {
"url": "https://sandbox-ecommerce.blumonpay.net/ecommerce/charge",
"method": "POST",
"timeout": 0,
"headers": {
"Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"Content-Type": "application/json"
},
"data": JSON.stringify({
"amount": 173.01,
"currency": "484",
"customerInformation": {
"firstName": "Homer",
"lastName": "Simpson",
"middleName": "",
"email": "user@email.com",
"phone1": "5544332211",
"city": "Mexico",
"address1": "Av. Springfield 6734",
"postalCode": "01620",
"state": "Mexico",
"country": "MX",
"ip": "0.0.0.0"
},
"noPresentCardData": {
"cardNumber": "4915661111113980",
"cvv": "138",
"cardholderName": "Homer Simpson",
"expirationYear": "25",
"expirationMonth": "03"
}
}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
REQUEST (JSON EXAMPLE)
{
"amount": 10.00,
"currency": "484",
"customerInformation": {
"firstName": "Homer",
"lastName": "Simpson",
"middleName": "Jay",
"email": "homer@gmail.com",
"phone1": "5511223344",
"city": "Springfield",
"address1": "742 Evergreen Terrace",
"postalCode": "12345",
"state": "New York",
"country": "United States",
"ip": "123.123.123.123"
},
"noPresentCardData": {
"cardNumber": "1234123412341234",
"cvv": "123",
"cardholderName": "/HOMER JAY SIMPSON",
"expirationYear": "21",
"expirationMonth": "01"
},
"promotion": {
"firstPayment": "0",
"month": "3",
"planType": "no_interest"
}
}
RESPONSE (JSON EXAMPLE CORRECT)
{
"status": true,
"requestId": "b0018aeb-05e9-4ac0-8110-b1296d4d6e00",
"id": "29902",
"date": "2021-01-27",
"time": "12:27:08",
"dataResponse": {
"authorization": "633581",
"description": "APROBADA",
"binInformation": {
"bin": "491566",
"bank": "BANORTE",
"product": "BANORTE ELECTRON",
"type": "DÉBITO",
"brand": "VISA"
},
"lastFour": "3980"
}
}
RESPONSE (JSON EXAMPLE ERROR)
{
"status": false,
"requestId": "9100acbb-ba22-4138-a31e-8b79ce4e6ff9",
"id": "34298",
"date": "2021-05-24",
"time": "15:09:03",
"error": {
"httpStatusCode": 200,
"code": "56",
"description": "TARJETA INVALIDA",
"binInformation": {
"bin": "530056",
"bank": "BANAMEX",
"product": "CLASICA",
"type": "CRÉDITO",
"brand": "MASTERCARD"
}
}
}
This endpoint process transactions with the clear card information and installments. Promotions can be deferred, with interest or without interest. It is necesary to have the promotions in the portal so that transactions can be performed. It is important that, in order to consume this service, it is made from a secure backend that can process transactions with the card data and it must be remembered that it is not allowed to store sensitive information from the cards in logs or databases.
HTTP Request URL
POST https://sandbox-ecommerce.blumonpay.net/ecommerce/charge
Auth Header Request
- Bearer Token
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Authorization | String | true | Bearer + eyJhbGciOiJIUzI1NiIsInR5cCI6I... | The access_token of the authentication service. |
RAW/JSON Request Parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
amount | Double | true | 10.00 | Payment amount with two decimals. |
currency | String | true | 484 | Currency Code with the ISO 4217 standard. |
customerInformation | Object | true | customerInformation | Customer information JSON object. |
firstName | String | true | Homer | Customer first name. |
lastName | String | true | Simpson | Customer last name. |
middleName | String | true | Jay | Customer middle name. |
String | true | homer@gmail.com | Customer email. | |
phone1 | String | true | 5511223344 | Customer phone. |
city | String | true | Springfield | Customer city. |
address1 | String | true | 742 Evergreen Terrace | Customer address. |
postalCode | String | true | 12345 | Customer postal code. |
state | String | true | New York | Customer state. |
country | String | true | United States | Customer country. |
ip | String | true | 123.123.123.123 | Customer origin IP address (The one that was recorded for Merchant). |
noPresentCardData | Object | true | noPresentCardData | Card data object for e-commerce. |
cardNumber | String | true | 1234123412341234 | Card number (PAN). |
cvv | String | true | 123 | Security code (CVV/CVC/CSC). |
cardholderName | String | true | /HOMER JAY SIMPSON | Cardholder name (Same as card). |
expirationYear | String | true | 21 | Card expiration year (YY). |
expirationMonth | String | true | 01 | Card expiration month (MM). |
promotion | Object | true | promotion | Promotion object for e-commerce. |
firstPayment | String | true | 0 | First payment month (only for deferredities) if it is without deferral the value is "0". |
month | String | true | 3 | Number of installments of the transaction. |
planType | String | true | no_interest | Types of promotions for the transaction. |
Plan Type Options
Plan Type | Description |
---|---|
no_interest | Installment without interest. |
interest | Installment with interest. |
pay_later | Buy now pay later (deferral). |
RAW/JSON Response Parameters
Parameter | Type | Example | Description |
---|---|---|---|
status | Boolean | true | Petition status (true = correct/false = error). |
requestId | String | b0018aeb-05e9-4ac0-8110-b1296d4d6e00 | ID of the transaction request. |
id | String | 1651 | Transaction number (consecutive). |
date | String | 2021-05-24 | Date of transaction yyyy-mm-dd. |
time | String | 15:09:03 | Time of transaction hh:mm:ss. |
dataResponse | Object | dataResponse | Data object for e-commerce. |
authorization | String | 468465 | Code for approved transactions (can be alfanumeric). |
description | String | APROBADA | Text with transaction information. The complete list of descriptions is in the error section. |
lastFour | String | 5482 | Last four digits of card PAN. |
binInformation | Object | binInformation | Bin object for e-commerce. For sale or cancel transactions, this object will be returned with "DEFAULT" description if international cards or unknown cards are sent |
bin | String | 491566 | First six digits of card PAN. |
bank | String | BANORTE | Name of the card bank. |
product | String | BANORTE ELECTRON | Bank product name. |
type | String | DÉBITO | Nature of the Card (Debit/Credit). |
brand | String | VISA | Application of the card. |
error | Object | error | Error object for e-commerce. |
httpStatusCode | Integer | 200 | Error code for http request. |
code | String | 56 | Error code for api. The complete list of codes is in the error section. |
Charge (Tokenization)
REQUEST (CODE EXAMPLE)
var settings = {
"url": "https://sandbox-ecommerce.blumonpay.net/ecommerce/charge",
"method": "POST",
"timeout": 0,
"headers": {
"Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"Content-Type": "application/json"
},
"data": JSON.stringify({
"amount": 173.01,
"currency": "484",
"customerInformation": {
"firstName": "Homer",
"lastName": "Simpson",
"middleName": "",
"email": "user@email.com",
"phone1": "5544332211",
"city": "Mexico",
"address1": "Av. Springfield 6734",
"postalCode": "01620",
"state": "Mexico",
"country": "MX",
"ip": "0.0.0.0"
},
"noPresentCardData": {
"cardNumber": "4915661111113980",
"cvv": "138",
"cardholderName": "Homer Simpson",
"expirationYear": "25",
"expirationMonth": "03"
}
}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
REQUEST (JSON EXAMPLE)
{
"amount": 10.00,
"currency": "484",
"noPresentCardData": {
"cardToken": "1e990c35-b53d-43c4-b92a-efd11cef23b8",
"cvv": "123"
}
}
RESPONSE (JSON EXAMPLE CORRECT)
{
"status": true,
"requestId": "b0018aeb-05e9-4ac0-8110-b1296d4d6e00",
"id": "29902",
"date": "2021-01-27",
"time": "12:27:08",
"dataResponse": {
"authorization": "633581",
"description": "APROBADA",
"binInformation": {
"bin": "491566",
"bank": "BANORTE",
"product": "BANORTE ELECTRON",
"type": "DÉBITO",
"brand": "VISA"
},
"lastFour": "3980"
}
}
RESPONSE (JSON EXAMPLE ERROR)
{
"status": false,
"requestId": "9100acbb-ba22-4138-a31e-8b79ce4e6ff9",
"id": "34298",
"date": "2021-05-24",
"time": "15:09:03",
"error": {
"httpStatusCode": 200,
"code": "56",
"description": "TARJETA INVALIDA",
"binInformation": {
"bin": "530056",
"bank": "BANAMEX",
"product": "CLASICA",
"type": "CRÉDITO",
"brand": "MASTERCARD"
}
}
}
This endpoint process transactions with the card token in the Tokenization process. This form of charges is the safest since the information, apart from traveling through a safe channel, traveling encrypted. Before you can consume this service it is necessary to have the token of the card and the customer information data. It is important to store the card tokens in a safe place.
HTTP Request URL
POST https://sandbox-ecommerce.blumonpay.net/ecommerce/charge
Auth Header Request
- Bearer Token
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Authorization | String | true | Bearer + eyJhbGciOiJIUzI1NiIsInR5cCI6I... | The access_token of the authentication service. |
RAW/JSON Request Parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
amount | Double | true | 10.00 | Payment amount with two decimals. |
currency | String | true | 484 | Currency Code with the ISO 4217 standard. |
noPresentCardData | Object | true | noPresentCardData | Card data object for e-commerce. |
cardToken | String | true | 1e990c35-b53d-43c4-b92a-efd11cef23b8 | Card Token number. |
cvv | String | true | 123 | Security code (CVV/CVC/CSC). |
RAW/JSON Response Parameters
Parameter | Type | Example | Description |
---|---|---|---|
status | Boolean | true | Petition status (true = correct/false = error). |
requestId | String | b0018aeb-05e9-4ac0-8110-b1296d4d6e00 | ID of the transaction request. |
id | String | 1651 | Transaction number (consecutive). |
date | String | 2021-05-24 | Date of transaction yyyy-mm-dd. |
time | String | 15:09:03 | Time of transaction hh:mm:ss. |
dataResponse | Object | dataResponse | Data object for e-commerce. |
authorization | String | 468465 | Code for approved transactions (can be alfanumeric). |
description | String | APROBADA | Text with transaction information. The complete list of descriptions is in the error section. |
reference | String | 20210527132628072 | Self-generated reference. |
binInformation | Object | binInformation | Bin object for e-commerce. For sale or cancel transactions, this object will be returned with "DEFAULT" description if international cards or unknown cards are sent |
bin | String | 491566 | First six digits of card PAN. |
bank | String | BANORTE | Name of the card bank. |
product | String | BANORTE ELECTRON | Bank product name. |
type | String | DÉBITO | Nature of the Card (Debit/Credit). |
brand | String | VISA | Application of the card. |
error | Object | error | Error object for e-commerce. |
httpStatusCode | Integer | 200 | Error code for http request. |
code | String | 56 | Error code for api. The complete list of codes is in the error section. |
Cancel
REQUEST (CODE EXAMPLE)
var settings = {
"url": "https://sandbox-ecommerce.blumonpay.net/ecommerce/charge",
"method": "POST",
"timeout": 0,
"headers": {
"Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"Content-Type": "application/json"
},
"data": JSON.stringify({
"amount": 173.01,
"currency": "484",
"customerInformation": {
"firstName": "Homer",
"lastName": "Simpson",
"middleName": "",
"email": "user@email.com",
"phone1": "5544332211",
"city": "Mexico",
"address1": "Av. Springfield 6734",
"postalCode": "01620",
"state": "Mexico",
"country": "MX",
"ip": "0.0.0.0"
},
"noPresentCardData": {
"cardNumber": "4915661111113980",
"cvv": "138",
"cardholderName": "Homer Simpson",
"expirationYear": "25",
"expirationMonth": "03"
}
}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
REQUEST (JSON EXAMPLE)
{
"amount": 10.00,
"noPresentCardData": {
"cardNumber": "1234123412341234",
"cvv": "123",
"cardholderName": "/HOMER JAY SIMPSON",
"expirationYear": "21",
"expirationMonth": "01"
}
}
RESPONSE (JSON EXAMPLE CORRECT)
{
"status": true,
"requestId": "b0018aeb-05e9-4ac0-8110-b1296d4d6e00",
"id": "29902",
"date": "2021-01-27",
"time": "12:27:08",
"dataResponse": {
"authorization": "633581",
"description": "APROBADA",
"binInformation": {
"bin": "491566",
"bank": "BANORTE",
"product": "BANORTE ELECTRON",
"type": "DÉBITO",
"brand": "VISA"
}
}
}
RESPONSE (JSON EXAMPLE ERROR)
{
"status": false,
"requestId": "9100acbb-ba22-4138-a31e-8b79ce4e6ff9",
"id": "56846",
"date": "2021-05-24",
"time": "15:09:03",
"error": {
"httpStatusCode": 409,
"code": "TX_013",
"description": "TRANSACCIÓN CANCELADA ANTERIORMENTE",
"binInformation": {
"bin": "530056",
"bank": "BANAMEX",
"product": "CLASICA",
"type": "CRÉDITO",
"brand": "MASTERCARD"
}
}
}
This Endpoint performs the cancellations of approved charges, the original transactions should not have a time greater than 45 calendar days so that the cancellation can be processed correctly. It is important that, in order to consume this service, it is made from a secure backend that can process transactions with the card data and it must be remembered that it is not allowed to store sensitive information from the cards in logs or databases.
HTTP Request URL
POST https://sandbox-ecommerce.blumonpay.net/ecommerce/cancel/{id}
Auth Header Request
- Bearer Token
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Authorization | String | true | Bearer + eyJhbGciOiJIUzI1NiIsInR5cCI6I... | The access_token of the authentication service. |
RAW/JSON Request Parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
amount | Double | true | 10.00 | Payment amount with two decimals. |
noPresentCardData | Object | true | noPresentCardData | Card data object for e-commerce. |
cardNumber | String | true | 1234123412341234 | Card number (PAN). |
cvv | String | true | 123 | Security code (CVV/CVC/CSC). |
cardholderName | String | true | /HOMER JAY SIMPSON | Cardholder name (Same as card). |
expirationYear | String | true | 21 | Card expiration year (YY). |
expirationMonth | String | true | 01 | Card expiration month (MM). |
RAW/JSON Response Parameters
Parameter | Type | Example | Description |
---|---|---|---|
status | Boolean | true | Petition status (true = correct/false = error). |
requestId | String | b0018aeb-05e9-4ac0-8110-b1296d4d6e00 | ID of the transaction request. |
id | String | 1651 | Transaction number (consecutive). |
date | String | 2021-05-24 | Date of transaction yyyy-mm-dd. |
time | String | 15:09:03 | Time of transaction hh:mm:ss. |
dataResponse | Object | dataResponse | Data object for e-commerce. |
authorization | String | 468465 | Code for approved transactions (can be alfanumeric). |
description | String | APROBADA | Text with transaction information. The complete list of descriptions is in the error section. |
binInformation | Object | binInformation | Bin object for e-commerce. For sale or cancel transactions, this object will be returned with "DEFAULT" description if international cards or unknown cards are sent |
bin | String | 491566 | First six digits of card PAN. |
bank | String | BANORTE | Name of the card bank. |
product | String | BANORTE ELECTRON | Bank product name. |
type | String | DÉBITO | Nature of the Card (Debit/Credit). |
brand | String | VISA | Application of the card. |
error | Object | error | Error object for e-commerce. |
httpStatusCode | Integer | 200 | Error code for http request. |
code | String | 56 | Error code for api. The complete list of codes is in the error section. |
E-commerce Payment Products
Checkout (Payment Link)
REQUEST (CODE EXAMPLE)
var settings = {
"url": "https://sandbox-ecommerce.blumonpay.net/ecommerce/charge",
"method": "POST",
"timeout": 0,
"headers": {
"Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"Content-Type": "application/json"
},
"data": JSON.stringify({
"amount": 173.01,
"currency": "484",
"customerInformation": {
"firstName": "Homer",
"lastName": "Simpson",
"middleName": "",
"email": "user@email.com",
"phone1": "5544332211",
"city": "Mexico",
"address1": "Av. Springfield 6734",
"postalCode": "01620",
"state": "Mexico",
"country": "MX",
"ip": "0.0.0.0"
},
"noPresentCardData": {
"cardNumber": "4915661111113980",
"cvv": "138",
"cardholderName": "Homer Simpson",
"expirationYear": "25",
"expirationMonth": "03"
}
}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
REQUEST (JSON EXAMPLE)
{
"name": "Homer",
"middleName": "Jay",
"lastName": "Simpson",
"email": "homer@gmail.com",
"phone": "5511223344",
"amount": 10.00,
"unique": true,
"reference": "TEST1",
"paymentConcept": "DONUTS",
"response": true,
"expiration": "2021-05-29",
"urlCallback": "https://www.google.com"
}
RESPONSE (JSON EXAMPLE CORRECT)
{
"status": true,
"requestId": "bf010781-d982-4079-bce2-612d35e66874",
"date": "2021-05-28",
"time": "15:22:34",
"dataResponse": {
"payOrder": "/checkout/c4Pd5f6depTHUp6"
}
}
RESPONSE (JSON EXAMPLE ERROR)
{
"status": false,
"error": {
"description": "EL CAMPO 'AMOUNT' must be greater than 0.1"
}
}
This endpoint generates a dynamic payment link that must be consumed from a browser to perform the payment. The information can be prelier or can leave in blank so that the final user fill out that data. It is posible to generate unique payment links or not, so that more payments are received.
HTTP Request URL
POST https://sandbox-ecommerce.blumonpay.net/checkout/generate
Auth Header Request
- Bearer Token
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Authorization | String | true | Bearer + eyJhbGciOiJIUzI1NiIsInR5cCI6I... | The access_token of the authentication service. |
RAW/JSON Request Parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
name | String | false | HOMER JAY SIMPSON | Cardholder name (Same as card). |
middleName | String | false | Jay | Customer middle name. |
lastName | String | false | Simpson | Customer last name. |
String | false | homer@gmail.com | Customer email. | |
phone | String | false | 5511223344 | Customer phone. |
amount | Double | false | 10.00 | Payment amount with two decimals. |
unique | Boolean | true | false | Indicates if the link can be used multiple times (true) of not (false). |
reference | String | false | TEST1 | Payment reference, if it is not filled, it is asigned one by default. |
paymentConcept | String | true | DONUTS | Payment concept that is going to show. |
response | String | true | true | TODO. |
expiration | String | false | 2021-05-29 | Date on which the link will be overcome, the format is yyyy-mm-dd. |
urlCallback | String | false | https://www.google.com | URL to which the service is going to redirect once the payment is finished. |
RAW/JSON Response Parameters
Parameter | Type | Example | Description |
---|---|---|---|
status | Boolean | true | Petition status (true = correct/false = error). |
requestId | String | b0018aeb-05e9-4ac0-8110-b1296d4d6e00 | ID of the transaction request. |
date | String | 2021-01-27 | Date of transaction yyyy-mm-dd. |
time | String | 12:27:08 | Time of transaction hh:mm:ss. |
dataResponse | Object | dataResponse | Data object for e-commerce. |
payOrder | String | /checkout/c4Pd5f6depTHUp6 | Endpoint to build the final Checkout URL. |
error | Object | error | Error object for e-commerce. |
description | String | APROBADA | Text with transaction information. The complete list of descriptions is in the error section. |
httpStatusCode | Integer | 200 | Error code for http request. |
code | String | 56 | Error code for api. The complete list of codes is in the error section. |
Recurrence
Add Payment
REQUEST (CODE EXAMPLE)
var settings = {
"url": "https://sandbox-ecommerce.blumonpay.net/ecommerce/charge",
"method": "POST",
"timeout": 0,
"headers": {
"Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"Content-Type": "application/json"
},
"data": JSON.stringify({
"amount": 173.01,
"currency": "484",
"customerInformation": {
"firstName": "Homer",
"lastName": "Simpson",
"middleName": "",
"email": "user@email.com",
"phone1": "5544332211",
"city": "Mexico",
"address1": "Av. Springfield 6734",
"postalCode": "01620",
"state": "Mexico",
"country": "MX",
"ip": "0.0.0.0"
},
"noPresentCardData": {
"cardNumber": "4915661111113980",
"cvv": "138",
"cardholderName": "Homer Simpson",
"expirationYear": "25",
"expirationMonth": "03"
}
}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
REQUEST (JSON EXAMPLE)
{
"token": "f5baef5d-7126-4ebc-1234-70b96f7de941",
"amount": 10.00,
"currency": "484",
"chargeDay": 2,
"chargeNumber": 2,
"startDate": "2021-06-01"
}
RESPONSE (JSON EXAMPLE CORRECT)
{
"status": true,
"requestId": "9fa4362b-e3f6-476b-b863-d5750cd0ddae",
"date": "2021-06-01",
"time": "14:01:38",
"dataResponse": {
"id": 651545,
"detail": [
{
"idPlan": 651545,
"idCharge": 152,
"amount": 5.00,
"nextAttempt": "2021-06-02T00:00:00"
},
{
"idPlan": 651545,
"idCharge": 153,
"amount": 5.00,
"nextAttempt": "2021-07-02T00:00:00"
}
],
"description": "TRANSACCIÓN GUARDADA"
}
}
RESPONSE (JSON EXAMPLE ERROR)
{
"status": false,
"requestId": "f80944e6-04ee-470a-a4a5-7b379334b60c",
"date": "2021-06-01",
"time": "14:02:40",
"error": {
"description": "EL CARGO RECURRENTE NO PUEDE SER PROGRAMADO PARA HOY DESPUES DE LAS 05:00 HRS, INTENTE PARA MAÑANA"
}
}
This endpoint create a recurrent payment plan with the card token in the Tokenization process. The amount that is sent in the service is the total number of charges for the amount of each charge (5 charges of $10.00, it would be necessary to send $50.00). It is possible to parameterize the date on which the charges will be made, the number of charges per month and the start date of the first charge. Before you can consume this service it is necessary to have the token of the card. It is important to store the card tokens in a safe place.
HTTP Request URL
POST https://sandbox-ecommerce.blumonpay.net/recurrentPurchase/add
Auth Header Request
- Bearer Token
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Authorization | String | true | Bearer + eyJhbGciOiJIUzI1NiIsInR5cCI6I... | The access_token of the authentication service. |
RAW/JSON Request Parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
token | String | true | 1e990c35-b53d-43c4-b92a-efd11cef23b8 | Card Token number. |
amount | Double | true | 10.00 | Payment amount with two decimals (Total amount of recurrence). |
currency | String | true | 484 | Currency Code with the ISO 4217 standard. |
chargeDay | Integer | true | 2 | Day of each month that will be recurrence. |
chargeNumber | Integer | true | 2 | Number of recurring charges that are going to be made. |
startDate | String | true | 2021-06-02 | Date of the first charge in yyyy-mm-dd format. |
RAW/JSON Response Parameters
Parameter | Type | Example | Description |
---|---|---|---|
status | Boolean | true | Petition status (true = correct/false = error). |
requestId | String | b0018aeb-05e9-4ac0-8110-b1296d4d6e00 | ID of the transaction request. |
date | String | 2021-05-24 | Date of transaction yyyy-mm-dd. |
time | String | 15:09:03 | Time of transaction hh:mm:ss. |
dataResponse | Object | dataResponse | Data object for e-commerce. |
id | Integer | 1651 | Recurrence transaction number (consecutive). |
detail | Objects Array | detail | JSON Objects that will contain the complete recurrence plan to be processed. |
idPlan | Integer | 1651 | Plan transaction number (consecutive), same es {id}. |
idCharge | Integer | 153 | Number of charge to perform (consecutive). |
amount | Double | 5.00 | Recurrent charge amount. |
nextAttempt | String | 2021-06-02T00:00:00 | Date and time in which this recurring charge will be held. |
description | String | TRANSACCIÓN GUARDADA | Text with transaction information. The complete list of descriptions is in the error section. |
error | Object | error | Error object for e-commerce. |
httpStatusCode | Integer | 200 | Error code for http request. |
code | String | 56 | Error code for api. The complete list of codes is in the error section. |
Get Payment
REQUEST (CODE EXAMPLE)
var settings = {
"url": "https://sandbox-ecommerce.blumonpay.net/ecommerce/charge",
"method": "POST",
"timeout": 0,
"headers": {
"Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"Content-Type": "application/json"
},
"data": JSON.stringify({
"amount": 173.01,
"currency": "484",
"customerInformation": {
"firstName": "Homer",
"lastName": "Simpson",
"middleName": "",
"email": "user@email.com",
"phone1": "5544332211",
"city": "Mexico",
"address1": "Av. Springfield 6734",
"postalCode": "01620",
"state": "Mexico",
"country": "MX",
"ip": "0.0.0.0"
},
"noPresentCardData": {
"cardNumber": "4915661111113980",
"cvv": "138",
"cardholderName": "Homer Simpson",
"expirationYear": "25",
"expirationMonth": "03"
}
}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
RESPONSE (JSON EXAMPLE CORRECT)
{
"status": true,
"requestId": "9fa4362b-e3f6-476b-b863-d5750cd0ddae",
"date": "2021-06-01",
"time": "14:01:38",
"dataResponse": {
"card": " ****7578",
"amount": 10.00,
"currency": "484",
"chargeDay": 2,
"chargeNumber": 2,
"currentCharge": 0,
"detail": [
{
"idPlan": 651545,
"idCharge": 152,
"amount": 5.00,
"nextAttempt": "2021-06-02T00:00:00",
"status": "PENDIENTE"
},
{
"idPlan": 651545,
"idCharge": 153,
"amount": 5.00,
"nextAttempt": "2021-07-02T00:00:00",
"status": "PENDIENTE"
}
]
}
}
RESPONSE (JSON EXAMPLE ERROR)
{
"status": false,
"requestId": "39fa32b3-b166-4e2d-87df-76ee37966f33",
"date": "2021-06-01",
"time": "16:37:52",
"error": {
"description": "EL PAGO RECURRENTE NO EXISTE"
}
}
This endpoint obtain the information of recurrent payment plan with the Id obtained in Add Payment. With this service it is posible to know the dates and status of the transactions of full recurrence. It is important to store the card tokens in a safe place.
HTTP Request URL
GET https://sandbox-ecommerce.blumonpay.net/recurrentPurchase/get/{id}
Auth Header Request
- Bearer Token
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Authorization | String | true | Bearer + eyJhbGciOiJIUzI1NiIsInR5cCI6I... | The access_token of the authentication service. |
RAW/JSON Response Parameters
Parameter | Type | Example | Description |
---|---|---|---|
status | Boolean | true | Petition status (true = correct/false = error). |
requestId | String | b0018aeb-05e9-4ac0-8110-b1296d4d6e00 | ID of the transaction request. |
date | String | 2021-05-24 | Date of transaction yyyy-mm-dd. |
time | String | 15:09:03 | Time of transaction hh:mm:ss. |
dataResponse | Object | dataResponse | Data object for e-commerce. |
card | String | " ****1234" | Last four digits of the Card used in recurrence. |
amount | Double | 10.00 | Recurrent complete charge amount. |
currency | String | true | 484 |
chargeDay | Integer | true | 2 |
chargeNumber | Integer | true | 2 |
currentCharge | Integer | true | 0 |
detail | Objects Array | detail | JSON Objects that will contain the complete recurrence plan to be processed. |
idPlan | Integer | 1651 | Plan transaction number (consecutive), same es {id}. |
idCharge | Integer | 153 | Number of charge to perform (consecutive). |
amount | Double | 5.00 | Recurrent charge amount. |
nextAttempt | String | 2021-06-02T00:00:00 | Date and time in which this recurring charge will be held. |
status | String | PENDIENTE | Description of the status of the transaction (if the payment was already held, it will say "PAGADA" if not "PENDIENTE" or "CANCELADA" if the payment was cancelled). |
error | Object | error | Error object for e-commerce. |
description | String | TRANSACCIÓN GUARDADA | Text with transaction information. The complete list of descriptions is in the error section. |
httpStatusCode | Integer | 200 | Error code for http request. |
code | String | 56 | Error code for api. The complete list of codes is in the error section. |
Update Payment
REQUEST (CODE EXAMPLE)
var settings = {
"url": "https://sandbox-ecommerce.blumonpay.net/ecommerce/charge",
"method": "POST",
"timeout": 0,
"headers": {
"Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"Content-Type": "application/json"
},
"data": JSON.stringify({
"amount": 173.01,
"currency": "484",
"customerInformation": {
"firstName": "Homer",
"lastName": "Simpson",
"middleName": "",
"email": "user@email.com",
"phone1": "5544332211",
"city": "Mexico",
"address1": "Av. Springfield 6734",
"postalCode": "01620",
"state": "Mexico",
"country": "MX",
"ip": "0.0.0.0"
},
"noPresentCardData": {
"cardNumber": "4915661111113980",
"cvv": "138",
"cardholderName": "Homer Simpson",
"expirationYear": "25",
"expirationMonth": "03"
}
}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
REQUEST (JSON EXAMPLE)
{
"token": "f5baef5d-7126-4ebc-1234-70b96f7de941",
"chargeDay": 4,
"startDate": "2021-06-04"
}
RESPONSE (JSON EXAMPLE CORRECT)
{
"status": true,
"requestId": "71fcc993-8db1-4000-a21c-0fd8e092d687",
"date": "2021-06-01",
"time": "17:17:42",
"dataResponse": {
"id": 516152,
"description": "TRANSACCIÓN ACTUALIZADA"
}
}
RESPONSE (JSON EXAMPLE ERROR)
{
"status": false,
"requestId": "c6c2ab5b-d12c-42f9-a907-4c8dcf42854b",
"date": "2021-06-01",
"time": "17:23:04",
"error": {
"description": "EL PAGO PROGRAMADO NO SE ENCUENTRA DISPONIBLE"
}
}
This endpoint updates a recurrent payment plan. The data that can be updated are the token of the card, the day that the recurrence is performed and the date on which the payments start processing.
HTTP Request URL
POST https://sandbox-ecommerce.blumonpay.net/recurrentPurchase/update/{id}
Auth Header Request
- Bearer Token
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Authorization | String | true | Bearer + eyJhbGciOiJIUzI1NiIsInR5cCI6I... | The access_token of the authentication service. |
RAW/JSON Request Parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
token | String | true | 1e990c35-b53d-43c4-b92a-efd11cef23b8 | Card Token number. |
chargeDay | Integer | true | 2 | Day of each month that will be recurrence. |
startDate | String | true | 2021-06-02 | Date of the first charge in yyyy-mm-dd format. |
RAW/JSON Response Parameters
Parameter | Type | Example | Description |
---|---|---|---|
status | Boolean | true | Petition status (true = correct/false = error). |
requestId | String | b0018aeb-05e9-4ac0-8110-b1296d4d6e00 | ID of the transaction request. |
date | String | 2021-05-24 | Date of transaction yyyy-mm-dd. |
time | String | 15:09:03 | Time of transaction hh:mm:ss. |
dataResponse | Object | dataResponse | Data object for e-commerce. |
id | Integer | 516152 | Recurrence transaction number (consecutive). |
description | String | TRANSACCIÓN ACTUALIZADA | Text with transaction information. The complete list of descriptions is in the error section. |
error | Object | error | Error object for e-commerce. |
httpStatusCode | Integer | 200 | Error code for http request. |
code | String | 56 | Error code for api. The complete list of codes is in the error section. |
Delete Payment
REQUEST (CODE EXAMPLE)
var settings = {
"url": "https://sandbox-ecommerce.blumonpay.net/ecommerce/charge",
"method": "POST",
"timeout": 0,
"headers": {
"Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"Content-Type": "application/json"
},
"data": JSON.stringify({
"amount": 173.01,
"currency": "484",
"customerInformation": {
"firstName": "Homer",
"lastName": "Simpson",
"middleName": "",
"email": "user@email.com",
"phone1": "5544332211",
"city": "Mexico",
"address1": "Av. Springfield 6734",
"postalCode": "01620",
"state": "Mexico",
"country": "MX",
"ip": "0.0.0.0"
},
"noPresentCardData": {
"cardNumber": "4915661111113980",
"cvv": "138",
"cardholderName": "Homer Simpson",
"expirationYear": "25",
"expirationMonth": "03"
}
}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
RESPONSE (JSON EXAMPLE CORRECT)
{
"status": true,
"requestId": "433291cf-94f4-4963-8369-f0af1c0babb9",
"date": "2021-06-01",
"time": "17:51:16",
"dataResponse": {
"description": "TRANSACCIÓN DESACTIVADA"
}
}
RESPONSE (JSON EXAMPLE ERROR)
{
"status": false,
"requestId": "e08ba253-98b5-489f-90da-3aade57b0be9",
"date": "2021-06-01",
"time": "17:53:40",
"error": {
"description": "EL PAGO RECURRENTE NO EXISTE"
}
}
This endpoint cancel the recurrent payment plan with the Id obtained in Add Payment.
HTTP Request URL
GET https://sandbox-ecommerce.blumonpay.net/recurrentPurchase/delete/{id}
Auth Header Request
- Bearer Token
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Authorization | String | true | Bearer + eyJhbGciOiJIUzI1NiIsInR5cCI6I... | The access_token of the authentication service. |
RAW/JSON Response Parameters
Parameter | Type | Example | Description |
---|---|---|---|
status | Boolean | true | Petition status (true = correct/false = error). |
requestId | String | b0018aeb-05e9-4ac0-8110-b1296d4d6e00 | ID of the transaction request. |
date | String | 2021-05-24 | Date of transaction yyyy-mm-dd. |
time | String | 15:09:03 | Time of transaction hh:mm:ss. |
dataResponse | Object | dataResponse | Data object for e-commerce. |
error | Object | error | Error object for e-commerce. |
description | String | TRANSACCIÓN DESACTIVADA | Text with transaction information. The complete list of descriptions is in the error section. |
httpStatusCode | Integer | 200 | Error code for http request. |
code | String | 56 | Error code for api. The complete list of codes is in the error section. |
Programed Purchase
Add Payment
REQUEST (CODE EXAMPLE)
var settings = {
"url": "https://sandbox-ecommerce.blumonpay.net/ecommerce/charge",
"method": "POST",
"timeout": 0,
"headers": {
"Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"Content-Type": "application/json"
},
"data": JSON.stringify({
"amount": 173.01,
"currency": "484",
"customerInformation": {
"firstName": "Homer",
"lastName": "Simpson",
"middleName": "",
"email": "user@email.com",
"phone1": "5544332211",
"city": "Mexico",
"address1": "Av. Springfield 6734",
"postalCode": "01620",
"state": "Mexico",
"country": "MX",
"ip": "0.0.0.0"
},
"noPresentCardData": {
"cardNumber": "4915661111113980",
"cvv": "138",
"cardholderName": "Homer Simpson",
"expirationYear": "25",
"expirationMonth": "03"
}
}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
REQUEST (JSON EXAMPLE)
{
"token": "f5baef5d-7126-4ebc-1234-70b96f7de941",
"amount": 10.00,
"currency": "484",
"date": "2021-06-02",
"time": "12:29",
"attemps" : 2,
"attempsTime": 1
}
RESPONSE (JSON EXAMPLE CORRECT)
{
"status": true,
"requestId": "9fa4362b-e3f6-476b-b863-d5750cd0ddae",
"date": "2021-06-01",
"time": "14:01:38",
"dataResponse": {
{
"id": 20,
"token": "f5baef5d-7126-4ebc-1234-70b96f7de941",
"status": true
}
}
}
RESPONSE (JSON EXAMPLE ERROR)
{
"status": false,
"requestId": "f80944e6-04ee-470a-a4a5-7b379334b60c",
"date": "2021-06-01",
"time": "14:02:40",
"error": {
"description": "EL CAMPO 'DATE' & 'TIME' NO DEBE SER MENOR A LA FECHA ACTUAL"
}
}
This endpoint create a programed payment transaction with the card token in the Tokenization process. It is possible to configure the date, time (24 hour format), number of attempts (in case the first one does not pass) and the spaced time in which the subsequent attempts will be made. If it is necesary to generate multiple scheduled charges in a single request, it can be done by sending an Array of JSON Objects in the request. Before you can consume this service it is necessary to have the token of the card. It is important to store the card tokens in a safe place.
HTTP Request URL
POST https://sandbox-ecommerce.blumonpay.net/programedPurchase/add
Auth Header Request
- Bearer Token
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Authorization | String | true | Bearer + eyJhbGciOiJIUzI1NiIsInR5cCI6I... | The access_token of the authentication service. |
RAW/JSON Request Parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
token | String | true | 1e990c35-b53d-43c4-b92a-efd11cef23b8 | Card Token number. |
amount | Double | true | 10.00 | Payment amount with two decimals. |
currency | String | true | 484 | Currency Code with the ISO 4217 standard. |
date | String | true | 2021-05-24 | Date of transaction yyyy-mm-dd. |
time | String | true | 15:09 | Time of transaction hh:mm (24 hour format). |
attemps | Integer | true | 2 | Number of attemps if first transaction does not pass. |
attempsTime | Integer | true | 10 | Time (in minutes) in wich the subsequent attemprs will be made. |
RAW/JSON Response Parameters
Parameter | Type | Example | Description |
---|---|---|---|
status | Boolean | true | Petition status (true = correct/false = error). |
requestId | String | b0018aeb-05e9-4ac0-8110-b1296d4d6e00 | ID of the transaction request. |
date | String | 2021-05-24 | Date of transaction yyyy-mm-dd. |
time | String | 15:09:03 | Time of transaction hh:mm:ss. |
dataResponse | Object | dataResponse | Data object for e-commerce. |
id | Integer | 132 | Programed transaction number (consecutive). |
token | String | 1e990c35-b53d-43c4-b92a-efd11cef23b8 | Card Token number. |
status | Boolean | true | Petition status (true = correct/false = error). |
error | Object | error | Error object for e-commerce. |
description | String | TRANSACCIÓN GUARDADA | Text with transaction information. The complete list of descriptions is in the error section. |
httpStatusCode | Integer | 200 | Error code for http request. |
code | String | 56 | Error code for api. The complete list of codes is in the error section. |
Get Payment
REQUEST (CODE EXAMPLE)
var settings = {
"url": "https://sandbox-ecommerce.blumonpay.net/ecommerce/charge",
"method": "POST",
"timeout": 0,
"headers": {
"Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"Content-Type": "application/json"
},
"data": JSON.stringify({
"amount": 173.01,
"currency": "484",
"customerInformation": {
"firstName": "Homer",
"lastName": "Simpson",
"middleName": "",
"email": "user@email.com",
"phone1": "5544332211",
"city": "Mexico",
"address1": "Av. Springfield 6734",
"postalCode": "01620",
"state": "Mexico",
"country": "MX",
"ip": "0.0.0.0"
},
"noPresentCardData": {
"cardNumber": "4915661111113980",
"cvv": "138",
"cardholderName": "Homer Simpson",
"expirationYear": "25",
"expirationMonth": "03"
}
}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
RESPONSE (JSON EXAMPLE CORRECT)
{
"status": true,
"requestId": "9fa4362b-e3f6-476b-b863-d5750cd0ddae",
"date": "2021-06-01",
"time": "14:01:38",
"dataResponse": {
"description": "PENDIENTE",
"card": " ****7578",
"amount": 10.00,
"currency": "484",
"date": "2021-06-02",
"time": "12:29",
"attempts": 2,
"attempTime": 1
}
}
RESPONSE (JSON EXAMPLE ERROR)
{
"status": false,
"requestId": "39fa32b3-b166-4e2d-87df-76ee37966f33",
"date": "2021-06-01",
"time": "16:37:52",
"error": {
"description": "EL PAGO PROGRAMADO NO EXISTE"
}
}
This endpoint obtain the information of programed payment with the Id obtained in Add Payment. With this service it is posible to know the dates and status of the transactions. It is important to store the card tokens in a safe place.
HTTP Request URL
GET https://sandbox-ecommerce.blumonpay.net/programedPurchase/get/{id}
Auth Header Request
- Bearer Token
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Authorization | String | true | Bearer + eyJhbGciOiJIUzI1NiIsInR5cCI6I... | The access_token of the authentication service. |
RAW/JSON Response Parameters
Parameter | Type | Example | Description |
---|---|---|---|
status | Boolean | true | Petition status (true = correct/false = error). |
requestId | String | b0018aeb-05e9-4ac0-8110-b1296d4d6e00 | ID of the transaction request. |
date | String | 2021-05-24 | Date of transaction yyyy-mm-dd. |
time | String | 15:09:03 | Time of transaction hh:mm:ss. |
dataResponse | Object | dataResponse | Data object for e-commerce. |
description | String | PENDIENTE | Description of the status of the transaction (if the payment was already held, it will say "PAGADA" if not "PENDIENTE" or "CANCELADA" if the payment was cancelled). |
card | String | " ****1234" | Last four digits of the Card used in recurrence. |
amount | Double | 10.00 | Recurrent complete charge amount. |
currency | String | true | 484 |
date | String | 2021-05-24 | Date of transaction yyyy-mm-dd. |
time | String | 15:09 | Time of transaction hh:mm (24 hour format). |
attemps | Integer | 2 | Number of attemps if first transaction does not pass. |
attempsTime | Integer | 10 | Time (in minutes) in wich the subsequent attemprs will be made. |
error | Object | error | Error object for e-commerce. |
httpStatusCode | Integer | 200 | Error code for http request. |
code | String | 56 | Error code for api. The complete list of codes is in the error section. |
Update Payment
REQUEST (CODE EXAMPLE)
var settings = {
"url": "https://sandbox-ecommerce.blumonpay.net/ecommerce/charge",
"method": "POST",
"timeout": 0,
"headers": {
"Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"Content-Type": "application/json"
},
"data": JSON.stringify({
"amount": 173.01,
"currency": "484",
"customerInformation": {
"firstName": "Homer",
"lastName": "Simpson",
"middleName": "",
"email": "user@email.com",
"phone1": "5544332211",
"city": "Mexico",
"address1": "Av. Springfield 6734",
"postalCode": "01620",
"state": "Mexico",
"country": "MX",
"ip": "0.0.0.0"
},
"noPresentCardData": {
"cardNumber": "4915661111113980",
"cvv": "138",
"cardholderName": "Homer Simpson",
"expirationYear": "25",
"expirationMonth": "03"
}
}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
REQUEST (JSON EXAMPLE)
{
"token": "f5baef5d-7126-4ebc-1234-70b96f7de941",
"amount": 11.00,
"currency": "484",
"date": "2021-06-02",
"time": "12:29",
"attemps" : 2,
"attempsTime": 15
}
RESPONSE (JSON EXAMPLE CORRECT)
{
"status": true,
"requestId": "71fcc993-8db1-4000-a21c-0fd8e092d687",
"date": "2021-06-01",
"time": "17:17:42",
"dataResponse": {
"id": 22,
"description": "TRANSACCIÓN ACTUALIZADA"
}
}
RESPONSE (JSON EXAMPLE ERROR)
{
"status": false,
"requestId": "c6c2ab5b-d12c-42f9-a907-4c8dcf42854b",
"date": "2021-06-01",
"time": "17:23:04",
"error": {
"description": "EL PAGO PROGRAMADO NO SE ENCUENTRA DISPONIBLE"
}
}
This endpoint updates a programed payment. The data that can be updated are the token of the card, the amount of the purchase, date and time of the transaction and the number and time of attemps.
HTTP Request URL
POST https://sandbox-ecommerce.blumonpay.net/programedPurchase/update/{id}
Auth Header Request
- Bearer Token
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Authorization | String | true | Bearer + eyJhbGciOiJIUzI1NiIsInR5cCI6I... | The access_token of the authentication service. |
RAW/JSON Request Parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
token | String | true | 1e990c35-b53d-43c4-b92a-efd11cef23b8 | Card Token number. |
amount | Double | true | 10.00 | Payment amount with two decimals. |
currency | String | true | 484 | Currency Code with the ISO 4217 standard. |
date | String | true | 2021-05-24 | Date of transaction yyyy-mm-dd. |
time | String | true | 15:09 | Time of transaction hh:mm (24 hour format). |
attemps | Integer | true | 2 | Number of attemps if first transaction does not pass. |
attempsTime | Integer | true | 10 | Time (in minutes) in wich the subsequent attemprs will be made. |
RAW/JSON Response Parameters
Parameter | Type | Example | Description |
---|---|---|---|
status | Boolean | true | Petition status (true = correct/false = error). |
requestId | String | b0018aeb-05e9-4ac0-8110-b1296d4d6e00 | ID of the transaction request. |
date | String | 2021-05-24 | Date of transaction yyyy-mm-dd. |
time | String | 15:09:03 | Time of transaction hh:mm:ss. |
dataResponse | Object | dataResponse | Data object for e-commerce. |
id | Integer | 516152 | Recurrence transaction number (consecutive). |
description | String | TRANSACCIÓN ACTUALIZADA | Text with transaction information. The complete list of descriptions is in the error section. |
error | Object | error | Error object for e-commerce. |
httpStatusCode | Integer | 200 | Error code for http request. |
code | String | 56 | Error code for api. The complete list of codes is in the error section. |
Delete Payment
REQUEST (CODE EXAMPLE)
var settings = {
"url": "https://sandbox-ecommerce.blumonpay.net/ecommerce/charge",
"method": "POST",
"timeout": 0,
"headers": {
"Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"Content-Type": "application/json"
},
"data": JSON.stringify({
"amount": 173.01,
"currency": "484",
"customerInformation": {
"firstName": "Homer",
"lastName": "Simpson",
"middleName": "",
"email": "user@email.com",
"phone1": "5544332211",
"city": "Mexico",
"address1": "Av. Springfield 6734",
"postalCode": "01620",
"state": "Mexico",
"country": "MX",
"ip": "0.0.0.0"
},
"noPresentCardData": {
"cardNumber": "4915661111113980",
"cvv": "138",
"cardholderName": "Homer Simpson",
"expirationYear": "25",
"expirationMonth": "03"
}
}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
RESPONSE (JSON EXAMPLE CORRECT)
{
"status": true,
"requestId": "433291cf-94f4-4963-8369-f0af1c0babb9",
"date": "2021-06-01",
"time": "17:51:16",
"dataResponse": {
"description": "TRANSACCIÓN ELIMINADA"
}
}
RESPONSE (JSON EXAMPLE ERROR)
{
"status": false,
"requestId": "e08ba253-98b5-489f-90da-3aade57b0be9",
"date": "2021-06-01",
"time": "17:53:40",
"error": {
"description": "EL PAGO PROGRAMADO SE ENCUENTRA INACTIVO"
}
}
This endpoint cancel the programed payment with the Id obtained in Add Payment.
HTTP Request URL
GET https://sandbox-ecommerce.blumonpay.net/programedPurchase/delete/{id}
Auth Header Request
- Bearer Token
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Authorization | String | true | Bearer + eyJhbGciOiJIUzI1NiIsInR5cCI6I... | The access_token of the authentication service. |
RAW/JSON Response Parameters
Parameter | Type | Example | Description |
---|---|---|---|
status | Boolean | true | Petition status (true = correct/false = error). |
requestId | String | b0018aeb-05e9-4ac0-8110-b1296d4d6e00 | ID of the transaction request. |
date | String | 2021-05-24 | Date of transaction yyyy-mm-dd. |
time | String | 15:09:03 | Time of transaction hh:mm:ss. |
dataResponse | Object | dataResponse | Data object for e-commerce. |
error | Object | error | Error object for e-commerce. |
description | String | TRANSACCIÓN DESACTIVADA | Text with transaction information. The complete list of descriptions is in the error section. |
httpStatusCode | Integer | 200 | Error code for http request. |
code | String | 56 | Error code for api. The complete list of codes is in the error section. |
WebHooks
Add WebHooks
RESPONSE (JSON EXAMPLE)
{
"bin": "411111",
"lastFour": "1111",
"cardType": "DEBITO",
"brand": "VISA",
"bank": "BANORTE",
"amount": "1.23",
"reference": "20210120182438251",
"cardHolder": "HOMER SIMPSON",
"authorizationCode": "483347",
"operationType": "VENTA",
"operationNumber": 29556,
"descriptionResponse": "APROBADA",
"dateTransaction": "20/01/2021 18:24:38",
"authentication": "unknown",
"membership": "8226471",
"provideResponse": "SB",
"codeResponse": "00"
}
WebHooks are asynchronous HTTP requests that are sent in real time to the indicated URL each time a transaction is processed (either approved or denied).It is possible to record WebHooks to a domain with and without SSL certificate. They are useful for knowing the status of transactions in a "backend" way and to populate databases of the merchant.
In order to register a WebHook in our systems, it is necessary to send an email to soporte@blumonpay.com with the following information:
- Corporate.
- Merchant.
- Branch.
- Complete URL.
- SSL (active or inactive).
RAW/JSON Response Parameters
Parameter | Type | Example | Description |
---|---|---|---|
bin | String | 491566 | First six digits of card PAN. |
lastFour | String | 5482 | Last four digits of card PAN. |
cardType | String | DÉBITO | Nature of the Card (Debit/Credit). |
brand | String | VISA | Application of the card. |
bank | String | BANORTE | Name of the card bank. |
amount | String | 10.00 | Payment amount. |
reference | String | 20210120182438251 | Payment reference. |
cardHolder | String | HOMER SIMPSON | Cardholder complete name. |
authorizationCode | String | 468465 | Code for approved transactions (can be alfanumeric). |
operationType | String | VENTA | TODO. |
operationNumber | Integer | 1651 | Transaction number (consecutive). |
descriptionResponse | String | APROBADA | Text with transaction information. The complete list of descriptions is in the error section. |
dateTransaction | String | 20/01/2021 18:24:38 | Date and time of transaction yyyy/mm/dd hh:mm:ss. |
authentication | String | chip | TODO. |
membership | String | 8226471 | Merchant membership. |
provideResponse | String | PR | Processor with which the transaction was made. |
codeResponse | String | 00 | Error code for api. The complete list of codes is in the error section. |
Errors
The Blumon Pay API uses the following error codes:
Error Code | Error Description |
---|---|
0 | APROBADA |
1 | LLAME EMISOR |
2 | LLAME EMISOR |
3 | COMERCIO INVALIDO |
4 | RETENER TARJETA |
5 | TRANSACCIÓN INVALIDA |
6 | REINTENTE |
12 | TRANSACCIÓN NO PERMITIDA |
13 | TRANSACCIÓN NO PERMITIDA |
14 | TARJETA INVALIDA |
30 | ERROR DE FORMATO |
31 | TRANSACCIÓN NO PERMITIDA |
36 | RETENER TARJETA |
41 | RETENER TARJETA |
43 | RETENER TARJETA |
51 | FONDOS INSUFICIENTES |
54 | TARJETA VENCIDA |
55 | PIN INVALIDO |
56 | TARJETA INVALIDA |
57 | PAGO NO PERMITIDO EMISOR |
61 | LIMITE EXCEDIDO |
62 | TRANSACCIÓN NO PERMITIDA |
65 | LIMITE EXCEDIDO |
68 | REINTENTE |
75 | PIN INVALIDO/EXCEDIDO |
82 | TARJETA INVALIDA |
83 | TARJETA INVALIDA |
87 | TARJETA INVALIDA |
89 | TIPO DE PLAN / PLAZO INVALIDO |
94 | TRANSACCION DUPLICADA |
N0 | REINTENTE |
N2 | AUTORIZACIONES EXCEDIDAS |
N5 | TRANSACCIÓN NO PERMITIDA |
N6 | C P NO PERMITIDO POR TH |
N7 | TARJETA INVALIDA |
O4 | LIMITE EXCEDIDO |
O6 | TARJETA INVALIDA |
O8 | TARJETA INVALIDA |
P1 | TRANSACCIÓN NO PERMITIDA |
P9 | LIMITE EXCEDIDO |
Q1 | TARJETA INVALIDA |
T2 | ERROR EN TERMINAL |
T3 | TRANSACCIÓN NO PERMITIDA |
T5 | TARJETA SIN ACTIVAR |
T9 | MONEDA INVÁLIDA |
1001 | ERROR EN LECTURA DE CHIP |
1002 | CHIP INVALIDO |
1003 | CHIP NO SOPORTADO |
11 | DESCONOCIDO |
BP | EL DISPOSITIVO NO EXISTE |
BP | EL DISPOSITIVO NO SE ENCUENTRA ACTIVO |
BP | EL DISPOSITIVO SE ENCUENTRA CANCELADO |
BP | LA SUCURSAL NO EXISTE |
BP | LA SUCURSAL NO SE ENCUENTRA ACTIVA |
BP | LA SUCURSAL SE ENCUENTRA CANCELADO |
BP | EL COMERCIO NO EXISTE |
BP | EL COMERCIO NO SE ENCUENTRA ACTIVO |
BP | EL COMERCIO SE ENCUENTRA CANCELADO |
BP | LA PETICIÓN SE ENCUENTRA VACÍA |
BP | PARÁMETRO FALTANTE EN PETICIÓN |
BP | RECURSO NO ENCONTRADO |
BP | RESPUESTA VACÍA |
BP | MÉTODO NO PERMITIDO |
BP | LLAVE NO ENCONTRADA |
BP | LLAVES NO ENCONTRADAS |
BP | LA TRANSACCIÓN EXCEDE EL MONTO PERMITIDO |
BP | LA TRANSACCIÓN EXCEDE EL MONTO DIARIO PERMITIDO |
BP | LA TRANSACCIÓN EXCEDE EL MONTO MENSUAL PERMITIDO |
BP | LA TRANSACCIÓN NO PERMITE TRANSACCIONES DE TIPO MANUAL |
BP | PROMOCIONES NO ACTIVAS |
BP | PROMOCIÓN NO ACTIVA |
BP | LA TRANSACCIÓN NO ESTÁ DENTRO DEL HORARIO PERMITIDO |
BP | LA TRANSACCIÓN NO EXISTE |
BP | TRANSACCIÓN CON ORIGEN NO APROBADO |
BP | TARJETA INVALIDA |
BP | AFILIACIÓN INVALIDA |
BP | BIN NO VALIDO PARA PROMOCIONES |
BP | TRANSACCIÓN CANCELADA ANTERIORMENTE |
BP | TRANSACCIÓN REVERSADA ANTERIORMENTE |
BP | EXCEDE LAS TRANSACCIONES DIARIAS PERMITIDAS |
BP | EL USUARIO NO EXISTE |
BP | EL CORPORATIVO NO EXISTE |
BP | EL CORPORATIVO NO SE ENCUENTRA ACTIVO |
BP | EL CORPORATIVO SE ENCUENTRA CANCELADO |
BP | RESPUESTA NO ENCONTRADA |
BP | TRANSACCIÓN CON COMERCIO INVALIDO |
BP | INTENTO DE CANCELACIÓN NO VÁLIDO |
BP | INTENTO DE CHECK OUT NO VÁLIDO |
BP | INTENTO DE RENTA OUT NO VÁLIDO |
BP | INTENTO DE CIERRE POS-PROPINA NO VÁLIDO |
BP | LA TRANSACCIÓN NO PERMITE TRANSACCIONES DE TIPO CHIP |
BP | LA TRANSACCIÓN NO PERMITE TRANSACCIONES DE TIPO CONTACTLESS |
BP | LA TRANSACCIÓN NO PERMITE TRANSACCIONES DE TIPO QR |
BP | TIEMPO EXCEDIDO PARA REALIZAR CANCELACIÓN |
BP | TRANSACCIÓN CON SUCURSAL NO INVALIDA |
BP | TRANSACCIÓN INVÁLIDA VISA |
BP | TRANSACCIÓN CON EMISOR NO PERMITIDO |
Q8 | TARJETA NO ACTIVA |
Q2 | TARJETA INVALIDA |
100 | DENEGADA |
101 | TARJETA VENCIDA / FECHA NO VALIDA |
106 | INTENTOS DE PIN EXCEDIDOS |
109 | COMERCIO NO VALIDO |
110 | MONTO NO VALIDO |
111 | CUENTA NO VALIDA |
115 | OPERATIVA NO VALIDA |
117 | PIN NO VALIDO |
119 | TARJETAHABIENTE NO ACTIVO |
122 | CODIGO DE SEGURIDAD NO VALIDO |
125 | FECHA NO VALIDA |
181 | ERROR DE SISTEMA |
183 | MONEDA NO VALIDA |
187 | TARJETA NO ACTIVA |
189 | COMERCIO NO VALIDO |
200 | TARJETA NO VALIDA |
909 | ERROR DE SISTEMA |
912 | EMISOR NO DISPONIBLE |
904 | DENEGADA |
914 | TRANSACCION ORIGINAL NO ENCONTRADA |
188 | CUENTA CANCELADA |
130 | PRUEBE CON OTRO DISPOSITIVO |