其他

账户API

该API用于经典集成方案,提供管理平台账户相关实体的端点。如需开始新集成,请参考新版集成指南。

查看官方文档 ↗

接入教程

1. 注册Adyen账户获取API密钥
2. 在代码中配置API端点地址
3. 调用账户创建接口初始化账户
4. 使用账户查询接口管理实体
5. 根据业务需求调用其他账户接口

使用Python获取账户信息

python
import requests

url = 'https://api.example.com/v1/accounts/retrieve'
headers = {
    'X-API-Key': 'YOUR_API_KEY',
    'Content-Type': 'application/json'
}
payload = {
    'accountId': 'ACC12345'
}

response = requests.post(url, json=payload, headers=headers)
if response.status_code == 200:
    account_data = response.json()
    print('Account retrieved:', account_data)
else:
    print('Error:', response.status_code, response.text)

使用PHP创建新账户

php
<?php

$url = 'https://api.example.com/v1/accounts/create';
$apiKey = 'YOUR_API_KEY';

$data = [
    'name' => 'Example Corp',
    'email' => 'contact@example.com',
    'country' => 'US'
];

$options = [
    'http' => [
        'header' => "X-API-Key: $apiKey\r\nContent-Type: application/json",
        'method' => 'POST',
        'content' => json_encode($data)
    ]
];

$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);

if ($result !== FALSE) {
    $response = json_decode($result, true);
    echo 'Account created with ID: ' . $response['accountId'];
} else {
    echo 'Failed to create account.';
}

?>

使用JavaScript更新账户状态

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

const url = 'https://api.example.com/v1/accounts/update-status';
const apiKey = 'YOUR_API_KEY';

const payload = {
    accountId: 'ACC12345',
    status: 'active'
};

fetch(url, {
    method: 'POST',
    headers: {
        'X-API-Key': apiKey,
        'Content-Type': 'application/json'
    },
    body: JSON.stringify(payload)
})
.then(response => response.json())
.then(data => {
    console.log('Account status updated:', data);
})
.catch(error => {
    console.error('Error:', error);
});

常见问题

该API是否需要认证?

是的,调用账户API需要在请求头中提供有效的API密钥进行认证,通常使用X-API-Key头。

API请求频率是否有限制?

是的,为了保护服务稳定性,API设有速率限制。具体限制请参考API文档或联系服务提供商。

如何处理API返回的错误?

API会返回标准的HTTP状态码和包含错误详情的JSON响应体。建议根据状态码和错误信息进行相应的错误处理。

相似接口推荐

AWS SSO Identity Store

AWS SSO Identity Store是AWS IAM Identity Center(原AWS单点登录)使用的身份存储服务,提供一个统一的位置检索所有身份信息(用户和群组)。该服务简化了身份管理流程,帮助集中管理

待确认
Amazon Honeycode

Amazon Honeycode是一项全托管服务,让您无需编程即可快速为团队构建移动和Web应用。可用于管理项目、客户、运营、审批、资源乃至团队协作等各类事务。

待确认
AWS Glue

AWS Glue 是一项完全托管的提取、转换和加载(ETL)服务,可简化数据准备和集成工作。它自动发现、编目数据,并支持在数据湖和数据仓库之间进行ETL操作。

待确认
亚马逊Glacier

亚马逊S3 Glacier(简称Glacier)是一款针对“冷数据”的存储解决方案。这项超低成本的存储服务为数据备份和归档提供安全、持久且易于使用的存储方案。用户可经济高效地存储数据数月、数年甚至数十年。

待确认