Pay.ir

Callback

yourCallBackURLGet

مرحله سوم : بازگشت به سایت پذیرنده


/{Your-CallBack-URL}

Usage and SDK Samples

curl -X GET "https://api.apieco.ir/pay-ir/{Your-CallBack-URL}?status=&token="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CallbackApi;

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

public class CallbackApiExample {

    public static void main(String[] args) {
        
        CallbackApi apiInstance = new CallbackApi();
        String apiecoKey = apiecoKey_example; // String | apikey for use API
        String yourCallBackURL = yourCallBackURL_example; // String | The only supported `index` is `cedarmaps.streets`
        String point = point_example; // String | point format is lat,lon
        String status = status_example; // String | transaction_status
        String token = token_example; // String | token
        try {
            apiInstance.yourCallBackURLGet(apiecoKey, yourCallBackURL, point, status, token);
        } catch (ApiException e) {
            System.err.println("Exception when calling CallbackApi#yourCallBackURLGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CallbackApi;

public class CallbackApiExample {

    public static void main(String[] args) {
        CallbackApi apiInstance = new CallbackApi();
        String apiecoKey = apiecoKey_example; // String | apikey for use API
        String yourCallBackURL = yourCallBackURL_example; // String | The only supported `index` is `cedarmaps.streets`
        String point = point_example; // String | point format is lat,lon
        String status = status_example; // String | transaction_status
        String token = token_example; // String | token
        try {
            apiInstance.yourCallBackURLGet(apiecoKey, yourCallBackURL, point, status, token);
        } catch (ApiException e) {
            System.err.println("Exception when calling CallbackApi#yourCallBackURLGet");
            e.printStackTrace();
        }
    }
}
String *apiecoKey = apiecoKey_example; // apikey for use API (default to WsLdHK46I5Wfr5xgI0ynjjyiw9Fyhydu)
String *yourCallBackURL = yourCallBackURL_example; // The only supported `index` is `cedarmaps.streets`
String *point = point_example; // point format is lat,lon
String *status = status_example; // transaction_status
String *token = token_example; // token

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

// مرحله سوم : بازگشت به سایت پذیرنده
[apiInstance yourCallBackURLGetWith:apiecoKey
    yourCallBackURL:yourCallBackURL
    point:point
    status:status
    token:token
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Payir = require('payir');

var api = new Payir.CallbackApi()

var apiecoKey = apiecoKey_example; // {String} apikey for use API

var yourCallBackURL = yourCallBackURL_example; // {String} The only supported `index` is `cedarmaps.streets`

var point = point_example; // {String} point format is lat,lon

var status = status_example; // {String} transaction_status

var token = token_example; // {String} token


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.yourCallBackURLGet(apiecoKey, yourCallBackURL, point, status, token, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class yourCallBackURLGetExample
    {
        public void main()
        {
            
            var apiInstance = new CallbackApi();
            var apiecoKey = apiecoKey_example;  // String | apikey for use API (default to WsLdHK46I5Wfr5xgI0ynjjyiw9Fyhydu)
            var yourCallBackURL = yourCallBackURL_example;  // String | The only supported `index` is `cedarmaps.streets`
            var point = point_example;  // String | point format is lat,lon
            var status = status_example;  // String | transaction_status
            var token = token_example;  // String | token

            try
            {
                // مرحله سوم : بازگشت به سایت پذیرنده
                apiInstance.yourCallBackURLGet(apiecoKey, yourCallBackURL, point, status, token);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CallbackApi.yourCallBackURLGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\CallbackApi();
$apiecoKey = apiecoKey_example; // String | apikey for use API
$yourCallBackURL = yourCallBackURL_example; // String | The only supported `index` is `cedarmaps.streets`
$point = point_example; // String | point format is lat,lon
$status = status_example; // String | transaction_status
$token = token_example; // String | token

try {
    $api_instance->yourCallBackURLGet($apiecoKey, $yourCallBackURL, $point, $status, $token);
} catch (Exception $e) {
    echo 'Exception when calling CallbackApi->yourCallBackURLGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CallbackApi;

my $api_instance = WWW::SwaggerClient::CallbackApi->new();
my $apiecoKey = apiecoKey_example; # String | apikey for use API
my $yourCallBackURL = yourCallBackURL_example; # String | The only supported `index` is `cedarmaps.streets`
my $point = point_example; # String | point format is lat,lon
my $status = status_example; # String | transaction_status
my $token = token_example; # String | token

eval { 
    $api_instance->yourCallBackURLGet(apiecoKey => $apiecoKey, yourCallBackURL => $yourCallBackURL, point => $point, status => $status, token => $token);
};
if ($@) {
    warn "Exception when calling CallbackApi->yourCallBackURLGet: $@\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.CallbackApi()
apiecoKey = apiecoKey_example # String | apikey for use API (default to WsLdHK46I5Wfr5xgI0ynjjyiw9Fyhydu)
yourCallBackURL = yourCallBackURL_example # String | The only supported `index` is `cedarmaps.streets`
point = point_example # String | point format is lat,lon
status = status_example # String | transaction_status
token = token_example # String | token

try: 
    # مرحله سوم : بازگشت به سایت پذیرنده
    api_instance.your_call_back_url_get(apiecoKey, yourCallBackURL, point, status, token)
except ApiException as e:
    print("Exception when calling CallbackApi->yourCallBackURLGet: %s\n" % e)

Parameters

Path parameters
Name Description
Your-CallBack-URL*
String
The only supported `index` is `cedarmaps.streets`
Required
point*
String
point format is lat,lon
Required
Header parameters
Name Description
apieco-key*
String
apikey for use API
Required
Query parameters
Name Description
status*
String
transaction_status
Required
token*
String
token
Required

Responses

Status: 200 - 200 response


Redirect

pgTokenGet

مرحله دوم : انتقال کاربر به صفحه پرداخت


/pg/{token}

Usage and SDK Samples

curl -X GET "https://api.apieco.ir/pay-ir/pg/{token}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RedirectApi;

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

public class RedirectApiExample {

    public static void main(String[] args) {
        
        RedirectApi apiInstance = new RedirectApi();
        String apiecoKey = apiecoKey_example; // String | apikey for use API
        String token = token_example; // String | The only supported `index` is `cedarmaps.streets`
        try {
            apiInstance.pgTokenGet(apiecoKey, token);
        } catch (ApiException e) {
            System.err.println("Exception when calling RedirectApi#pgTokenGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RedirectApi;

public class RedirectApiExample {

    public static void main(String[] args) {
        RedirectApi apiInstance = new RedirectApi();
        String apiecoKey = apiecoKey_example; // String | apikey for use API
        String token = token_example; // String | The only supported `index` is `cedarmaps.streets`
        try {
            apiInstance.pgTokenGet(apiecoKey, token);
        } catch (ApiException e) {
            System.err.println("Exception when calling RedirectApi#pgTokenGet");
            e.printStackTrace();
        }
    }
}
String *apiecoKey = apiecoKey_example; // apikey for use API (default to WsLdHK46I5Wfr5xgI0ynjjyiw9Fyhydu)
String *token = token_example; // The only supported `index` is `cedarmaps.streets`

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

// مرحله دوم : انتقال کاربر به صفحه پرداخت
[apiInstance pgTokenGetWith:apiecoKey
    token:token
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Payir = require('payir');

var api = new Payir.RedirectApi()

var apiecoKey = apiecoKey_example; // {String} apikey for use API

var token = token_example; // {String} The only supported `index` is `cedarmaps.streets`


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.pgTokenGet(apiecoKey, token, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class pgTokenGetExample
    {
        public void main()
        {
            
            var apiInstance = new RedirectApi();
            var apiecoKey = apiecoKey_example;  // String | apikey for use API (default to WsLdHK46I5Wfr5xgI0ynjjyiw9Fyhydu)
            var token = token_example;  // String | The only supported `index` is `cedarmaps.streets`

            try
            {
                // مرحله دوم : انتقال کاربر به صفحه پرداخت
                apiInstance.pgTokenGet(apiecoKey, token);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RedirectApi.pgTokenGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\RedirectApi();
$apiecoKey = apiecoKey_example; // String | apikey for use API
$token = token_example; // String | The only supported `index` is `cedarmaps.streets`

try {
    $api_instance->pgTokenGet($apiecoKey, $token);
} catch (Exception $e) {
    echo 'Exception when calling RedirectApi->pgTokenGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RedirectApi;

my $api_instance = WWW::SwaggerClient::RedirectApi->new();
my $apiecoKey = apiecoKey_example; # String | apikey for use API
my $token = token_example; # String | The only supported `index` is `cedarmaps.streets`

eval { 
    $api_instance->pgTokenGet(apiecoKey => $apiecoKey, token => $token);
};
if ($@) {
    warn "Exception when calling RedirectApi->pgTokenGet: $@\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.RedirectApi()
apiecoKey = apiecoKey_example # String | apikey for use API (default to WsLdHK46I5Wfr5xgI0ynjjyiw9Fyhydu)
token = token_example # String | The only supported `index` is `cedarmaps.streets`

try: 
    # مرحله دوم : انتقال کاربر به صفحه پرداخت
    api_instance.pg_token_get(apiecoKey, token)
except ApiException as e:
    print("Exception when calling RedirectApi->pgTokenGet: %s\n" % e)

Parameters

Path parameters
Name Description
token*
String
The only supported `index` is `cedarmaps.streets`
Required
Header parameters
Name Description
apieco-key*
String
apikey for use API
Required

Responses

Status: 200 - 200 response


Send

pgSendPost

مرحله اول : ارسال دیتا


/pg/send

Usage and SDK Samples

curl -X POST "https://api.apieco.ir/pay-ir/pg/send"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SendApi;

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

public class SendApiExample {

    public static void main(String[] args) {
        
        SendApi apiInstance = new SendApi();
        String apiecoKey = apiecoKey_example; // String | apikey for use API
        Body body = ; // Body | 
        try {
            inline_response_200 result = apiInstance.pgSendPost(apiecoKey, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SendApi#pgSendPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SendApi;

public class SendApiExample {

    public static void main(String[] args) {
        SendApi apiInstance = new SendApi();
        String apiecoKey = apiecoKey_example; // String | apikey for use API
        Body body = ; // Body | 
        try {
            inline_response_200 result = apiInstance.pgSendPost(apiecoKey, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SendApi#pgSendPost");
            e.printStackTrace();
        }
    }
}
String *apiecoKey = apiecoKey_example; // apikey for use API (default to WsLdHK46I5Wfr5xgI0ynjjyiw9Fyhydu)
Body *body = ; //  (optional)

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

// مرحله اول : ارسال دیتا
[apiInstance pgSendPostWith:apiecoKey
    body:body
              completionHandler: ^(inline_response_200 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Payir = require('payir');

var api = new Payir.SendApi()

var apiecoKey = apiecoKey_example; // {String} apikey for use API

var opts = { 
  'body':  // {Body} 
};

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

namespace Example
{
    public class pgSendPostExample
    {
        public void main()
        {
            
            var apiInstance = new SendApi();
            var apiecoKey = apiecoKey_example;  // String | apikey for use API (default to WsLdHK46I5Wfr5xgI0ynjjyiw9Fyhydu)
            var body = new Body(); // Body |  (optional) 

            try
            {
                // مرحله اول : ارسال دیتا
                inline_response_200 result = apiInstance.pgSendPost(apiecoKey, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SendApi.pgSendPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\SendApi();
$apiecoKey = apiecoKey_example; // String | apikey for use API
$body = ; // Body | 

try {
    $result = $api_instance->pgSendPost($apiecoKey, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SendApi->pgSendPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SendApi;

my $api_instance = WWW::SwaggerClient::SendApi->new();
my $apiecoKey = apiecoKey_example; # String | apikey for use API
my $body = WWW::SwaggerClient::Object::Body->new(); # Body | 

eval { 
    my $result = $api_instance->pgSendPost(apiecoKey => $apiecoKey, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SendApi->pgSendPost: $@\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.SendApi()
apiecoKey = apiecoKey_example # String | apikey for use API (default to WsLdHK46I5Wfr5xgI0ynjjyiw9Fyhydu)
body =  # Body |  (optional)

try: 
    # مرحله اول : ارسال دیتا
    api_response = api_instance.pg_send_post(apiecoKey, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SendApi->pgSendPost: %s\n" % e)

Parameters

Header parameters
Name Description
apieco-key*
String
apikey for use API
Required
Body parameters
Name Description
body

Responses

Status: 200 - 200 response

Status: 422 - HTTP/1.1 422 Error


Verify

pgVerifyPost

مرحله چهارم : وریفای تراکنش


/pg/verify

Usage and SDK Samples

curl -X POST "https://api.apieco.ir/pay-ir/pg/verify"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.VerifyApi;

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

public class VerifyApiExample {

    public static void main(String[] args) {
        
        VerifyApi apiInstance = new VerifyApi();
        String apiecoKey = apiecoKey_example; // String | apikey for use API
        Body_1 body = ; // Body_1 | 
        try {
            inline_response_200_1 result = apiInstance.pgVerifyPost(apiecoKey, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling VerifyApi#pgVerifyPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.VerifyApi;

public class VerifyApiExample {

    public static void main(String[] args) {
        VerifyApi apiInstance = new VerifyApi();
        String apiecoKey = apiecoKey_example; // String | apikey for use API
        Body_1 body = ; // Body_1 | 
        try {
            inline_response_200_1 result = apiInstance.pgVerifyPost(apiecoKey, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling VerifyApi#pgVerifyPost");
            e.printStackTrace();
        }
    }
}
String *apiecoKey = apiecoKey_example; // apikey for use API (default to WsLdHK46I5Wfr5xgI0ynjjyiw9Fyhydu)
Body_1 *body = ; //  (optional)

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

// مرحله چهارم : وریفای تراکنش
[apiInstance pgVerifyPostWith:apiecoKey
    body:body
              completionHandler: ^(inline_response_200_1 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Payir = require('payir');

var api = new Payir.VerifyApi()

var apiecoKey = apiecoKey_example; // {String} apikey for use API

var opts = { 
  'body':  // {Body_1} 
};

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

namespace Example
{
    public class pgVerifyPostExample
    {
        public void main()
        {
            
            var apiInstance = new VerifyApi();
            var apiecoKey = apiecoKey_example;  // String | apikey for use API (default to WsLdHK46I5Wfr5xgI0ynjjyiw9Fyhydu)
            var body = new Body_1(); // Body_1 |  (optional) 

            try
            {
                // مرحله چهارم : وریفای تراکنش
                inline_response_200_1 result = apiInstance.pgVerifyPost(apiecoKey, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling VerifyApi.pgVerifyPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\VerifyApi();
$apiecoKey = apiecoKey_example; // String | apikey for use API
$body = ; // Body_1 | 

try {
    $result = $api_instance->pgVerifyPost($apiecoKey, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling VerifyApi->pgVerifyPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::VerifyApi;

my $api_instance = WWW::SwaggerClient::VerifyApi->new();
my $apiecoKey = apiecoKey_example; # String | apikey for use API
my $body = WWW::SwaggerClient::Object::Body_1->new(); # Body_1 | 

eval { 
    my $result = $api_instance->pgVerifyPost(apiecoKey => $apiecoKey, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling VerifyApi->pgVerifyPost: $@\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.VerifyApi()
apiecoKey = apiecoKey_example # String | apikey for use API (default to WsLdHK46I5Wfr5xgI0ynjjyiw9Fyhydu)
body =  # Body_1 |  (optional)

try: 
    # مرحله چهارم : وریفای تراکنش
    api_response = api_instance.pg_verify_post(apiecoKey, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling VerifyApi->pgVerifyPost: %s\n" % e)

Parameters

Header parameters
Name Description
apieco-key*
String
apikey for use API
Required
Body parameters
Name Description
body

Responses

Status: 200 - 200 response

Status: 422 - HTTP/1.1 422 Error