AlipayHK Traffic platform interface

Common

queryQrcodeInstKeys

机构解码公钥查詢

错误码: (无额外错误码)


/traffic/qrcode/instKeys

Usage and SDK Samples

curl -X GET -H "X-Content-Signature: [[jwsSignature]]" "https://traffic.alipayhk.com/traffic/qrcode/instKeys"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CommonApi;

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

public class CommonApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: jwsAuth
        ApiKeyAuth jwsAuth = (ApiKeyAuth) defaultClient.getAuthentication("jwsAuth");
        jwsAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //jwsAuth.setApiKeyPrefix("Token");

        CommonApi apiInstance = new CommonApi();
        String clientId = clientId_example; // String | (maxLength:64) Provided by Alipay, used to identify partner and application system
        String accept = accept_example; // String | application/vnd.alipayhk.payment-v1+json
        String contentType = contentType_example; // String | application/json
        try {
            QueryPublicKeyResult result = apiInstance.queryQrcodeInstKeys(clientId, accept, contentType);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CommonApi#queryQrcodeInstKeys");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CommonApi;

public class CommonApiExample {

    public static void main(String[] args) {
        CommonApi apiInstance = new CommonApi();
        String clientId = clientId_example; // String | (maxLength:64) Provided by Alipay, used to identify partner and application system
        String accept = accept_example; // String | application/vnd.alipayhk.payment-v1+json
        String contentType = contentType_example; // String | application/json
        try {
            QueryPublicKeyResult result = apiInstance.queryQrcodeInstKeys(clientId, accept, contentType);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CommonApi#queryQrcodeInstKeys");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: jwsAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Content-Signature"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Content-Signature"];

String *clientId = clientId_example; // (maxLength:64) Provided by Alipay, used to identify partner and application system
String *accept = accept_example; // application/vnd.alipayhk.payment-v1+json
String *contentType = contentType_example; // application/json

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

// 机构解码公钥查詢
[apiInstance queryQrcodeInstKeysWith:clientId
    accept:accept
    contentType:contentType
              completionHandler: ^(QueryPublicKeyResult output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AlipayHkTrafficPlatformInterface = require('alipay_hk_traffic_platform_interface');
var defaultClient = AlipayHkTrafficPlatformInterface.ApiClient.instance;

// Configure API key authorization: jwsAuth
var jwsAuth = defaultClient.authentications['jwsAuth'];
jwsAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//jwsAuth.apiKeyPrefix['X-Content-Signature'] = "Token"

var api = new AlipayHkTrafficPlatformInterface.CommonApi()

var clientId = clientId_example; // {String} (maxLength:64) Provided by Alipay, used to identify partner and application system

var accept = accept_example; // {String} application/vnd.alipayhk.payment-v1+json

var contentType = contentType_example; // {String} application/json


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

namespace Example
{
    public class queryQrcodeInstKeysExample
    {
        public void main()
        {
            
            // Configure API key authorization: jwsAuth
            Configuration.Default.ApiKey.Add("X-Content-Signature", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Content-Signature", "Bearer");

            var apiInstance = new CommonApi();
            var clientId = clientId_example;  // String | (maxLength:64) Provided by Alipay, used to identify partner and application system
            var accept = accept_example;  // String | application/vnd.alipayhk.payment-v1+json
            var contentType = contentType_example;  // String | application/json

            try
            {
                // 机构解码公钥查詢
                QueryPublicKeyResult result = apiInstance.queryQrcodeInstKeys(clientId, accept, contentType);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CommonApi.queryQrcodeInstKeys: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: jwsAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Content-Signature', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Content-Signature', 'Bearer');

$api_instance = new Swagger\Client\Api\CommonApi();
$clientId = clientId_example; // String | (maxLength:64) Provided by Alipay, used to identify partner and application system
$accept = accept_example; // String | application/vnd.alipayhk.payment-v1+json
$contentType = contentType_example; // String | application/json

try {
    $result = $api_instance->queryQrcodeInstKeys($clientId, $accept, $contentType);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CommonApi->queryQrcodeInstKeys: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CommonApi;

# Configure API key authorization: jwsAuth
$WWW::SwaggerClient::Configuration::api_key->{'X-Content-Signature'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-Content-Signature'} = "Bearer";

my $api_instance = WWW::SwaggerClient::CommonApi->new();
my $clientId = clientId_example; # String | (maxLength:64) Provided by Alipay, used to identify partner and application system
my $accept = accept_example; # String | application/vnd.alipayhk.payment-v1+json
my $contentType = contentType_example; # String | application/json

eval { 
    my $result = $api_instance->queryQrcodeInstKeys(clientId => $clientId, accept => $accept, contentType => $contentType);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CommonApi->queryQrcodeInstKeys: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: jwsAuth
swagger_client.configuration.api_key['X-Content-Signature'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Content-Signature'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.CommonApi()
clientId = clientId_example # String | (maxLength:64) Provided by Alipay, used to identify partner and application system
accept = accept_example # String | application/vnd.alipayhk.payment-v1+json
contentType = contentType_example # String | application/json

try: 
    # 机构解码公钥查詢
    api_response = api_instance.query_qrcode_inst_keys(clientId, accept, contentType)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CommonApi->queryQrcodeInstKeys: %s\n" % e)

Parameters

Header parameters
Name Description
clientId*
String
(maxLength:64) Provided by Alipay, used to identify partner and application system
Required
Accept*
String
application/vnd.alipayhk.payment-v1+json
Required
Content-Type*
String
application/json
Required

Responses

Status: 200 - successful operation

Status: 400 - 錯誤返回


Event

addQrcodeEvent

user event notify

错误码: (无额外错误码)


/traffic/events/qrcode

Usage and SDK Samples

curl -X POST -H "X-Content-Signature: [[jwsSignature]]" "https://traffic.alipayhk.com/traffic/events/qrcode"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.EventApi;

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

public class EventApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: jwsAuth
        ApiKeyAuth jwsAuth = (ApiKeyAuth) defaultClient.getAuthentication("jwsAuth");
        jwsAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //jwsAuth.setApiKeyPrefix("Token");

        EventApi apiInstance = new EventApi();
        String clientId = clientId_example; // String | (maxLength:64) Provided by Alipay, used to identify partner and application system
        String accept = accept_example; // String | application/vnd.alipayhk.event-v1+json
        String contentType = contentType_example; // String | application/json
        UserEvent body = ; // UserEvent | 
        try {
            apiInstance.addQrcodeEvent(clientId, accept, contentType, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling EventApi#addQrcodeEvent");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.EventApi;

public class EventApiExample {

    public static void main(String[] args) {
        EventApi apiInstance = new EventApi();
        String clientId = clientId_example; // String | (maxLength:64) Provided by Alipay, used to identify partner and application system
        String accept = accept_example; // String | application/vnd.alipayhk.event-v1+json
        String contentType = contentType_example; // String | application/json
        UserEvent body = ; // UserEvent | 
        try {
            apiInstance.addQrcodeEvent(clientId, accept, contentType, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling EventApi#addQrcodeEvent");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: jwsAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Content-Signature"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Content-Signature"];

String *clientId = clientId_example; // (maxLength:64) Provided by Alipay, used to identify partner and application system
String *accept = accept_example; // application/vnd.alipayhk.event-v1+json
String *contentType = contentType_example; // application/json
UserEvent *body = ; // 

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

// user event notify
[apiInstance addQrcodeEventWith:clientId
    accept:accept
    contentType:contentType
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AlipayHkTrafficPlatformInterface = require('alipay_hk_traffic_platform_interface');
var defaultClient = AlipayHkTrafficPlatformInterface.ApiClient.instance;

// Configure API key authorization: jwsAuth
var jwsAuth = defaultClient.authentications['jwsAuth'];
jwsAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//jwsAuth.apiKeyPrefix['X-Content-Signature'] = "Token"

var api = new AlipayHkTrafficPlatformInterface.EventApi()

var clientId = clientId_example; // {String} (maxLength:64) Provided by Alipay, used to identify partner and application system

var accept = accept_example; // {String} application/vnd.alipayhk.event-v1+json

var contentType = contentType_example; // {String} application/json

var body = ; // {UserEvent} 


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.addQrcodeEvent(clientId, accept, contentType, body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class addQrcodeEventExample
    {
        public void main()
        {
            
            // Configure API key authorization: jwsAuth
            Configuration.Default.ApiKey.Add("X-Content-Signature", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Content-Signature", "Bearer");

            var apiInstance = new EventApi();
            var clientId = clientId_example;  // String | (maxLength:64) Provided by Alipay, used to identify partner and application system
            var accept = accept_example;  // String | application/vnd.alipayhk.event-v1+json
            var contentType = contentType_example;  // String | application/json
            var body = new UserEvent(); // UserEvent | 

            try
            {
                // user event notify
                apiInstance.addQrcodeEvent(clientId, accept, contentType, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling EventApi.addQrcodeEvent: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: jwsAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Content-Signature', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Content-Signature', 'Bearer');

$api_instance = new Swagger\Client\Api\EventApi();
$clientId = clientId_example; // String | (maxLength:64) Provided by Alipay, used to identify partner and application system
$accept = accept_example; // String | application/vnd.alipayhk.event-v1+json
$contentType = contentType_example; // String | application/json
$body = ; // UserEvent | 

try {
    $api_instance->addQrcodeEvent($clientId, $accept, $contentType, $body);
} catch (Exception $e) {
    echo 'Exception when calling EventApi->addQrcodeEvent: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::EventApi;

# Configure API key authorization: jwsAuth
$WWW::SwaggerClient::Configuration::api_key->{'X-Content-Signature'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-Content-Signature'} = "Bearer";

my $api_instance = WWW::SwaggerClient::EventApi->new();
my $clientId = clientId_example; # String | (maxLength:64) Provided by Alipay, used to identify partner and application system
my $accept = accept_example; # String | application/vnd.alipayhk.event-v1+json
my $contentType = contentType_example; # String | application/json
my $body = WWW::SwaggerClient::Object::UserEvent->new(); # UserEvent | 

eval { 
    $api_instance->addQrcodeEvent(clientId => $clientId, accept => $accept, contentType => $contentType, body => $body);
};
if ($@) {
    warn "Exception when calling EventApi->addQrcodeEvent: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: jwsAuth
swagger_client.configuration.api_key['X-Content-Signature'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Content-Signature'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.EventApi()
clientId = clientId_example # String | (maxLength:64) Provided by Alipay, used to identify partner and application system
accept = accept_example # String | application/vnd.alipayhk.event-v1+json
contentType = contentType_example # String | application/json
body =  # UserEvent | 

try: 
    # user event notify
    api_instance.add_qrcode_event(clientId, accept, contentType, body)
except ApiException as e:
    print("Exception when calling EventApi->addQrcodeEvent: %s\n" % e)

Parameters

Header parameters
Name Description
clientId*
String
(maxLength:64) Provided by Alipay, used to identify partner and application system
Required
Accept*
String
application/vnd.alipayhk.event-v1+json
Required
Content-Type*
String
application/json
Required
Body parameters
Name Description
body *

Responses

Status: 200 - successful operation

Status: 400 - 錯誤返回


File

settlementDetail

注意:這不是一個接口,只是用來說明CSV文件的表头格式。 (文件統一存放在SFTP中,不另外提供接口。)

文件名示例: ALIPAY_SETTLEMENT_DETAIL_HKD_20190630000.csv


/notInterface/settlement/detail

Usage and SDK Samples

curl -X GET "https://traffic.alipayhk.com/notInterface/settlement/detail"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FileApi;

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

public class FileApiExample {

    public static void main(String[] args) {
        
        FileApi apiInstance = new FileApi();
        try {
            inline_response_200_2 result = apiInstance.settlementDetail();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FileApi#settlementDetail");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FileApi;

public class FileApiExample {

    public static void main(String[] args) {
        FileApi apiInstance = new FileApi();
        try {
            inline_response_200_2 result = apiInstance.settlementDetail();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FileApi#settlementDetail");
            e.printStackTrace();
        }
    }
}

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

// 注意:這不是一個接口,只是用來說明CSV文件的表头格式。 (文件統一存放在SFTP中,不另外提供接口。)
[apiInstance settlementDetailWithCompletionHandler: 
              ^(inline_response_200_2 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AlipayHkTrafficPlatformInterface = require('alipay_hk_traffic_platform_interface');

var api = new AlipayHkTrafficPlatformInterface.FileApi()

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

namespace Example
{
    public class settlementDetailExample
    {
        public void main()
        {
            
            var apiInstance = new FileApi();

            try
            {
                // 注意:這不是一個接口,只是用來說明CSV文件的表头格式。 (文件統一存放在SFTP中,不另外提供接口。)
                inline_response_200_2 result = apiInstance.settlementDetail();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FileApi.settlementDetail: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\FileApi();

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

my $api_instance = WWW::SwaggerClient::FileApi->new();

eval { 
    my $result = $api_instance->settlementDetail();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FileApi->settlementDetail: $@\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.FileApi()

try: 
    # 注意:這不是一個接口,只是用來說明CSV文件的表头格式。 (文件統一存放在SFTP中,不另外提供接口。)
    api_response = api_instance.settlement_detail()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FileApi->settlementDetail: %s\n" % e)

Parameters

Responses

Status: 200 - 文件内容


settlementSummary

注意:這不是一個接口,只是用來說明CSV文件的表头格式。 (文件統一存放在SFTP中,不另外提供接口。)

文件名示例: ALIPAY_SETTLEMENT_SUMMARY_HKD_20190630000.csv


/notInterface/settlement/summary

Usage and SDK Samples

curl -X GET "https://traffic.alipayhk.com/notInterface/settlement/summary"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FileApi;

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

public class FileApiExample {

    public static void main(String[] args) {
        
        FileApi apiInstance = new FileApi();
        try {
            inline_response_200_1 result = apiInstance.settlementSummary();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FileApi#settlementSummary");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FileApi;

public class FileApiExample {

    public static void main(String[] args) {
        FileApi apiInstance = new FileApi();
        try {
            inline_response_200_1 result = apiInstance.settlementSummary();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FileApi#settlementSummary");
            e.printStackTrace();
        }
    }
}

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

// 注意:這不是一個接口,只是用來說明CSV文件的表头格式。 (文件統一存放在SFTP中,不另外提供接口。)
[apiInstance settlementSummaryWithCompletionHandler: 
              ^(inline_response_200_1 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AlipayHkTrafficPlatformInterface = require('alipay_hk_traffic_platform_interface');

var api = new AlipayHkTrafficPlatformInterface.FileApi()

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

namespace Example
{
    public class settlementSummaryExample
    {
        public void main()
        {
            
            var apiInstance = new FileApi();

            try
            {
                // 注意:這不是一個接口,只是用來說明CSV文件的表头格式。 (文件統一存放在SFTP中,不另外提供接口。)
                inline_response_200_1 result = apiInstance.settlementSummary();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FileApi.settlementSummary: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\FileApi();

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

my $api_instance = WWW::SwaggerClient::FileApi->new();

eval { 
    my $result = $api_instance->settlementSummary();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FileApi->settlementSummary: $@\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.FileApi()

try: 
    # 注意:這不是一個接口,只是用來說明CSV文件的表头格式。 (文件統一存放在SFTP中,不另外提供接口。)
    api_response = api_instance.settlement_summary()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FileApi->settlementSummary: %s\n" % e)

Parameters

Responses

Status: 200 - 文件内容


transactionDetail

注意:這不是一個接口,只是用來說明CSV文件的表头格式。 (文件統一存放在SFTP中,不另外提供接口。)

文件名示例: ALIPAY_TRANSACTION_DETAIL_HKD_20190630.csv


/notInterface/transaction/detail

Usage and SDK Samples

curl -X GET "https://traffic.alipayhk.com/notInterface/transaction/detail"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FileApi;

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

public class FileApiExample {

    public static void main(String[] args) {
        
        FileApi apiInstance = new FileApi();
        try {
            inline_response_200_2 result = apiInstance.transactionDetail();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FileApi#transactionDetail");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FileApi;

public class FileApiExample {

    public static void main(String[] args) {
        FileApi apiInstance = new FileApi();
        try {
            inline_response_200_2 result = apiInstance.transactionDetail();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FileApi#transactionDetail");
            e.printStackTrace();
        }
    }
}

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

// 注意:這不是一個接口,只是用來說明CSV文件的表头格式。 (文件統一存放在SFTP中,不另外提供接口。)
[apiInstance transactionDetailWithCompletionHandler: 
              ^(inline_response_200_2 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AlipayHkTrafficPlatformInterface = require('alipay_hk_traffic_platform_interface');

var api = new AlipayHkTrafficPlatformInterface.FileApi()

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

namespace Example
{
    public class transactionDetailExample
    {
        public void main()
        {
            
            var apiInstance = new FileApi();

            try
            {
                // 注意:這不是一個接口,只是用來說明CSV文件的表头格式。 (文件統一存放在SFTP中,不另外提供接口。)
                inline_response_200_2 result = apiInstance.transactionDetail();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FileApi.transactionDetail: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\FileApi();

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

my $api_instance = WWW::SwaggerClient::FileApi->new();

eval { 
    my $result = $api_instance->transactionDetail();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FileApi->transactionDetail: $@\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.FileApi()

try: 
    # 注意:這不是一個接口,只是用來說明CSV文件的表头格式。 (文件統一存放在SFTP中,不另外提供接口。)
    api_response = api_instance.transaction_detail()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FileApi->transactionDetail: %s\n" % e)

Parameters

Responses

Status: 200 - 文件内容


transactionSummary

注意:這不是一個接口,只是用來說明CSV文件的表头格式。 (文件統一存放在SFTP中,不另外提供接口。)

文件名示例: ALIPAY_TRANSACTION_SUMMARY_HKD_20190630000.csv


/notInterface/transaction/summary

Usage and SDK Samples

curl -X GET "https://traffic.alipayhk.com/notInterface/transaction/summary"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FileApi;

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

public class FileApiExample {

    public static void main(String[] args) {
        
        FileApi apiInstance = new FileApi();
        try {
            inline_response_200_1 result = apiInstance.transactionSummary();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FileApi#transactionSummary");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FileApi;

public class FileApiExample {

    public static void main(String[] args) {
        FileApi apiInstance = new FileApi();
        try {
            inline_response_200_1 result = apiInstance.transactionSummary();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FileApi#transactionSummary");
            e.printStackTrace();
        }
    }
}

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

// 注意:這不是一個接口,只是用來說明CSV文件的表头格式。 (文件統一存放在SFTP中,不另外提供接口。)
[apiInstance transactionSummaryWithCompletionHandler: 
              ^(inline_response_200_1 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AlipayHkTrafficPlatformInterface = require('alipay_hk_traffic_platform_interface');

var api = new AlipayHkTrafficPlatformInterface.FileApi()

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

namespace Example
{
    public class transactionSummaryExample
    {
        public void main()
        {
            
            var apiInstance = new FileApi();

            try
            {
                // 注意:這不是一個接口,只是用來說明CSV文件的表头格式。 (文件統一存放在SFTP中,不另外提供接口。)
                inline_response_200_1 result = apiInstance.transactionSummary();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FileApi.transactionSummary: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\FileApi();

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

my $api_instance = WWW::SwaggerClient::FileApi->new();

eval { 
    my $result = $api_instance->transactionSummary();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FileApi->transactionSummary: $@\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.FileApi()

try: 
    # 注意:這不是一個接口,只是用來說明CSV文件的表头格式。 (文件統一存放在SFTP中,不另外提供接口。)
    api_response = api_instance.transaction_summary()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FileApi->transactionSummary: %s\n" % e)

Parameters

Responses

Status: 200 - 文件内容


二維碼解碼機構公鑰

注意:這不是一個接口,只是用來說明CSV文件的表头格式。 (文件統一存放在SFTP中,不另外提供接口。)

新功能開發中,內容格式今後可能會變化。 文件名示例: ALIPAY_QRCODE_INSTITUTION_PUBLIC_KEY_20190630.csv


/notInterface/qrcodekey

Usage and SDK Samples

curl -X GET "https://traffic.alipayhk.com/notInterface/qrcodekey"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FileApi;

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

public class FileApiExample {

    public static void main(String[] args) {
        
        FileApi apiInstance = new FileApi();
        try {
            ArrayOfQrcodeKey result = apiInstance.二維碼解碼機構公鑰();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FileApi#二維碼解碼機構公鑰");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FileApi;

public class FileApiExample {

    public static void main(String[] args) {
        FileApi apiInstance = new FileApi();
        try {
            ArrayOfQrcodeKey result = apiInstance.二維碼解碼機構公鑰();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FileApi#二維碼解碼機構公鑰");
            e.printStackTrace();
        }
    }
}

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

// 注意:這不是一個接口,只是用來說明CSV文件的表头格式。 (文件統一存放在SFTP中,不另外提供接口。)
[apiInstance 二維碼解碼機構公鑰WithCompletionHandler: 
              ^(ArrayOfQrcodeKey output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AlipayHkTrafficPlatformInterface = require('alipay_hk_traffic_platform_interface');

var api = new AlipayHkTrafficPlatformInterface.FileApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.二維碼解碼機構公鑰(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class 二維碼解碼機構公鑰Example
    {
        public void main()
        {
            
            var apiInstance = new FileApi();

            try
            {
                // 注意:這不是一個接口,只是用來說明CSV文件的表头格式。 (文件統一存放在SFTP中,不另外提供接口。)
                ArrayOfQrcodeKey result = apiInstance.二維碼解碼機構公鑰();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FileApi.二維碼解碼機構公鑰: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\FileApi();

try {
    $result = $api_instance->二維碼解碼機構公鑰();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FileApi->二維碼解碼機構公鑰: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FileApi;

my $api_instance = WWW::SwaggerClient::FileApi->new();

eval { 
    my $result = $api_instance->二維碼解碼機構公鑰();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FileApi->二維碼解碼機構公鑰: $@\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.FileApi()

try: 
    # 注意:這不是一個接口,只是用來說明CSV文件的表头格式。 (文件統一存放在SFTP中,不另外提供接口。)
    api_response = api_instance.二維碼解碼機構公鑰()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FileApi->二維碼解碼機構公鑰: %s\n" % e)

Parameters

Responses

Status: 200 - 文件内容


黑名單列表文件

注意:這不是一個接口,只是用來說明CSV文件的表头格式。 (文件統一存放在SFTP中,不另外提供接口。)

文件名示例: ALIPAY_BLACKLIST_20190630000.csv


/notInterface/blacklist

Usage and SDK Samples

curl -X GET "https://traffic.alipayhk.com/notInterface/blacklist"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FileApi;

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

public class FileApiExample {

    public static void main(String[] args) {
        
        FileApi apiInstance = new FileApi();
        try {
            array[Object] result = apiInstance.黑名單列表文件();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FileApi#黑名單列表文件");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FileApi;

public class FileApiExample {

    public static void main(String[] args) {
        FileApi apiInstance = new FileApi();
        try {
            array[Object] result = apiInstance.黑名單列表文件();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FileApi#黑名單列表文件");
            e.printStackTrace();
        }
    }
}

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

// 注意:這不是一個接口,只是用來說明CSV文件的表头格式。 (文件統一存放在SFTP中,不另外提供接口。)
[apiInstance 黑名單列表文件WithCompletionHandler: 
              ^(array[Object] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AlipayHkTrafficPlatformInterface = require('alipay_hk_traffic_platform_interface');

var api = new AlipayHkTrafficPlatformInterface.FileApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.黑名單列表文件(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class 黑名單列表文件Example
    {
        public void main()
        {
            
            var apiInstance = new FileApi();

            try
            {
                // 注意:這不是一個接口,只是用來說明CSV文件的表头格式。 (文件統一存放在SFTP中,不另外提供接口。)
                array[Object] result = apiInstance.黑名單列表文件();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FileApi.黑名單列表文件: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\FileApi();

try {
    $result = $api_instance->黑名單列表文件();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FileApi->黑名單列表文件: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FileApi;

my $api_instance = WWW::SwaggerClient::FileApi->new();

eval { 
    my $result = $api_instance->黑名單列表文件();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FileApi->黑名單列表文件: $@\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.FileApi()

try: 
    # 注意:這不是一個接口,只是用來說明CSV文件的表头格式。 (文件統一存放在SFTP中,不另外提供接口。)
    api_response = api_instance.黑名單列表文件()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FileApi->黑名單列表文件: %s\n" % e)

Parameters

Responses

Status: 200 - 文件内容


Payment

addRefund

發起一筆新的退款

错误码: | HTTP status Code | code | info | description | |----------|----------|----------|----------| | 400 | 00000025 | REPEAT_REQ_INCONSISTENT | 重复的请求,但是关键字段不一致 | | 403 | 12002006 | USER_STATUS_ABNORMAL | 用户状态异常 | | 400 | 12005001 | CURRENCY_NOT_SUPPORT | 币种不支持 | | 404 | 12005004 | ORDER_NOT_EXIST | 单据不存在 | | 400 | 23005302 | REFUND_AMOUNT_EXCEED | 退款金额超限 | | 400 | 12005014 | REFUND_TIME_EXCEED_LIMIT | 退款时间超期 | | 400 | 12005003 | ORDER_STATUS_INVALID | 订单状态无效 |


/traffic/refunds

Usage and SDK Samples

curl -X POST -H "X-Content-Signature: [[jwsSignature]]" "https://traffic.alipayhk.com/traffic/refunds"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PaymentApi;

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

public class PaymentApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: jwsAuth
        ApiKeyAuth jwsAuth = (ApiKeyAuth) defaultClient.getAuthentication("jwsAuth");
        jwsAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //jwsAuth.setApiKeyPrefix("Token");

        PaymentApi apiInstance = new PaymentApi();
        String clientId = clientId_example; // String | (maxLength:64) Provided by Alipay, used to identify partner and application system
        String accept = accept_example; // String | application/vnd.alipayhk.payment-v1+json
        String contentType = contentType_example; // String | application/json
        String reqMsgId = reqMsgId_example; // String | (maxLength:64) 請求冪等ID。內容需要與請求body中的業務冪等ID(例如merchantRefundId)保持一致。
        Refund body = ; // Refund | 
        try {
            Refund result = apiInstance.addRefund(clientId, accept, contentType, reqMsgId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PaymentApi#addRefund");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PaymentApi;

public class PaymentApiExample {

    public static void main(String[] args) {
        PaymentApi apiInstance = new PaymentApi();
        String clientId = clientId_example; // String | (maxLength:64) Provided by Alipay, used to identify partner and application system
        String accept = accept_example; // String | application/vnd.alipayhk.payment-v1+json
        String contentType = contentType_example; // String | application/json
        String reqMsgId = reqMsgId_example; // String | (maxLength:64) 請求冪等ID。內容需要與請求body中的業務冪等ID(例如merchantRefundId)保持一致。
        Refund body = ; // Refund | 
        try {
            Refund result = apiInstance.addRefund(clientId, accept, contentType, reqMsgId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PaymentApi#addRefund");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: jwsAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Content-Signature"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Content-Signature"];

String *clientId = clientId_example; // (maxLength:64) Provided by Alipay, used to identify partner and application system
String *accept = accept_example; // application/vnd.alipayhk.payment-v1+json
String *contentType = contentType_example; // application/json
String *reqMsgId = reqMsgId_example; // (maxLength:64) 請求冪等ID。內容需要與請求body中的業務冪等ID(例如merchantRefundId)保持一致。
Refund *body = ; // 

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

// 發起一筆新的退款
[apiInstance addRefundWith:clientId
    accept:accept
    contentType:contentType
    reqMsgId:reqMsgId
    body:body
              completionHandler: ^(Refund output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AlipayHkTrafficPlatformInterface = require('alipay_hk_traffic_platform_interface');
var defaultClient = AlipayHkTrafficPlatformInterface.ApiClient.instance;

// Configure API key authorization: jwsAuth
var jwsAuth = defaultClient.authentications['jwsAuth'];
jwsAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//jwsAuth.apiKeyPrefix['X-Content-Signature'] = "Token"

var api = new AlipayHkTrafficPlatformInterface.PaymentApi()

var clientId = clientId_example; // {String} (maxLength:64) Provided by Alipay, used to identify partner and application system

var accept = accept_example; // {String} application/vnd.alipayhk.payment-v1+json

var contentType = contentType_example; // {String} application/json

var reqMsgId = reqMsgId_example; // {String} (maxLength:64) 請求冪等ID。內容需要與請求body中的業務冪等ID(例如merchantRefundId)保持一致。

var body = ; // {Refund} 


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

namespace Example
{
    public class addRefundExample
    {
        public void main()
        {
            
            // Configure API key authorization: jwsAuth
            Configuration.Default.ApiKey.Add("X-Content-Signature", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Content-Signature", "Bearer");

            var apiInstance = new PaymentApi();
            var clientId = clientId_example;  // String | (maxLength:64) Provided by Alipay, used to identify partner and application system
            var accept = accept_example;  // String | application/vnd.alipayhk.payment-v1+json
            var contentType = contentType_example;  // String | application/json
            var reqMsgId = reqMsgId_example;  // String | (maxLength:64) 請求冪等ID。內容需要與請求body中的業務冪等ID(例如merchantRefundId)保持一致。
            var body = new Refund(); // Refund | 

            try
            {
                // 發起一筆新的退款
                Refund result = apiInstance.addRefund(clientId, accept, contentType, reqMsgId, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PaymentApi.addRefund: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: jwsAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Content-Signature', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Content-Signature', 'Bearer');

$api_instance = new Swagger\Client\Api\PaymentApi();
$clientId = clientId_example; // String | (maxLength:64) Provided by Alipay, used to identify partner and application system
$accept = accept_example; // String | application/vnd.alipayhk.payment-v1+json
$contentType = contentType_example; // String | application/json
$reqMsgId = reqMsgId_example; // String | (maxLength:64) 請求冪等ID。內容需要與請求body中的業務冪等ID(例如merchantRefundId)保持一致。
$body = ; // Refund | 

try {
    $result = $api_instance->addRefund($clientId, $accept, $contentType, $reqMsgId, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PaymentApi->addRefund: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PaymentApi;

# Configure API key authorization: jwsAuth
$WWW::SwaggerClient::Configuration::api_key->{'X-Content-Signature'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-Content-Signature'} = "Bearer";

my $api_instance = WWW::SwaggerClient::PaymentApi->new();
my $clientId = clientId_example; # String | (maxLength:64) Provided by Alipay, used to identify partner and application system
my $accept = accept_example; # String | application/vnd.alipayhk.payment-v1+json
my $contentType = contentType_example; # String | application/json
my $reqMsgId = reqMsgId_example; # String | (maxLength:64) 請求冪等ID。內容需要與請求body中的業務冪等ID(例如merchantRefundId)保持一致。
my $body = WWW::SwaggerClient::Object::Refund->new(); # Refund | 

eval { 
    my $result = $api_instance->addRefund(clientId => $clientId, accept => $accept, contentType => $contentType, reqMsgId => $reqMsgId, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PaymentApi->addRefund: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: jwsAuth
swagger_client.configuration.api_key['X-Content-Signature'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Content-Signature'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.PaymentApi()
clientId = clientId_example # String | (maxLength:64) Provided by Alipay, used to identify partner and application system
accept = accept_example # String | application/vnd.alipayhk.payment-v1+json
contentType = contentType_example # String | application/json
reqMsgId = reqMsgId_example # String | (maxLength:64) 請求冪等ID。內容需要與請求body中的業務冪等ID(例如merchantRefundId)保持一致。
body =  # Refund | 

try: 
    # 發起一筆新的退款
    api_response = api_instance.add_refund(clientId, accept, contentType, reqMsgId, body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PaymentApi->addRefund: %s\n" % e)

Parameters

Header parameters
Name Description
clientId*
String
(maxLength:64) Provided by Alipay, used to identify partner and application system
Required
Accept*
String
application/vnd.alipayhk.payment-v1+json
Required
Content-Type*
String
application/json
Required
reqMsgId*
String
(maxLength:64) 請求冪等ID。內容需要與請求body中的業務冪等ID(例如merchantRefundId)保持一致。
Required
Body parameters
Name Description
body *

Responses

Status: 200 - SUCCESS

Status: 400 - 錯誤返回


addTransaction

發起一筆新的乘車碼支付

错误码: | HTTP status Code | code | info | description | |----------|----------|----------|----------| | 400 | 00000025 | REPEAT_REQ_INCONSISTENT | 重复的请求,但是关键字段不一致 | | 400 | 00000011 | RISK_REJECT | 风控拒绝 | | 403 | 12002006 | USER_STATUS_ABNORMAL | 用户状态异常 | | 400 | 12005001 | CURRENCY_NOT_SUPPORT | 币种不支持 | | 400 | 12005104 | AMOUNT_EXCEED_LIMIT | 风控拒绝 | | 400 | 12005128 | COUNT_EXCEED_LIMIT | 交易笔数超限 | | 400 | 12005131 | IDENTITY_CODE_INVALID | identityCode 不合法 | | 400 | 12005132 | IDENTITY_CODE_NOT_SUPPORT | identityCode 不支持 | | 400 | 12005124 | PAYMENT_IN_PROCESS | 正在支付中 | | 400 | 12005100 | ORDER_IS_CLOSED | 订单已关闭 | | 400 | 12005003 | ORDER_STATUS_INVALID | 订单状态无效 | | 400 | 12002046 | USER_AMOUNT_EXCEED_LIMIT | 用户余额超限 | | 403 | 12002004 | USER_REALNAME_STATUS_INVALID | 没有实名认证(仅在需要实名认证的场景可能出现) |


/traffic/transactions

Usage and SDK Samples

curl -X POST -H "X-Content-Signature: [[jwsSignature]]" "https://traffic.alipayhk.com/traffic/transactions"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PaymentApi;

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

public class PaymentApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: jwsAuth
        ApiKeyAuth jwsAuth = (ApiKeyAuth) defaultClient.getAuthentication("jwsAuth");
        jwsAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //jwsAuth.setApiKeyPrefix("Token");

        PaymentApi apiInstance = new PaymentApi();
        String clientId = clientId_example; // String | (maxLength:64) Provided by Alipay, used to identify partner and application system
        String reqMsgId = reqMsgId_example; // String | (maxLength:64) 請求冪等ID。內容需要與請求body中的業務冪等ID(例如merchantTransId)保持一致。
        String accept = accept_example; // String | application/vnd.alipayhk.payment-v1+json
        String contentType = contentType_example; // String | application/json
        Transaction body = ; // Transaction | Transaction object
        try {
            Transaction result = apiInstance.addTransaction(clientId, reqMsgId, accept, contentType, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PaymentApi#addTransaction");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PaymentApi;

public class PaymentApiExample {

    public static void main(String[] args) {
        PaymentApi apiInstance = new PaymentApi();
        String clientId = clientId_example; // String | (maxLength:64) Provided by Alipay, used to identify partner and application system
        String reqMsgId = reqMsgId_example; // String | (maxLength:64) 請求冪等ID。內容需要與請求body中的業務冪等ID(例如merchantTransId)保持一致。
        String accept = accept_example; // String | application/vnd.alipayhk.payment-v1+json
        String contentType = contentType_example; // String | application/json
        Transaction body = ; // Transaction | Transaction object
        try {
            Transaction result = apiInstance.addTransaction(clientId, reqMsgId, accept, contentType, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PaymentApi#addTransaction");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: jwsAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Content-Signature"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Content-Signature"];

String *clientId = clientId_example; // (maxLength:64) Provided by Alipay, used to identify partner and application system
String *reqMsgId = reqMsgId_example; // (maxLength:64) 請求冪等ID。內容需要與請求body中的業務冪等ID(例如merchantTransId)保持一致。
String *accept = accept_example; // application/vnd.alipayhk.payment-v1+json
String *contentType = contentType_example; // application/json
Transaction *body = ; // Transaction object

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

// 發起一筆新的乘車碼支付
[apiInstance addTransactionWith:clientId
    reqMsgId:reqMsgId
    accept:accept
    contentType:contentType
    body:body
              completionHandler: ^(Transaction output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AlipayHkTrafficPlatformInterface = require('alipay_hk_traffic_platform_interface');
var defaultClient = AlipayHkTrafficPlatformInterface.ApiClient.instance;

// Configure API key authorization: jwsAuth
var jwsAuth = defaultClient.authentications['jwsAuth'];
jwsAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//jwsAuth.apiKeyPrefix['X-Content-Signature'] = "Token"

var api = new AlipayHkTrafficPlatformInterface.PaymentApi()

var clientId = clientId_example; // {String} (maxLength:64) Provided by Alipay, used to identify partner and application system

var reqMsgId = reqMsgId_example; // {String} (maxLength:64) 請求冪等ID。內容需要與請求body中的業務冪等ID(例如merchantTransId)保持一致。

var accept = accept_example; // {String} application/vnd.alipayhk.payment-v1+json

var contentType = contentType_example; // {String} application/json

var body = ; // {Transaction} Transaction object


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

namespace Example
{
    public class addTransactionExample
    {
        public void main()
        {
            
            // Configure API key authorization: jwsAuth
            Configuration.Default.ApiKey.Add("X-Content-Signature", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Content-Signature", "Bearer");

            var apiInstance = new PaymentApi();
            var clientId = clientId_example;  // String | (maxLength:64) Provided by Alipay, used to identify partner and application system
            var reqMsgId = reqMsgId_example;  // String | (maxLength:64) 請求冪等ID。內容需要與請求body中的業務冪等ID(例如merchantTransId)保持一致。
            var accept = accept_example;  // String | application/vnd.alipayhk.payment-v1+json
            var contentType = contentType_example;  // String | application/json
            var body = new Transaction(); // Transaction | Transaction object

            try
            {
                // 發起一筆新的乘車碼支付
                Transaction result = apiInstance.addTransaction(clientId, reqMsgId, accept, contentType, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PaymentApi.addTransaction: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: jwsAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Content-Signature', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Content-Signature', 'Bearer');

$api_instance = new Swagger\Client\Api\PaymentApi();
$clientId = clientId_example; // String | (maxLength:64) Provided by Alipay, used to identify partner and application system
$reqMsgId = reqMsgId_example; // String | (maxLength:64) 請求冪等ID。內容需要與請求body中的業務冪等ID(例如merchantTransId)保持一致。
$accept = accept_example; // String | application/vnd.alipayhk.payment-v1+json
$contentType = contentType_example; // String | application/json
$body = ; // Transaction | Transaction object

try {
    $result = $api_instance->addTransaction($clientId, $reqMsgId, $accept, $contentType, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PaymentApi->addTransaction: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PaymentApi;

# Configure API key authorization: jwsAuth
$WWW::SwaggerClient::Configuration::api_key->{'X-Content-Signature'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-Content-Signature'} = "Bearer";

my $api_instance = WWW::SwaggerClient::PaymentApi->new();
my $clientId = clientId_example; # String | (maxLength:64) Provided by Alipay, used to identify partner and application system
my $reqMsgId = reqMsgId_example; # String | (maxLength:64) 請求冪等ID。內容需要與請求body中的業務冪等ID(例如merchantTransId)保持一致。
my $accept = accept_example; # String | application/vnd.alipayhk.payment-v1+json
my $contentType = contentType_example; # String | application/json
my $body = WWW::SwaggerClient::Object::Transaction->new(); # Transaction | Transaction object

eval { 
    my $result = $api_instance->addTransaction(clientId => $clientId, reqMsgId => $reqMsgId, accept => $accept, contentType => $contentType, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PaymentApi->addTransaction: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: jwsAuth
swagger_client.configuration.api_key['X-Content-Signature'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Content-Signature'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.PaymentApi()
clientId = clientId_example # String | (maxLength:64) Provided by Alipay, used to identify partner and application system
reqMsgId = reqMsgId_example # String | (maxLength:64) 請求冪等ID。內容需要與請求body中的業務冪等ID(例如merchantTransId)保持一致。
accept = accept_example # String | application/vnd.alipayhk.payment-v1+json
contentType = contentType_example # String | application/json
body =  # Transaction | Transaction object

try: 
    # 發起一筆新的乘車碼支付
    api_response = api_instance.add_transaction(clientId, reqMsgId, accept, contentType, body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PaymentApi->addTransaction: %s\n" % e)

Parameters

Header parameters
Name Description
clientId*
String
(maxLength:64) Provided by Alipay, used to identify partner and application system
Required
reqMsgId*
String
(maxLength:64) 請求冪等ID。內容需要與請求body中的業務冪等ID(例如merchantTransId)保持一致。
Required
Accept*
String
application/vnd.alipayhk.payment-v1+json
Required
Content-Type*
String
application/json
Required
Body parameters
Name Description
body *

Responses

Status: 200 - successful operation

Status: 400 - 錯誤返回


getRefundById

使用 refundId 查詢退款狀態

错误码: | HTTP status Code | code | info | description | |----------|----------|----------|----------| | 404 | 12005004 | ORDER_NOT_EXIST | 单据不存在 |


/traffic/refunds/{refundId}

Usage and SDK Samples

curl -X GET -H "X-Content-Signature: [[jwsSignature]]" "https://traffic.alipayhk.com/traffic/refunds/{refundId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PaymentApi;

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

public class PaymentApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: jwsAuth
        ApiKeyAuth jwsAuth = (ApiKeyAuth) defaultClient.getAuthentication("jwsAuth");
        jwsAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //jwsAuth.setApiKeyPrefix("Token");

        PaymentApi apiInstance = new PaymentApi();
        String clientId = clientId_example; // String | (maxLength:64) Provided by Alipay, used to identify partner and application system
        String accept = accept_example; // String | application/vnd.alipayhk.payment-v1+json
        String contentType = contentType_example; // String | application/json
        String refundId = refundId_example; // String | ID of refund order
        try {
            Refund result = apiInstance.getRefundById(clientId, accept, contentType, refundId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PaymentApi#getRefundById");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PaymentApi;

public class PaymentApiExample {

    public static void main(String[] args) {
        PaymentApi apiInstance = new PaymentApi();
        String clientId = clientId_example; // String | (maxLength:64) Provided by Alipay, used to identify partner and application system
        String accept = accept_example; // String | application/vnd.alipayhk.payment-v1+json
        String contentType = contentType_example; // String | application/json
        String refundId = refundId_example; // String | ID of refund order
        try {
            Refund result = apiInstance.getRefundById(clientId, accept, contentType, refundId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PaymentApi#getRefundById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: jwsAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Content-Signature"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Content-Signature"];

String *clientId = clientId_example; // (maxLength:64) Provided by Alipay, used to identify partner and application system
String *accept = accept_example; // application/vnd.alipayhk.payment-v1+json
String *contentType = contentType_example; // application/json
String *refundId = refundId_example; // ID of refund order

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

// 使用 refundId 查詢退款狀態
[apiInstance getRefundByIdWith:clientId
    accept:accept
    contentType:contentType
    refundId:refundId
              completionHandler: ^(Refund output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AlipayHkTrafficPlatformInterface = require('alipay_hk_traffic_platform_interface');
var defaultClient = AlipayHkTrafficPlatformInterface.ApiClient.instance;

// Configure API key authorization: jwsAuth
var jwsAuth = defaultClient.authentications['jwsAuth'];
jwsAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//jwsAuth.apiKeyPrefix['X-Content-Signature'] = "Token"

var api = new AlipayHkTrafficPlatformInterface.PaymentApi()

var clientId = clientId_example; // {String} (maxLength:64) Provided by Alipay, used to identify partner and application system

var accept = accept_example; // {String} application/vnd.alipayhk.payment-v1+json

var contentType = contentType_example; // {String} application/json

var refundId = refundId_example; // {String} ID of refund order


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

namespace Example
{
    public class getRefundByIdExample
    {
        public void main()
        {
            
            // Configure API key authorization: jwsAuth
            Configuration.Default.ApiKey.Add("X-Content-Signature", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Content-Signature", "Bearer");

            var apiInstance = new PaymentApi();
            var clientId = clientId_example;  // String | (maxLength:64) Provided by Alipay, used to identify partner and application system
            var accept = accept_example;  // String | application/vnd.alipayhk.payment-v1+json
            var contentType = contentType_example;  // String | application/json
            var refundId = refundId_example;  // String | ID of refund order

            try
            {
                // 使用 refundId 查詢退款狀態
                Refund result = apiInstance.getRefundById(clientId, accept, contentType, refundId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PaymentApi.getRefundById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: jwsAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Content-Signature', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Content-Signature', 'Bearer');

$api_instance = new Swagger\Client\Api\PaymentApi();
$clientId = clientId_example; // String | (maxLength:64) Provided by Alipay, used to identify partner and application system
$accept = accept_example; // String | application/vnd.alipayhk.payment-v1+json
$contentType = contentType_example; // String | application/json
$refundId = refundId_example; // String | ID of refund order

try {
    $result = $api_instance->getRefundById($clientId, $accept, $contentType, $refundId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PaymentApi->getRefundById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PaymentApi;

# Configure API key authorization: jwsAuth
$WWW::SwaggerClient::Configuration::api_key->{'X-Content-Signature'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-Content-Signature'} = "Bearer";

my $api_instance = WWW::SwaggerClient::PaymentApi->new();
my $clientId = clientId_example; # String | (maxLength:64) Provided by Alipay, used to identify partner and application system
my $accept = accept_example; # String | application/vnd.alipayhk.payment-v1+json
my $contentType = contentType_example; # String | application/json
my $refundId = refundId_example; # String | ID of refund order

eval { 
    my $result = $api_instance->getRefundById(clientId => $clientId, accept => $accept, contentType => $contentType, refundId => $refundId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PaymentApi->getRefundById: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: jwsAuth
swagger_client.configuration.api_key['X-Content-Signature'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Content-Signature'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.PaymentApi()
clientId = clientId_example # String | (maxLength:64) Provided by Alipay, used to identify partner and application system
accept = accept_example # String | application/vnd.alipayhk.payment-v1+json
contentType = contentType_example # String | application/json
refundId = refundId_example # String | ID of refund order

try: 
    # 使用 refundId 查詢退款狀態
    api_response = api_instance.get_refund_by_id(clientId, accept, contentType, refundId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PaymentApi->getRefundById: %s\n" % e)

Parameters

Path parameters
Name Description
refundId*
String
ID of refund order
Required
Header parameters
Name Description
clientId*
String
(maxLength:64) Provided by Alipay, used to identify partner and application system
Required
Accept*
String
application/vnd.alipayhk.payment-v1+json
Required
Content-Type*
String
application/json
Required

Responses

Status: 200 - SUCCESS

Status: 400 - 錯誤返回


getTransactionById

Find transaction by ID

错误码: | HTTP status Code | code | info | description | |----------|----------|----------|----------| | 404 | 12005004 | ORDER_NOT_EXIST | 单据不存在 |


/traffic/transactions/{transactionId}

Usage and SDK Samples

curl -X GET -H "X-Content-Signature: [[jwsSignature]]" "https://traffic.alipayhk.com/traffic/transactions/{transactionId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PaymentApi;

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

public class PaymentApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: jwsAuth
        ApiKeyAuth jwsAuth = (ApiKeyAuth) defaultClient.getAuthentication("jwsAuth");
        jwsAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //jwsAuth.setApiKeyPrefix("Token");

        PaymentApi apiInstance = new PaymentApi();
        String clientId = clientId_example; // String | (maxLength:64) Provided by Alipay, used to identify partner and application system
        String accept = accept_example; // String | application/vnd.alipayhk.payment-v1+json
        String contentType = contentType_example; // String | application/json
        String transactionId = transactionId_example; // String | ID of transaction
        try {
            Transaction result = apiInstance.getTransactionById(clientId, accept, contentType, transactionId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PaymentApi#getTransactionById");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PaymentApi;

public class PaymentApiExample {

    public static void main(String[] args) {
        PaymentApi apiInstance = new PaymentApi();
        String clientId = clientId_example; // String | (maxLength:64) Provided by Alipay, used to identify partner and application system
        String accept = accept_example; // String | application/vnd.alipayhk.payment-v1+json
        String contentType = contentType_example; // String | application/json
        String transactionId = transactionId_example; // String | ID of transaction
        try {
            Transaction result = apiInstance.getTransactionById(clientId, accept, contentType, transactionId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PaymentApi#getTransactionById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: jwsAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Content-Signature"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Content-Signature"];

String *clientId = clientId_example; // (maxLength:64) Provided by Alipay, used to identify partner and application system
String *accept = accept_example; // application/vnd.alipayhk.payment-v1+json
String *contentType = contentType_example; // application/json
String *transactionId = transactionId_example; // ID of transaction

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

// Find transaction by ID
[apiInstance getTransactionByIdWith:clientId
    accept:accept
    contentType:contentType
    transactionId:transactionId
              completionHandler: ^(Transaction output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AlipayHkTrafficPlatformInterface = require('alipay_hk_traffic_platform_interface');
var defaultClient = AlipayHkTrafficPlatformInterface.ApiClient.instance;

// Configure API key authorization: jwsAuth
var jwsAuth = defaultClient.authentications['jwsAuth'];
jwsAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//jwsAuth.apiKeyPrefix['X-Content-Signature'] = "Token"

var api = new AlipayHkTrafficPlatformInterface.PaymentApi()

var clientId = clientId_example; // {String} (maxLength:64) Provided by Alipay, used to identify partner and application system

var accept = accept_example; // {String} application/vnd.alipayhk.payment-v1+json

var contentType = contentType_example; // {String} application/json

var transactionId = transactionId_example; // {String} ID of transaction


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

namespace Example
{
    public class getTransactionByIdExample
    {
        public void main()
        {
            
            // Configure API key authorization: jwsAuth
            Configuration.Default.ApiKey.Add("X-Content-Signature", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Content-Signature", "Bearer");

            var apiInstance = new PaymentApi();
            var clientId = clientId_example;  // String | (maxLength:64) Provided by Alipay, used to identify partner and application system
            var accept = accept_example;  // String | application/vnd.alipayhk.payment-v1+json
            var contentType = contentType_example;  // String | application/json
            var transactionId = transactionId_example;  // String | ID of transaction

            try
            {
                // Find transaction by ID
                Transaction result = apiInstance.getTransactionById(clientId, accept, contentType, transactionId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PaymentApi.getTransactionById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: jwsAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Content-Signature', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Content-Signature', 'Bearer');

$api_instance = new Swagger\Client\Api\PaymentApi();
$clientId = clientId_example; // String | (maxLength:64) Provided by Alipay, used to identify partner and application system
$accept = accept_example; // String | application/vnd.alipayhk.payment-v1+json
$contentType = contentType_example; // String | application/json
$transactionId = transactionId_example; // String | ID of transaction

try {
    $result = $api_instance->getTransactionById($clientId, $accept, $contentType, $transactionId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PaymentApi->getTransactionById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PaymentApi;

# Configure API key authorization: jwsAuth
$WWW::SwaggerClient::Configuration::api_key->{'X-Content-Signature'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-Content-Signature'} = "Bearer";

my $api_instance = WWW::SwaggerClient::PaymentApi->new();
my $clientId = clientId_example; # String | (maxLength:64) Provided by Alipay, used to identify partner and application system
my $accept = accept_example; # String | application/vnd.alipayhk.payment-v1+json
my $contentType = contentType_example; # String | application/json
my $transactionId = transactionId_example; # String | ID of transaction

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

# Configure API key authorization: jwsAuth
swagger_client.configuration.api_key['X-Content-Signature'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Content-Signature'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.PaymentApi()
clientId = clientId_example # String | (maxLength:64) Provided by Alipay, used to identify partner and application system
accept = accept_example # String | application/vnd.alipayhk.payment-v1+json
contentType = contentType_example # String | application/json
transactionId = transactionId_example # String | ID of transaction

try: 
    # Find transaction by ID
    api_response = api_instance.get_transaction_by_id(clientId, accept, contentType, transactionId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PaymentApi->getTransactionById: %s\n" % e)

Parameters

Path parameters
Name Description
transactionId*
String
ID of transaction
Required
Header parameters
Name Description
clientId*
String
(maxLength:64) Provided by Alipay, used to identify partner and application system
Required
Accept*
String
application/vnd.alipayhk.payment-v1+json
Required
Content-Type*
String
application/json
Required

Responses

Status: 200 - successful operation

Status: 400 - 錯誤返回


queryRefunds

退款查詢

错误码: | HTTP status Code | code | info | description | |----------|----------|----------|----------| | 404 | 12005004 | ORDER_NOT_EXIST | 单据不存在 |


/traffic/refunds

Usage and SDK Samples

curl -X GET -H "X-Content-Signature: [[jwsSignature]]" "https://traffic.alipayhk.com/traffic/refunds?refundId=&merchantRefundId="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PaymentApi;

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

public class PaymentApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: jwsAuth
        ApiKeyAuth jwsAuth = (ApiKeyAuth) defaultClient.getAuthentication("jwsAuth");
        jwsAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //jwsAuth.setApiKeyPrefix("Token");

        PaymentApi apiInstance = new PaymentApi();
        String clientId = clientId_example; // String | (maxLength:64) Provided by Alipay, used to identify partner and application system
        String accept = accept_example; // String | application/vnd.alipayhk.payment-v1+json
        String contentType = contentType_example; // String | application/json
        String refundId = refundId_example; // String | AlipayHK 生成的退款單 ID
        String merchantRefundId = merchantRefundId_example; // String | 商戶生成的退款單 ID
        try {
            ArrayOfRefund result = apiInstance.queryRefunds(clientId, accept, contentType, refundId, merchantRefundId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PaymentApi#queryRefunds");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PaymentApi;

public class PaymentApiExample {

    public static void main(String[] args) {
        PaymentApi apiInstance = new PaymentApi();
        String clientId = clientId_example; // String | (maxLength:64) Provided by Alipay, used to identify partner and application system
        String accept = accept_example; // String | application/vnd.alipayhk.payment-v1+json
        String contentType = contentType_example; // String | application/json
        String refundId = refundId_example; // String | AlipayHK 生成的退款單 ID
        String merchantRefundId = merchantRefundId_example; // String | 商戶生成的退款單 ID
        try {
            ArrayOfRefund result = apiInstance.queryRefunds(clientId, accept, contentType, refundId, merchantRefundId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PaymentApi#queryRefunds");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: jwsAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Content-Signature"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Content-Signature"];

String *clientId = clientId_example; // (maxLength:64) Provided by Alipay, used to identify partner and application system
String *accept = accept_example; // application/vnd.alipayhk.payment-v1+json
String *contentType = contentType_example; // application/json
String *refundId = refundId_example; // AlipayHK 生成的退款單 ID (optional)
String *merchantRefundId = merchantRefundId_example; // 商戶生成的退款單 ID (optional)

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

// 退款查詢
[apiInstance queryRefundsWith:clientId
    accept:accept
    contentType:contentType
    refundId:refundId
    merchantRefundId:merchantRefundId
              completionHandler: ^(ArrayOfRefund output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AlipayHkTrafficPlatformInterface = require('alipay_hk_traffic_platform_interface');
var defaultClient = AlipayHkTrafficPlatformInterface.ApiClient.instance;

// Configure API key authorization: jwsAuth
var jwsAuth = defaultClient.authentications['jwsAuth'];
jwsAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//jwsAuth.apiKeyPrefix['X-Content-Signature'] = "Token"

var api = new AlipayHkTrafficPlatformInterface.PaymentApi()

var clientId = clientId_example; // {String} (maxLength:64) Provided by Alipay, used to identify partner and application system

var accept = accept_example; // {String} application/vnd.alipayhk.payment-v1+json

var contentType = contentType_example; // {String} application/json

var opts = { 
  'refundId': refundId_example, // {String} AlipayHK 生成的退款單 ID
  'merchantRefundId': merchantRefundId_example // {String} 商戶生成的退款單 ID
};

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

namespace Example
{
    public class queryRefundsExample
    {
        public void main()
        {
            
            // Configure API key authorization: jwsAuth
            Configuration.Default.ApiKey.Add("X-Content-Signature", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Content-Signature", "Bearer");

            var apiInstance = new PaymentApi();
            var clientId = clientId_example;  // String | (maxLength:64) Provided by Alipay, used to identify partner and application system
            var accept = accept_example;  // String | application/vnd.alipayhk.payment-v1+json
            var contentType = contentType_example;  // String | application/json
            var refundId = refundId_example;  // String | AlipayHK 生成的退款單 ID (optional) 
            var merchantRefundId = merchantRefundId_example;  // String | 商戶生成的退款單 ID (optional) 

            try
            {
                // 退款查詢
                ArrayOfRefund result = apiInstance.queryRefunds(clientId, accept, contentType, refundId, merchantRefundId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PaymentApi.queryRefunds: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: jwsAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Content-Signature', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Content-Signature', 'Bearer');

$api_instance = new Swagger\Client\Api\PaymentApi();
$clientId = clientId_example; // String | (maxLength:64) Provided by Alipay, used to identify partner and application system
$accept = accept_example; // String | application/vnd.alipayhk.payment-v1+json
$contentType = contentType_example; // String | application/json
$refundId = refundId_example; // String | AlipayHK 生成的退款單 ID
$merchantRefundId = merchantRefundId_example; // String | 商戶生成的退款單 ID

try {
    $result = $api_instance->queryRefunds($clientId, $accept, $contentType, $refundId, $merchantRefundId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PaymentApi->queryRefunds: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PaymentApi;

# Configure API key authorization: jwsAuth
$WWW::SwaggerClient::Configuration::api_key->{'X-Content-Signature'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-Content-Signature'} = "Bearer";

my $api_instance = WWW::SwaggerClient::PaymentApi->new();
my $clientId = clientId_example; # String | (maxLength:64) Provided by Alipay, used to identify partner and application system
my $accept = accept_example; # String | application/vnd.alipayhk.payment-v1+json
my $contentType = contentType_example; # String | application/json
my $refundId = refundId_example; # String | AlipayHK 生成的退款單 ID
my $merchantRefundId = merchantRefundId_example; # String | 商戶生成的退款單 ID

eval { 
    my $result = $api_instance->queryRefunds(clientId => $clientId, accept => $accept, contentType => $contentType, refundId => $refundId, merchantRefundId => $merchantRefundId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PaymentApi->queryRefunds: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: jwsAuth
swagger_client.configuration.api_key['X-Content-Signature'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Content-Signature'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.PaymentApi()
clientId = clientId_example # String | (maxLength:64) Provided by Alipay, used to identify partner and application system
accept = accept_example # String | application/vnd.alipayhk.payment-v1+json
contentType = contentType_example # String | application/json
refundId = refundId_example # String | AlipayHK 生成的退款單 ID (optional)
merchantRefundId = merchantRefundId_example # String | 商戶生成的退款單 ID (optional)

try: 
    # 退款查詢
    api_response = api_instance.query_refunds(clientId, accept, contentType, refundId=refundId, merchantRefundId=merchantRefundId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PaymentApi->queryRefunds: %s\n" % e)

Parameters

Header parameters
Name Description
clientId*
String
(maxLength:64) Provided by Alipay, used to identify partner and application system
Required
Accept*
String
application/vnd.alipayhk.payment-v1+json
Required
Content-Type*
String
application/json
Required
Query parameters
Name Description
refundId
String
AlipayHK 生成的退款單 ID
merchantRefundId
String
商戶生成的退款單 ID

Responses

Status: 200 - successful operation

Status: 400 - 錯誤返回


queryTransactions

支付查詢

错误码: | HTTP status Code | code | info | description | |----------|----------|----------|----------| | 404 | 12005004 | ORDER_NOT_EXIST | 单据不存在 |


/traffic/transactions

Usage and SDK Samples

curl -X GET -H "X-Content-Signature: [[jwsSignature]]" "https://traffic.alipayhk.com/traffic/transactions?transactionId=&merchantTransId="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PaymentApi;

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

public class PaymentApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: jwsAuth
        ApiKeyAuth jwsAuth = (ApiKeyAuth) defaultClient.getAuthentication("jwsAuth");
        jwsAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //jwsAuth.setApiKeyPrefix("Token");

        PaymentApi apiInstance = new PaymentApi();
        String clientId = clientId_example; // String | (maxLength:64) Provided by Alipay, used to identify partner and application system
        String accept = accept_example; // String | application/vnd.alipayhk.payment-v1+json
        String contentType = contentType_example; // String | application/json
        String transactionId = transactionId_example; // String | AlipayHK 生成的支付單 ID
        String merchantTransId = merchantTransId_example; // String | 商戶生成的單據 ID
        try {
            ArrayOfTransaction result = apiInstance.queryTransactions(clientId, accept, contentType, transactionId, merchantTransId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PaymentApi#queryTransactions");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PaymentApi;

public class PaymentApiExample {

    public static void main(String[] args) {
        PaymentApi apiInstance = new PaymentApi();
        String clientId = clientId_example; // String | (maxLength:64) Provided by Alipay, used to identify partner and application system
        String accept = accept_example; // String | application/vnd.alipayhk.payment-v1+json
        String contentType = contentType_example; // String | application/json
        String transactionId = transactionId_example; // String | AlipayHK 生成的支付單 ID
        String merchantTransId = merchantTransId_example; // String | 商戶生成的單據 ID
        try {
            ArrayOfTransaction result = apiInstance.queryTransactions(clientId, accept, contentType, transactionId, merchantTransId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PaymentApi#queryTransactions");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: jwsAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Content-Signature"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Content-Signature"];

String *clientId = clientId_example; // (maxLength:64) Provided by Alipay, used to identify partner and application system
String *accept = accept_example; // application/vnd.alipayhk.payment-v1+json
String *contentType = contentType_example; // application/json
String *transactionId = transactionId_example; // AlipayHK 生成的支付單 ID (optional)
String *merchantTransId = merchantTransId_example; // 商戶生成的單據 ID (optional)

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

// 支付查詢
[apiInstance queryTransactionsWith:clientId
    accept:accept
    contentType:contentType
    transactionId:transactionId
    merchantTransId:merchantTransId
              completionHandler: ^(ArrayOfTransaction output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AlipayHkTrafficPlatformInterface = require('alipay_hk_traffic_platform_interface');
var defaultClient = AlipayHkTrafficPlatformInterface.ApiClient.instance;

// Configure API key authorization: jwsAuth
var jwsAuth = defaultClient.authentications['jwsAuth'];
jwsAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//jwsAuth.apiKeyPrefix['X-Content-Signature'] = "Token"

var api = new AlipayHkTrafficPlatformInterface.PaymentApi()

var clientId = clientId_example; // {String} (maxLength:64) Provided by Alipay, used to identify partner and application system

var accept = accept_example; // {String} application/vnd.alipayhk.payment-v1+json

var contentType = contentType_example; // {String} application/json

var opts = { 
  'transactionId': transactionId_example, // {String} AlipayHK 生成的支付單 ID
  'merchantTransId': merchantTransId_example // {String} 商戶生成的單據 ID
};

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

namespace Example
{
    public class queryTransactionsExample
    {
        public void main()
        {
            
            // Configure API key authorization: jwsAuth
            Configuration.Default.ApiKey.Add("X-Content-Signature", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Content-Signature", "Bearer");

            var apiInstance = new PaymentApi();
            var clientId = clientId_example;  // String | (maxLength:64) Provided by Alipay, used to identify partner and application system
            var accept = accept_example;  // String | application/vnd.alipayhk.payment-v1+json
            var contentType = contentType_example;  // String | application/json
            var transactionId = transactionId_example;  // String | AlipayHK 生成的支付單 ID (optional) 
            var merchantTransId = merchantTransId_example;  // String | 商戶生成的單據 ID (optional) 

            try
            {
                // 支付查詢
                ArrayOfTransaction result = apiInstance.queryTransactions(clientId, accept, contentType, transactionId, merchantTransId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PaymentApi.queryTransactions: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: jwsAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Content-Signature', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Content-Signature', 'Bearer');

$api_instance = new Swagger\Client\Api\PaymentApi();
$clientId = clientId_example; // String | (maxLength:64) Provided by Alipay, used to identify partner and application system
$accept = accept_example; // String | application/vnd.alipayhk.payment-v1+json
$contentType = contentType_example; // String | application/json
$transactionId = transactionId_example; // String | AlipayHK 生成的支付單 ID
$merchantTransId = merchantTransId_example; // String | 商戶生成的單據 ID

try {
    $result = $api_instance->queryTransactions($clientId, $accept, $contentType, $transactionId, $merchantTransId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PaymentApi->queryTransactions: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PaymentApi;

# Configure API key authorization: jwsAuth
$WWW::SwaggerClient::Configuration::api_key->{'X-Content-Signature'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-Content-Signature'} = "Bearer";

my $api_instance = WWW::SwaggerClient::PaymentApi->new();
my $clientId = clientId_example; # String | (maxLength:64) Provided by Alipay, used to identify partner and application system
my $accept = accept_example; # String | application/vnd.alipayhk.payment-v1+json
my $contentType = contentType_example; # String | application/json
my $transactionId = transactionId_example; # String | AlipayHK 生成的支付單 ID
my $merchantTransId = merchantTransId_example; # String | 商戶生成的單據 ID

eval { 
    my $result = $api_instance->queryTransactions(clientId => $clientId, accept => $accept, contentType => $contentType, transactionId => $transactionId, merchantTransId => $merchantTransId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PaymentApi->queryTransactions: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: jwsAuth
swagger_client.configuration.api_key['X-Content-Signature'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Content-Signature'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.PaymentApi()
clientId = clientId_example # String | (maxLength:64) Provided by Alipay, used to identify partner and application system
accept = accept_example # String | application/vnd.alipayhk.payment-v1+json
contentType = contentType_example # String | application/json
transactionId = transactionId_example # String | AlipayHK 生成的支付單 ID (optional)
merchantTransId = merchantTransId_example # String | 商戶生成的單據 ID (optional)

try: 
    # 支付查詢
    api_response = api_instance.query_transactions(clientId, accept, contentType, transactionId=transactionId, merchantTransId=merchantTransId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PaymentApi->queryTransactions: %s\n" % e)

Parameters

Header parameters
Name Description
clientId*
String
(maxLength:64) Provided by Alipay, used to identify partner and application system
Required
Accept*
String
application/vnd.alipayhk.payment-v1+json
Required
Content-Type*
String
application/json
Required
Query parameters
Name Description
transactionId
String
AlipayHK 生成的支付單 ID
merchantTransId
String
商戶生成的單據 ID

Responses

Status: 200 - successful operation

Status: 400 - 錯誤返回


refundCallback

【不是必须实现】 商戶提供退款回調接口,其中refundAmount是单笔退款金额,Alipay 會調用該接口返回交易結果,只要回調接口返回200,就不再重試


/refundCallback

Usage and SDK Samples

curl -X POST -H "X-Content-Signature: [[jwsSignature]]" "https://traffic.alipayhk.com/refundCallback"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PaymentApi;

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

public class PaymentApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: jwsAuth
        ApiKeyAuth jwsAuth = (ApiKeyAuth) defaultClient.getAuthentication("jwsAuth");
        jwsAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //jwsAuth.setApiKeyPrefix("Token");

        PaymentApi apiInstance = new PaymentApi();
        RefundCallbackRequest body = ; // RefundCallbackRequest | 
        try {
            apiInstance.refundCallback(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling PaymentApi#refundCallback");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PaymentApi;

public class PaymentApiExample {

    public static void main(String[] args) {
        PaymentApi apiInstance = new PaymentApi();
        RefundCallbackRequest body = ; // RefundCallbackRequest | 
        try {
            apiInstance.refundCallback(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling PaymentApi#refundCallback");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: jwsAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Content-Signature"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Content-Signature"];

RefundCallbackRequest *body = ; // 

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

// 【不是必须实现】 商戶提供退款回調接口,其中refundAmount是单笔退款金额,Alipay 會調用該接口返回交易結果,只要回調接口返回200,就不再重試
[apiInstance refundCallbackWith:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AlipayHkTrafficPlatformInterface = require('alipay_hk_traffic_platform_interface');
var defaultClient = AlipayHkTrafficPlatformInterface.ApiClient.instance;

// Configure API key authorization: jwsAuth
var jwsAuth = defaultClient.authentications['jwsAuth'];
jwsAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//jwsAuth.apiKeyPrefix['X-Content-Signature'] = "Token"

var api = new AlipayHkTrafficPlatformInterface.PaymentApi()

var body = ; // {RefundCallbackRequest} 


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

namespace Example
{
    public class refundCallbackExample
    {
        public void main()
        {
            
            // Configure API key authorization: jwsAuth
            Configuration.Default.ApiKey.Add("X-Content-Signature", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Content-Signature", "Bearer");

            var apiInstance = new PaymentApi();
            var body = new RefundCallbackRequest(); // RefundCallbackRequest | 

            try
            {
                // 【不是必须实现】 商戶提供退款回調接口,其中refundAmount是单笔退款金额,Alipay 會調用該接口返回交易結果,只要回調接口返回200,就不再重試
                apiInstance.refundCallback(body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PaymentApi.refundCallback: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: jwsAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Content-Signature', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Content-Signature', 'Bearer');

$api_instance = new Swagger\Client\Api\PaymentApi();
$body = ; // RefundCallbackRequest | 

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

# Configure API key authorization: jwsAuth
$WWW::SwaggerClient::Configuration::api_key->{'X-Content-Signature'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-Content-Signature'} = "Bearer";

my $api_instance = WWW::SwaggerClient::PaymentApi->new();
my $body = WWW::SwaggerClient::Object::RefundCallbackRequest->new(); # RefundCallbackRequest | 

eval { 
    $api_instance->refundCallback(body => $body);
};
if ($@) {
    warn "Exception when calling PaymentApi->refundCallback: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: jwsAuth
swagger_client.configuration.api_key['X-Content-Signature'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Content-Signature'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.PaymentApi()
body =  # RefundCallbackRequest | 

try: 
    # 【不是必须实现】 商戶提供退款回調接口,其中refundAmount是单笔退款金额,Alipay 會調用該接口返回交易結果,只要回調接口返回200,就不再重試
    api_instance.refund_callback(body)
except ApiException as e:
    print("Exception when calling PaymentApi->refundCallback: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - SUCCESS


transactionCallback

【不是必须实现】 商戶提供交易回調接口,Alipay 會調用該接口返回交易結果,只要回調接口返回200,就不再重試


/transactionCallback

Usage and SDK Samples

curl -X POST -H "X-Content-Signature: [[jwsSignature]]" "https://traffic.alipayhk.com/transactionCallback"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PaymentApi;

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

public class PaymentApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: jwsAuth
        ApiKeyAuth jwsAuth = (ApiKeyAuth) defaultClient.getAuthentication("jwsAuth");
        jwsAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //jwsAuth.setApiKeyPrefix("Token");

        PaymentApi apiInstance = new PaymentApi();
        TransactionCallbackRequest body = ; // TransactionCallbackRequest | Transaction object that needs to be added to the store
        try {
            apiInstance.transactionCallback(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling PaymentApi#transactionCallback");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PaymentApi;

public class PaymentApiExample {

    public static void main(String[] args) {
        PaymentApi apiInstance = new PaymentApi();
        TransactionCallbackRequest body = ; // TransactionCallbackRequest | Transaction object that needs to be added to the store
        try {
            apiInstance.transactionCallback(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling PaymentApi#transactionCallback");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: jwsAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Content-Signature"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Content-Signature"];

TransactionCallbackRequest *body = ; // Transaction object that needs to be added to the store

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

// 【不是必须实现】 商戶提供交易回調接口,Alipay 會調用該接口返回交易結果,只要回調接口返回200,就不再重試
[apiInstance transactionCallbackWith:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AlipayHkTrafficPlatformInterface = require('alipay_hk_traffic_platform_interface');
var defaultClient = AlipayHkTrafficPlatformInterface.ApiClient.instance;

// Configure API key authorization: jwsAuth
var jwsAuth = defaultClient.authentications['jwsAuth'];
jwsAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//jwsAuth.apiKeyPrefix['X-Content-Signature'] = "Token"

var api = new AlipayHkTrafficPlatformInterface.PaymentApi()

var body = ; // {TransactionCallbackRequest} Transaction object that needs to be added to the store


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

namespace Example
{
    public class transactionCallbackExample
    {
        public void main()
        {
            
            // Configure API key authorization: jwsAuth
            Configuration.Default.ApiKey.Add("X-Content-Signature", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Content-Signature", "Bearer");

            var apiInstance = new PaymentApi();
            var body = new TransactionCallbackRequest(); // TransactionCallbackRequest | Transaction object that needs to be added to the store

            try
            {
                // 【不是必须实现】 商戶提供交易回調接口,Alipay 會調用該接口返回交易結果,只要回調接口返回200,就不再重試
                apiInstance.transactionCallback(body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PaymentApi.transactionCallback: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: jwsAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Content-Signature', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Content-Signature', 'Bearer');

$api_instance = new Swagger\Client\Api\PaymentApi();
$body = ; // TransactionCallbackRequest | Transaction object that needs to be added to the store

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

# Configure API key authorization: jwsAuth
$WWW::SwaggerClient::Configuration::api_key->{'X-Content-Signature'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-Content-Signature'} = "Bearer";

my $api_instance = WWW::SwaggerClient::PaymentApi->new();
my $body = WWW::SwaggerClient::Object::TransactionCallbackRequest->new(); # TransactionCallbackRequest | Transaction object that needs to be added to the store

eval { 
    $api_instance->transactionCallback(body => $body);
};
if ($@) {
    warn "Exception when calling PaymentApi->transactionCallback: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: jwsAuth
swagger_client.configuration.api_key['X-Content-Signature'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Content-Signature'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.PaymentApi()
body =  # TransactionCallbackRequest | Transaction object that needs to be added to the store

try: 
    # 【不是必须实现】 商戶提供交易回調接口,Alipay 會調用該接口返回交易結果,只要回調接口返回200,就不再重試
    api_instance.transaction_callback(body)
except ApiException as e:
    print("Exception when calling PaymentApi->transactionCallback: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - SUCCESS