API PayIn

Check

checkPayment

Check payment status


/v2/payment/check

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
-H "Content-Type: application/x-www-form-urlencoded"\
"https://new-api.cinetpay.ci/v2/payment/check"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CheckApi;

import java.io.File;
import java.util.*;

public class CheckApiExample {

    public static void main(String[] args) {
        
        CheckApi apiInstance = new CheckApi();
        String apikey = apikey_example; // String | 
        String siteId = siteId_example; // String | 
        String transactionId = transactionId_example; // String | 
        try {
            CheckResponse result = apiInstance.checkPayment(apikey, siteId, transactionId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CheckApi#checkPayment");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CheckApi;

public class CheckApiExample {

    public static void main(String[] args) {
        CheckApi apiInstance = new CheckApi();
        String apikey = apikey_example; // String | 
        String siteId = siteId_example; // String | 
        String transactionId = transactionId_example; // String | 
        try {
            CheckResponse result = apiInstance.checkPayment(apikey, siteId, transactionId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CheckApi#checkPayment");
            e.printStackTrace();
        }
    }
}
String *apikey = apikey_example; // 
String *siteId = siteId_example; // 
String *transactionId = transactionId_example; // 

CheckApi *apiInstance = [[CheckApi alloc] init];

// Check payment status
[apiInstance checkPaymentWith:apikey
    siteId:siteId
    transactionId:transactionId
              completionHandler: ^(CheckResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ApiPayIn = require('api_pay_in');

var api = new ApiPayIn.CheckApi()
var apikey = apikey_example; // {{String}} 
var siteId = siteId_example; // {{String}} 
var transactionId = transactionId_example; // {{String}} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.checkPayment(apikeysiteIdtransactionId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class checkPaymentExample
    {
        public void main()
        {

            var apiInstance = new CheckApi();
            var apikey = apikey_example;  // String | 
            var siteId = siteId_example;  // String | 
            var transactionId = transactionId_example;  // String | 

            try
            {
                // Check payment status
                CheckResponse result = apiInstance.checkPayment(apikey, siteId, transactionId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CheckApi.checkPayment: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiCheckApi();
$apikey = apikey_example; // String | 
$siteId = siteId_example; // String | 
$transactionId = transactionId_example; // String | 

try {
    $result = $api_instance->checkPayment($apikey, $siteId, $transactionId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CheckApi->checkPayment: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CheckApi;

my $api_instance = WWW::SwaggerClient::CheckApi->new();
my $apikey = apikey_example; # String | 
my $siteId = siteId_example; # String | 
my $transactionId = transactionId_example; # String | 

eval { 
    my $result = $api_instance->checkPayment(apikey => $apikey, siteId => $siteId, transactionId => $transactionId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CheckApi->checkPayment: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.CheckApi()
apikey = apikey_example # String | 
siteId = siteId_example # String | 
transactionId = transactionId_example # String | 

try: 
    # Check payment status
    api_response = api_instance.check_payment(apikey, siteId, transactionId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CheckApi->checkPayment: %s\n" % e)

Parameters

Form parameters
Name Description
apikey*
String
Required
site_id*
String (integer)
Required
transaction_id*
String
Required

Responses

Status: 200 - payment status found

{"code":"662","message":"WAITING_CUSTOMER_PAYMENT","api_response_id":"1617808216.3631","data":{}}
{"code":"00","message":"SUCCES","api_response_id":"1617808789.7749","data":{"operator_id":"8210407187720","payment_method":"FLOOZ","payment_date":"2021-04-07 14:07:24","phone_number":"0102324373","phone_prefix":"225"}}
{"code":"600","message":"PAYMENT_FAILED","api_response_id":"1617808521.2503","data":{"payment_method":"OM","payment_date":" ","phone_number":"0749012966","phone_prefix":"225"}}

Status: 400 - bad request

{"code":"609","message":"AUTH_NOT_FOUND","description":"apikey does not belong to any merchant","api_response_id":"1617798204.1569"}
{"code":"613","message":"ERROR_SITE_ID_NOTVALID","description":"site_id does not belong to any merchant","api_response_id":"1617798204.1569"}
{"code":"608","message":"MINIMUM_REQUIRED_FIELDS","description":"transaction_id is mandatory","api_response_id":"1617798204.1569"}
{"code":"404","message":"NOT_FOUND","description":"Transaction is not found","api_response_id":"1617798204.1569"}

Init

initPayment

Get url payment for init it


/v2/payment

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
-H "Content-Type: application/x-www-form-urlencoded"\
"https://new-api.cinetpay.ci/v2/payment"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InitApi;

import java.io.File;
import java.util.*;

public class InitApiExample {

    public static void main(String[] args) {
        
        InitApi apiInstance = new InitApi();
        String apikey = apikey_example; // String | 
        String siteId = siteId_example; // String | 
        Integer amount = 56; // Integer | 
        String currency = currency_example; // String | 
        String transactionId = transactionId_example; // String | 
        BigDecimal description = 1.2; // BigDecimal | 
        String returnUrl = returnUrl_example; // String | 
        String notifyUrl = notifyUrl_example; // String | 
        try {
            InitResponse result = apiInstance.initPayment(apikey, siteId, amount, currency, transactionId, description, returnUrl, notifyUrl);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InitApi#initPayment");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InitApi;

public class InitApiExample {

    public static void main(String[] args) {
        InitApi apiInstance = new InitApi();
        String apikey = apikey_example; // String | 
        String siteId = siteId_example; // String | 
        Integer amount = 56; // Integer | 
        String currency = currency_example; // String | 
        String transactionId = transactionId_example; // String | 
        BigDecimal description = 1.2; // BigDecimal | 
        String returnUrl = returnUrl_example; // String | 
        String notifyUrl = notifyUrl_example; // String | 
        try {
            InitResponse result = apiInstance.initPayment(apikey, siteId, amount, currency, transactionId, description, returnUrl, notifyUrl);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InitApi#initPayment");
            e.printStackTrace();
        }
    }
}
String *apikey = apikey_example; // 
String *siteId = siteId_example; // 
Integer *amount = 56; // 
String *currency = currency_example; // 
String *transactionId = transactionId_example; // 
BigDecimal *description = 1.2; // 
String *returnUrl = returnUrl_example; // 
String *notifyUrl = notifyUrl_example; // 

InitApi *apiInstance = [[InitApi alloc] init];

// Get url payment for init it
[apiInstance initPaymentWith:apikey
    siteId:siteId
    amount:amount
    currency:currency
    transactionId:transactionId
    description:description
    returnUrl:returnUrl
    notifyUrl:notifyUrl
              completionHandler: ^(InitResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ApiPayIn = require('api_pay_in');

var api = new ApiPayIn.InitApi()
var apikey = apikey_example; // {{String}} 
var siteId = siteId_example; // {{String}} 
var amount = 56; // {{Integer}} 
var currency = currency_example; // {{String}} 
var transactionId = transactionId_example; // {{String}} 
var description = 1.2; // {{BigDecimal}} 
var returnUrl = returnUrl_example; // {{String}} 
var notifyUrl = notifyUrl_example; // {{String}} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.initPayment(apikeysiteIdamountcurrencytransactionIddescriptionreturnUrlnotifyUrl, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class initPaymentExample
    {
        public void main()
        {

            var apiInstance = new InitApi();
            var apikey = apikey_example;  // String | 
            var siteId = siteId_example;  // String | 
            var amount = 56;  // Integer | 
            var currency = currency_example;  // String | 
            var transactionId = transactionId_example;  // String | 
            var description = 1.2;  // BigDecimal | 
            var returnUrl = returnUrl_example;  // String | 
            var notifyUrl = notifyUrl_example;  // String | 

            try
            {
                // Get url payment for init it
                InitResponse result = apiInstance.initPayment(apikey, siteId, amount, currency, transactionId, description, returnUrl, notifyUrl);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InitApi.initPayment: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiInitApi();
$apikey = apikey_example; // String | 
$siteId = siteId_example; // String | 
$amount = 56; // Integer | 
$currency = currency_example; // String | 
$transactionId = transactionId_example; // String | 
$description = 1.2; // BigDecimal | 
$returnUrl = returnUrl_example; // String | 
$notifyUrl = notifyUrl_example; // String | 

try {
    $result = $api_instance->initPayment($apikey, $siteId, $amount, $currency, $transactionId, $description, $returnUrl, $notifyUrl);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InitApi->initPayment: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::InitApi;

my $api_instance = WWW::SwaggerClient::InitApi->new();
my $apikey = apikey_example; # String | 
my $siteId = siteId_example; # String | 
my $amount = 56; # Integer | 
my $currency = currency_example; # String | 
my $transactionId = transactionId_example; # String | 
my $description = 1.2; # BigDecimal | 
my $returnUrl = returnUrl_example; # String | 
my $notifyUrl = notifyUrl_example; # String | 

eval { 
    my $result = $api_instance->initPayment(apikey => $apikey, siteId => $siteId, amount => $amount, currency => $currency, transactionId => $transactionId, description => $description, returnUrl => $returnUrl, notifyUrl => $notifyUrl);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InitApi->initPayment: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.InitApi()
apikey = apikey_example # String | 
siteId = siteId_example # String | 
amount = 56 # Integer | 
currency = currency_example # String | 
transactionId = transactionId_example # String | 
description = 1.2 # BigDecimal | 
returnUrl = returnUrl_example # String | 
notifyUrl = notifyUrl_example # String | 

try: 
    # Get url payment for init it
    api_response = api_instance.init_payment(apikey, siteId, amount, currency, transactionId, description, returnUrl, notifyUrl)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InitApi->initPayment: %s\n" % e)

Parameters

Form parameters
Name Description
apikey*
String
Required
site_id*
String (integer)
Required
amount*
Integer
Required
currency*
String
Enum: XOF, XAF
Required
transaction_id*
String
Required
description*
BigDecimal
Required
return_url*
String (valid url)
Required
notify_url*
String (valid url)
Required

Responses

Status: 200 - url generated successfuly

{"code":"201","message":"CREATED","description":"Transaction created with success","api_response_id":"1617798204.1569","data":{"payment_token":"b293f07fc77a42016e6a8d669f9D7A0920da417099478a1a513a4367e8675888dc4893eb9b0de989745a981eed81e0aef77e0bc2040cf4","payment_url":"https://gateway.cinetpay.ci/payment/B293f07fc77a42016e6a8d669f9d7a0920da417099478a1a513a4367e8675888dc4893eb9b0de989745a981eed81e0aef77e0bc2040cf4"}}

Status: 400 - bad request

{"code":"608","message":"MINIMUM_REQUIRED_FIELDS","description":"currency must be either XOF or XAF","api_response_id":"1617798204.1569"}
{"code":"608","message":"MINIMUM_REQUIRED_FIELDS","description":"notify_url must be a valid url","api_response_id":"1617798204.1569"}
{"code":"609","message":"AUTH_NOT_FOUND","description":"apikey does not belong to any merchant","api_response_id":"1617798204.1569"}
{"code":"613","message":"ERROR_SITE_ID_NOTVALID","description":"site_id does not belong to any merchant","api_response_id":"1617798204.1569"}
{"code":"642","message":"ERROR_AMOUNT_TOO_HIGH","description":"maximum amount is 1500000","api_response_id":"1617798204.1569"}
{"code":"608","message":"MINIMUM_REQUIRED_FIELDS","description":"apikey is mandatory","api_response_id":"1617798204.1569"}
{"code":"641","message":"ERROR_AMOUNT_TOO_LOW","description":"minimum amount is 100","api_response_id":"1617798204.1569"}