娱乐

资金API

该API用于经典集成方案,提供管理平台账户资金的端点功能,包括资金分配、余额查询等操作。如需全新集成请参考官方最新指南。

查看官方文档 ↗

接入教程

1. 注册Adyen平台账户并获取API密钥
2. 配置API请求头中的身份验证信息
3. 调用/accounts端点获取账户列表
4. 使用/funds端点进行资金操作
5. 通过webhook接收资金状态通知
6. 在仪表板查看资金流转记录

Python查询账户余额示例

python
import requests

url = "https://api.example.com/v1/accounts/balance"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json"
}
params = {
    "accountId": "ACC123456"
}

response = requests.get(url, headers=headers, params=params)
print(f"Status Code: {response.status_code}")
print(f"Response: {response.json()}")

PHP资金分配示例

php
<?php

$url = "https://api.example.com/v1/funds/allocate";
$apiKey = "YOUR_API_KEY";

$data = [
    "sourceAccount" => "ACC123456",
    "destinationAccount" => "ACC789012",
    "amount" => 1000.50,
    "currency" => "USD"
];

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer " . $apiKey,
    "Content-Type: application/json"
]);

$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

echo "Status Code: " . $httpCode . "\n";
echo "Response: " . $response . "\n";

?>

JavaScript交易记录查询示例

javascript
const fetch = require('node-fetch');

async function getTransactionHistory() {
    const url = "https://api.example.com/v1/transactions";
    const apiKey = "YOUR_API_KEY";
    
    const params = new URLSearchParams({
        accountId: "ACC123456",
        startDate: "2024-01-01",
        endDate: "2024-01-31"
    });
    
    try {
        const response = await fetch(`${url}?${params}`, {
            method: 'GET',
            headers: {
                'Authorization': `Bearer ${apiKey}`,
                'Content-Type': 'application/json'
            }
        });
        
        console.log(`Status Code: ${response.status}`);
        const data = await response.json();
        console.log(`Response: ${JSON.stringify(data, null, 2)}`);
    } catch (error) {
        console.error(`Error: ${error.message}`);
    }
}

getTransactionHistory();

常见问题

如何获取API密钥?

API密钥需要在平台管理后台申请,具体路径为:设置 > 开发者 > API密钥管理。请妥善保管密钥,不要泄露给第三方。

资金API支持哪些货币类型?

资金API支持主流国际货币,包括USD、EUR、GBP、JPY、CNY等。具体支持的货币列表请参考官方文档的货币代码章节。

API调用频率有限制吗?

是的,资金API有调用频率限制。免费套餐每分钟最多60次调用,企业套餐可根据合同约定调整。超出限制会返回429状态码。

相似接口推荐

AWS Compute Optimizer

Compute Optimizer是一项分析亚马逊云服务计算资源配置和利用率的服务,涵盖Amazon EC2实例、Auto Scaling组、Lambda函数、EBS卷及Fargate上的ECS服务。它会评估资源使用效率

待确认
转账API

该API提供端点,用于查询所有交易信息、在余额平台内转移资金,或将资金从余额平台发送至转账工具。

待确认
Square支付

Square提供便捷的在线收款解决方案,支持支付处理和退款管理,帮助商家优化客户结账体验。

免费试用
狗事实API

提供随机狗事实的简单REST API,可用于娱乐或教育目的

免费