API Summary / Issuers integration

Get started

Integration process

1.- Request your API Key and integration URL.

2.- Develop in a sandbox environment. This is the guide to do it.

3.- When you are ready, we will validate and certify your integration. At the end you will receive your API Key and URL of the production environment.

4.- Let's implement your development in production.

5.- Ready to receive cash payments with PayCash.



How to use

1.- Authenticate yourself as a user of the PayCash platform using the authre method. It is necessary to have your API Key to request a token, which will be used in the rest of the methods involved.

2.-To generate a PayCash references, simply request it through the reference method. This method will respond with the PayCash reference. Use the searchreference method to know the characteristics of the PayCash reference. If for any reason you need to cancel the PayCash references make use of the cancel method, only if it has no payments.

3.- Use payments method to check payments made to PayCash references.

Consuming API's

Get token / authre

To make requests to the PayCash API, it is necessary to have your private key, with this key you can obtain a token, which is required when making the request for any of the methods contained in this document. This private key is configured to be used either in sandbox or production mode. Make sure you never share your key with anyone, as they may have access to your PayCash account.

When making the request for the token, it is validated that the private key exists, is valid and corresponds to the sandbox or production environment.


/authre

Usage and SDK Samples

curl --location --request GET 'https://sb-api-pais-emisor.paycashglobal.com/v1/authre?key=' #It is necessary to replace 'pais' with your country in the URL.
//This example required the OkHttp library for JAVA
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
Request request = new Request.Builder()
  .url("https://sb-api-pais-emisor.paycashglobal.com/v1/authre?key=") //It is necessary to replace 'pais' with your country in the URL.
  .method("GET", null)
  .build();
Response response = client.newCall(request).execute();
import io.swagger.client.api.AuthreApi;

public class AuthreApiExample {

    public static void main(String[] args) {
        AuthreApi apiInstance = new AuthreApi();
        String key = key_example; // String | Unique key to business partner , from PayCash Global.
        String expirationdate = expirationdate_example; // String | Token expiration date.
        Boolean unique = true; // Boolean | Token type "unique".
        try {
            array[RespAuther] result = apiInstance.getToken(key, expirationdate, unique);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AuthreApi#getToken");
            e.printStackTrace();
        }
    }
}
//This example required the NSURLSession library for Obj-C
#import <Foundation/Foundation.h>

dispatch_semaphore_t sema = dispatch_semaphore_create(0);

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://sb-api-pais-emisor.paycashglobal.com/v1/authre?key="] //It is necessary to replace 'pais' with your country in the URL.
  cachePolicy:NSURLRequestUseProtocolCachePolicy
  timeoutInterval:10.0];

[request setHTTPMethod:@"GET"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
  if (error) {
    NSLog(@"%@", error);
    dispatch_semaphore_signal(sema);
  } else {
    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
    NSError *parseError = nil;
    NSDictionary *responseDictionary = [NSJSONSerialization JSONObjectWithData:data options:0 error:&parseError];
    NSLog(@"%@",responseDictionary);
    dispatch_semaphore_signal(sema);
  }
}];
[dataTask resume];
dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER);
var requestOptions = {
  method: 'GET',
  redirect: 'follow'
};

fetch("https://sb-api-pais-emisor.paycashglobal.com/v1/authre?key=", requestOptions) //It is necessary to replace 'pais' with your country in the URL.
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
//This example required the RestSharp library for C#
var client = new RestClient("https://sb-api-pais-emisor.paycashglobal.com/v1/authre?key="); //It is necessary to replace 'pais' with your country in the URL.
client.Timeout = -1;
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
//This example required the cURL library for PHP
$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://sb-api-pais-emisor.paycashglobal.com/v1/authre?key=', //It is necessary to replace 'pais' with your country in the URL.
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AuthreApi;

my $api_instance = WWW::SwaggerClient::AuthreApi->new();
my $key = key_example; # String | Unique key to business partner , from PayCash Global.
my $expirationdate = expirationdate_example; # String | Token expiration date.
my $unique = true; # Boolean | Token type "unique".

eval { 
    my $result = $api_instance->getToken(key => $key, expirationdate => $expirationdate, unique => $unique);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AuthreApi->getToken: $@\n";
}
#This example required the http.client library for Python
import http.client

conn = http.client.HTTPSConnection("sb-api-pais-emisor.paycashglobal.com") #It is necessary to replace 'pais' with your country in the URL.
payload = ''
headers = {}
conn.request("GET", "/v1/authre?key=", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))

Parameters

Header parameters
Name Description
key*
String
Unique key to business partner , from PayCash Global.
Required
Query parameters
Name Description
expirationdate
String (yyyy/MM/dd)
Token expiration date.
unique
Boolean
Token type "unique".

Responses

Status: 200 - Successful Process

Status: 400 - Internal Server Error.


Create reference / reference

Use this method to create a PayCash reference.

When using this method consider that PayCash references can be:

- Fixed amount or open amount.
- With or without expiration date.
- Single or recurring payment.
- That the above attributes can be combined.


/reference

Usage and SDK Samples

curl --location --request POST 'https://sb-api-pais-emisor.paycashglobal.com/v1/reference' \ #It is necessary to replace 'pais' with your country in the URL.
--header 'Authorization: ' \
--header 'Content-Type: application/json' \
--data-raw '{
    "Amount":"",
    "ExpirationDate":"",
    "Value":"",
    "Type":""
}'
//This example required the OkHttp library for JAVA
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n    \"Amount\":\"\",\r\n    \"ExpirationDate\":\"\",\r\n    \"Value\":\"\",\r\n    \"Type\":\"\"\r\n}");
Request request = new Request.Builder()
  .url("https://sb-api-pais-emisor.paycashglobal.com/v1/reference") //It is necessary to replace 'pais' with your country in the URL.
  .method("POST", body)
  .addHeader("Authorization", "")
  .addHeader("Content-Type", "application/json")
  .build();
Response response = client.newCall(request).execute();
import io.swagger.client.api.EmisorApi;

public class EmisorApiExample {

  public static void main(String[] args) {
      EmisorApi apiInstance = new EmisorApi();
      String authorization = authorization_example; // String | Token to business partner , from PayCash Global.
      BodyCreateRef body = ; // BodyCreateRef | por definir
      try {
          array[RespCreateRef] result = apiInstance.referenceCreate(authorization, body);
          System.out.println(result);
      } catch (ApiException e) {
          System.err.println("Exception when calling EmisorApi#referenceCreate");
          e.printStackTrace();
      }
  }
}
//This example required the NSURLSession library for Obj-C
#import <Foundation/Foundation.h>

dispatch_semaphore_t sema = dispatch_semaphore_create(0);

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://sb-api-pais-emisor.paycashglobal.com/v1/reference"] //It is necessary to replace 'pais' with your country in the URL.
  cachePolicy:NSURLRequestUseProtocolCachePolicy
  timeoutInterval:10.0];
NSDictionary *headers = @{
  @"Authorization": @"",
  @"Content-Type": @"application/json"
};

[request setAllHTTPHeaderFields:headers];
NSData *postData = [[NSData alloc] initWithData:[@"{\r\n    \"Amount\":\"\",\r\n    \"ExpirationDate\":\"\",\r\n    \"Value\":\"\",\r\n    \"Type\":\"\"\r\n}" dataUsingEncoding:NSUTF8StringEncoding]];
[request setHTTPBody:postData];

[request setHTTPMethod:@"POST"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
  if (error) {
    NSLog(@"%@", error);
    dispatch_semaphore_signal(sema);
  } else {
    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
    NSError *parseError = nil;
    NSDictionary *responseDictionary = [NSJSONSerialization JSONObjectWithData:data options:0 error:&parseError];
    NSLog(@"%@",responseDictionary);
    dispatch_semaphore_signal(sema);
  }
}];
[dataTask resume];
dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER);
var myHeaders = new Headers();
myHeaders.append("Authorization", "");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "Amount": "",
  "ExpirationDate": "",
  "Value": "",
  "Type": ""
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://sb-api-pais-emisor.paycashglobal.com/v1/reference", requestOptions) //It is necessary to replace 'pais' with your country in the URL.
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
//This example required the RestSharp library for C#
var client = new RestClient("https://sb-api-pais-emisor.paycashglobal.com/v1/reference"); //It is necessary to replace 'pais' with your country in the URL.
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "");
request.AddHeader("Content-Type", "application/json");
var body = @"{
" + "\n" +
@"    ""Amount"":"""",
" + "\n" +
@"    ""ExpirationDate"":"""",
" + "\n" +
@"    ""Value"":"""",
" + "\n" +
@"    ""Type"":""""
" + "\n" +
@"}";
request.AddParameter("application/json", body,  ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
//This example required the cURL library for PHP
$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://sb-api-pais-emisor.paycashglobal.com/v1/reference', //It is necessary to replace 'pais' with your country in the URL.
  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 =>'{
    "Amount":"",
    "ExpirationDate":"",
    "Value":"",
    "Type":""
}',
  CURLOPT_HTTPHEADER => array(
    'Authorization: ',
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::EmisorApi;

my $api_instance = WWW::SwaggerClient::EmisorApi->new();
my $authorization = authorization_example; # String | Token to business partner , from PayCash Global.
my $body = WWW::SwaggerClient::Object::BodyCreateRef->new(); # BodyCreateRef | por definir

eval { 
  my $result = $api_instance->referenceCreate(authorization => $authorization, body => $body);
  print Dumper($result);
};
if ($@) {
  warn "Exception when calling EmisorApi->referenceCreate: $@\n";
}
#This example required the http.client library for Python
import http.client
import json

conn = http.client.HTTPSConnection("sb-api-pais-emisor.paycashglobal.com") #It is necessary to replace 'pais' with your country in the URL.
payload = json.dumps({
  "Amount": "",
  "ExpirationDate": "",
  "Value": "",
  "Type": ""
})
headers = {
  'Authorization': '',
  'Content-Type': 'application/json'
}
conn.request("POST", "/v1/reference", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))

Parameters

Header parameters
Name Description
authorization*
String
Token obtained when authenticating. Result of executing the method to obtain the token (authre).
Required
Body parameters
Name Description
body

Responses

Status: 200 - Successful Process

Status: 400 - Internal Server Error.


Search reference / search

Use this method to find a PayCash reference.

This method provides an overview of how the reference was created:

- If it is a fixed or open amount.
- With or without expiration date.
- If it is a one-time or recurring payment.
- Amount, creation date, if it is active or canceled, etc.


/search

Usage and SDK Samples

curl --location --request GET 'https://sb-api-pais-emisor.paycashglobal.com/v1/search?Reference=' \ #It is necessary to replace 'pais' with your country in the URL.
--header 'Authorization: '
//This example required the OkHttp library for JAVA
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
Request request = new Request.Builder()
  .url("https://sb-api-pais-emisor.paycashglobal.com/v1/search?Reference=") //It is necessary to replace 'pais' with your country in the URL.
  .method("GET", null)
  .addHeader("Authorization", "")
  .build();
Response response = client.newCall(request).execute();
import io.swagger.client.api.EmisorApi;

public class EmisorApiExample {

  public static void main(String[] args) {
      EmisorApi apiInstance = new EmisorApi();
      String authorization = authorization_example; // String | Token to business partner , from PayCash Global.
      String reference = reference_example; // String | Reference to cancel
      try {
          array[RespSearchRef] result = apiInstance.searchReference(authorization, reference);
          System.out.println(result);
      } catch (ApiException e) {
          System.err.println("Exception when calling EmisorApi#searchReference");
          e.printStackTrace();
      }
  }
}
//This example required the NSURLSession library for Obj-C
#import <Foundation/Foundation.h>

dispatch_semaphore_t sema = dispatch_semaphore_create(0);

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://sb-api-pais-emisor.paycashglobal.com/v1/search?Reference="] //It is necessary to replace 'pais' with your country in the URL.
  cachePolicy:NSURLRequestUseProtocolCachePolicy
  timeoutInterval:10.0];
NSDictionary *headers = @{
  @"Authorization": @""
};

[request setAllHTTPHeaderFields:headers];

[request setHTTPMethod:@"GET"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
  if (error) {
    NSLog(@"%@", error);
    dispatch_semaphore_signal(sema);
  } else {
    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
    NSError *parseError = nil;
    NSDictionary *responseDictionary = [NSJSONSerialization JSONObjectWithData:data options:0 error:&parseError];
    NSLog(@"%@",responseDictionary);
    dispatch_semaphore_signal(sema);
  }
}];
[dataTask resume];
dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER);
var myHeaders = new Headers();
myHeaders.append("Authorization", "");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://sb-api-pais-emisor.paycashglobal.com/v1/search?Reference=", requestOptions) //It is necessary to replace 'pais' with your country in the URL.
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
//This example required the RestSharp library for C#
var client = new RestClient("https://sb-api-pais-emisor.paycashglobal.com/v1/search?Reference="); //It is necessary to replace 'pais' with your country in the URL.
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
//This example required the cURL library for PHP
$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://sb-api-pais-emisor.paycashglobal.com/v1/search?Reference=', //It is necessary to replace 'pais' with your country in the URL.
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: '
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::EmisorApi;

my $api_instance = WWW::SwaggerClient::EmisorApi->new();
my $authorization = authorization_example; # String | Token to business partner , from PayCash Global.
my $reference = reference_example; # String | Reference to cancel

eval { 
  my $result = $api_instance->searchReference(authorization => $authorization, reference => $reference);
  print Dumper($result);
};
if ($@) {
  warn "Exception when calling EmisorApi->searchReference: $@\n";
}
#This example required the http.client library for Python
import http.client

conn = http.client.HTTPSConnection("sb-api-pais-emisor.paycashglobal.com") #It is necessary to replace 'pais' with your country in the URL.
payload = ''
headers = {
  'Authorization': ''
}
conn.request("GET", "/v1/search?Reference=", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))

Parameters

Header parameters
Name Description
authorization*
String
Token obtained when authenticating. Result of executing the method to obtain the token (authre).
Required
Query parameters
Name Description
Reference
String
Reference to search

Responses

Status: 200 - Successful Process

Status: 400 - Internal Server Error.


Cancel reference / cancel

Use this method to cancel a created referral.

Using this method validates the following from the reference:

-That belongs to the issuer.
-That is not paid.
-That is not previously canceled.


/cancel

Usage and SDK Samples

curl --location --request POST 'https://sb-api-pais-emisor.paycashglobal.com/v1/cancel' \ #It is necessary to replace 'pais' with your country in the URL.
--header 'Authorization: ' \
--header 'Content-Type: application/json' \
--data-raw '{
    "Reference": ""
}'
//This example required the OkHttp library for JAVA
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n    \"Reference\":\"\"\r\n}");
Request request = new Request.Builder()
  .url("https://sb-api-pais-emisor.paycashglobal.com/v1/cancel") //It is necessary to replace 'pais' with your country in the URL.
  .method("POST", body)
  .addHeader("Authorization", "")
  .addHeader("Content-Type", "application/json")
  .build();
Response response = client.newCall(request).execute();
import io.swagger.client.api.EmisorApi;

public class EmisorApiExample {

    public static void main(String[] args) {
        EmisorApi apiInstance = new EmisorApi();
        String authorization = authorization_example; // String | Token to business partner , from PayCash Global.
        String reference = reference_example; // String | Reference to cancel
        try {
            array[RespCancelRef] result = apiInstance.referenceCancel(authorization, reference);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling EmisorApi#referenceCancel");
            e.printStackTrace();
        }
    }
}
//This example required the NSURLSession library for Obj-C
#import <Foundation/Foundation.h>

dispatch_semaphore_t sema = dispatch_semaphore_create(0);

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://sb-api-pais-emisor.paycashglobal.com/v1/cancel"] //It is necessary to replace 'pais' with your country in the URL.
  cachePolicy:NSURLRequestUseProtocolCachePolicy
  timeoutInterval:10.0];
NSDictionary *headers = @{
  @"Authorization": @"",
  @"Content-Type": @"application/json"
};

[request setAllHTTPHeaderFields:headers];
NSData *postData = [[NSData alloc] initWithData:[@"{\r\n    \"Reference\":\"\"\r\n}" dataUsingEncoding:NSUTF8StringEncoding]];
[request setHTTPBody:postData];

[request setHTTPMethod:@"POST"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
  if (error) {
    NSLog(@"%@", error);
    dispatch_semaphore_signal(sema);
  } else {
    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
    NSError *parseError = nil;
    NSDictionary *responseDictionary = [NSJSONSerialization JSONObjectWithData:data options:0 error:&parseError];
    NSLog(@"%@",responseDictionary);
    dispatch_semaphore_signal(sema);
  }
}];
[dataTask resume];
dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER);
var myHeaders = new Headers();
myHeaders.append("Authorization", "");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "Reference": ""
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://sb-api-pais-emisor.paycashglobal.com/v1/cancel", requestOptions) //It is necessary to replace 'pais' with your country in the URL.
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
//This example required the RestSharp library for C#
var client = new RestClient("https://sb-api-pais-emisor.paycashglobal.com/v1/cancel"); //It is necessary to replace 'pais' with your country in the URL.
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "");
request.AddHeader("Content-Type", "application/json");
var body = @"{
" + "\n" +
@"    ""Reference"":""""
" + "\n" +
@"}";
request.AddParameter("application/json", body,  ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
//This example required the cURL library for PHP
$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://sb-api-pais-emisor.paycashglobal.com/v1/cancel', //It is necessary to replace 'pais' with your country in the URL.
  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 =>'{
    "Reference":""
}',
  CURLOPT_HTTPHEADER => array(
    'Authorization: ',
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::EmisorApi;

my $api_instance = WWW::SwaggerClient::EmisorApi->new();
my $authorization = authorization_example; # String | Token to business partner , from PayCash Global.
my $reference = reference_example; # String | Reference to cancel

eval { 
    my $result = $api_instance->referenceCancel(authorization => $authorization, reference => $reference);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling EmisorApi->referenceCancel: $@\n";
}
#This example required the http.client library for Python
import http.client
import json

conn = http.client.HTTPSConnection("sb-api-pais-emisor.paycashglobal.com") #It is necessary to replace 'pais' with your country in the URL.
payload = json.dumps({
  "Reference": ""
})
headers = {
  'Authorization': '',
  'Content-Type': 'application/json'
}
conn.request("POST", "/v1/cancel", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))

Parameters

Header parameters
Name Description
authorization*
String
Token obtained when authenticating. Result of executing the method to obtain the token (authre).
Required
Body Json
Name Description
Reference
String
PayCash reference to cancel.

Responses

Status: 200 - Successful Process

Status: 400 - Internal Server Error.


Check payments / payments

Check referral payments made on a specific date from one hour on.

This method is generally used when the issuer is interested in knowing if their referrals have already been paid.
It is up to the issuer to implement this search mechanism.
For this scenario, it is recommended to request the enablement of the automatic payment notification through webHooks.


/payments

Usage and SDK Samples

curl --location --request GET 'https://sb-api-pais-emisor.paycashglobal.com/v1/payments?Date=&Hour=' \ #It is necessary to replace 'pais' with your country in the URL.
--header 'Authorization: '
//This example required the OkHttp library for JAVA
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
Request request = new Request.Builder()
  .url("https://sb-api-pais-emisor.paycashglobal.com/v1/payments?Date=&Hour=") //It is necessary to replace 'pais' with your country in the URL.
  .method("GET", null)
  .addHeader("Authorization", "")
  .build();
Response response = client.newCall(request).execute();
import io.swagger.client.api.EmisorApi;
  
  public class EmisorApiExample { 
      public static void main(String[] args) {
          EmisorApi apiInstance = new EmisorApi();
          String authorization = authorization_example; // String | Token to business partner , from PayCash Global.
          String Date = date_example; // String | Date to yyyy-mm-dd
          String Hour = hour_example; // String | Hour to HH:MM:ss 
          try {
              array[RespPayments] result = apiInstance.Payments(authorization,Date,Hour);
              System.out.println(result);
          } catch (ApiException e) {
              System.err.println("Exception when calling EmisorApi#Payments");
              e.printStackTrace();
          }
      }
  }
//This example required the NSURLSession library for Obj-C
#import <Foundation/Foundation.h>

dispatch_semaphore_t sema = dispatch_semaphore_create(0);

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://sb-api-pais-emisor.paycashglobal.com/v1/payments?Date=&Hour="] //It is necessary to replace 'pais' with your country in the URL.
  cachePolicy:NSURLRequestUseProtocolCachePolicy
  timeoutInterval:10.0];
NSDictionary *headers = @{
  @"Authorization": @""
};

[request setAllHTTPHeaderFields:headers];

[request setHTTPMethod:@"GET"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
  if (error) {
    NSLog(@"%@", error);
    dispatch_semaphore_signal(sema);
  } else {
    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
    NSError *parseError = nil;
    NSDictionary *responseDictionary = [NSJSONSerialization JSONObjectWithData:data options:0 error:&parseError];
    NSLog(@"%@",responseDictionary);
    dispatch_semaphore_signal(sema);
  }
}];
[dataTask resume];
dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER);
var myHeaders = new Headers();
myHeaders.append("Authorization", "");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://sb-api-pais-emisor.paycashglobal.com/v1/payments?Date=&Hour=", requestOptions) //It is necessary to replace 'pais' with your country in the URL.
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
//This example required the RestSharp library for C#
var client = new RestClient("https://sb-api-pais-emisor.paycashglobal.com/v1/payments?Date=&Hour="); //It is necessary to replace 'pais' with your country in the URL.
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
//This example required the cURL library for PHP
$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://sb-api-pais-emisor.paycashglobal.com/v1/payments?Date=&Hour=', //It is necessary to replace 'pais' with your country in the URL.
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: '
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
use Data::Dumper;
  use WWW::SwaggerClient::Configuration;
  use WWW::SwaggerClient::EmisorApi;
  
  my $api_instance = WWW::SwaggerClient::EmisorApi->new();
  my $authorization = authorization_example; # String | Token to business partner , from PayCash Global.
  my $Date = date_example; # String | Date to yyyy-mm-dd
  my $Hour = date_example; # String | Hour to HH:MM:ss
  
  eval { 
      my $result = $api_instance->Payments(authorization => $authorization, Date => $date,Hour => $hour);
      print Dumper($result);
  };
  if ($@) {
      warn "Exception when calling EmisorApi->Payments: $@\n";
  }
#This example required the http.client library for Python
import http.client

conn = http.client.HTTPSConnection("sb-api-pais-emisor.paycashglobal.com") #It is necessary to replace 'pais' with your country in the URL.
payload = ''
headers = {
  'Authorization': ''
}
conn.request("GET", "/v1/payments?Date=&Hour=", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))

Parameters

Header parameters
Name Description
authorization*
String
Token obtained when authenticating. Result of executing the method to obtain the token (authre).
Required
Query parameters
Name Description
Date
String
Date on which you want to check the payments.
-Format: YYYY-mm-dd
Required
Hour
String
Time from which the payment inquiry is made.
-Format: hh:mm:ss
Required

Responses

Status: 200 - Successful Process

Status: 400 - Internal Server Error.

Response codes

API REST México

Purpose

Identify the response codes that exist for each method.

The following table shows the response codes that exist for each method.

No. Method Code Reply message
1 Authre 0 Operacion Exitosa.
2 111 Error General. El acceso para generar el token es invalido.
3 111 Error General. Llave de usuario es invalida.
4 Cancel 0 Operacion Exitosa.
5 51 existe un pago confirmado, no se puede cancelar
6 61 la operacion no existe.
7 71 la operacion ha sido previamente cancelada.
8 Search 0 Operacion Exitosa.
9 102 Error General. AuthCode es invalido.
10 102 Error General. AuthCode Estatus invalido.
11 102 Error General. AuthCode type es invalido.
12 102 Error General. AuthCode ha expirado.
13 102 Error General. Referencia invalida.
14 102 Error General. Referencia no corresponde al Emisor.
15 102 Error General. El emisor indicado no es valido.
16 102 Error General. Estatus de emisor invalido.
17 Reference 0 Operacion Exitosa.
18 22 El emisor indicado no es valido.
19 23 Error en tipo de referencia, por favor verifique datos.
20 24 Error. No es posible generar la referencia.
21 25 Monto invalido, monto superior al maximo configurado.
22 Reversepayment SC 0 Operacion Exitosa.
23 0 El pago ya fue procesado.
24 50 Operacion invalida o previamente cancelada.
25 50 Tiempo maximo para reverso ha expirado.
26 61 La operacion no existe.
27 71 La operacion no existe.
28 API 150 Error Service.
Note: Error messages are intentionally displayed without accents.



API REST Latam

Purpose

Identify the response codes that exist for each method.

The following table shows the response codes that exist for each method.

No. Method Code Reply message
1 Authre 0 Operacion Exitosa.
2 111 Error General. El acceso para generar el token es invalido.
3 111 Error General. Llave de usuario es invalida.
4 Reference 0 Operacion Exitosa.
5 101 Error General. AuthCode es invalido.
6 101 Error General. AuthCode Estatus invalido.
7 101 Error General. AuthCode type es invalido.
8 101 Error General. AuthCode ha expirado.
9 101 Error General. El emisor indicado no es valido.
10 101 Error General. Estatus de emisor invalido.
11 101 Error General. El pais indicado no es valido.
12 101 Error General. Estatus de pais invalido.
13 101 Error General. Parametro invalido.
14 101 Error General. Monto Invalido, Monto superior al maximo configurado.
15 101 Error General. Referencia Invalida o duplicada.
16 Search 0 Operacion Exitosa.
17 102 Error General. Authcode es invalido.
18 102 Error General. AuthCode Estatus invalido.
19 102 Error General. AuthCode type es invalido.
20 102 Error General. Referencia invalida.
21 102 Error General. Referencia invalida.
22 102 Error General. El emisor indicado no es valido.
23 102 Error General. Estatus del emisor invalido.
24 Cancel 0 Operacion Exitosa.
25 102 Error General. AuthCode es invalido.
26 102 Error General. AuthCode Estatus invalido.
27 102 Error General. AuthCode ha expirado.
28 102 Error General. Referencia invalida.
29 102 Error General. Referencia con Estatus no valido.
30 102 Error General. Referencia no corresponde al emisor.
31 102 Error General. El emisor indicado no es valido.
32 102 Error General. Estatus del emisor invalido.
33 102 Error General. Referencia previamente eliminada.
34 Payments 0 Operacion Exitosa.
35 105 Error General. AuthCode es invalido.
36 105 Error General. AuthCode Estatus invalido.
37 105 Error General. AuthCode type es invalido.
38 105 Error General. AuthCode ha expirado.
39 105 Error General. Comercio indicado no es valido.
40 105 Error General. Estatus de cadena invalido.
41 105 Error General. La operación no existe.
42 API 150 Error Service.
Note: Error messages are intentionally displayed without accents.