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"}