交易查询
通过唯一标识符查询交易详情。该接口返回指定交易的完整信息,包括支付详情、买家信息和交易状态。
GEThttps://api.efundpay.com/v4/transactions/{transaction_id}
This endpoint requires the
transactions.read
scope.Authorizations
Authorizationstringheaderrequired
认证请求头,格式为 `Bearer <token>`,`<token>` 为您的认证令牌。
Headers
x-merchant-account-idstringrequired
商户账户ID。
Examples:
""default""
Path Parameters
transaction_idstringrequired
查询交易的唯一标识符。
Examples:
"7099948d-7286-47e4-aad8-b68f7eb44591"
Response
application/json
Successful Response
typestring
资源类型。
Examples:
"transaction"
idstringrequired
EFundFlow交易唯一标识符。
Examples:
"7099948d-7286-47e4-aad8-b68f7eb44591"
merchant_account_idstringrequired
商户账户ID。
Examples:
"default"
currencystringrequired
交易币种。
Examples:
"EUR"
"USD"
amountintegerrequired
交易金额,最小货币单位。
Examples:
"1299"
statusenum<string>required
交易状态。
Examples:
"authorization_succeeded"
"capture_succeeded"
"authorization_failed"
"capture_failed"
countrystring
交易国家(ISO 3166-1 alpha-2)。
Examples:
"US"
external_identifierstringrequired
外部商户交易标识符。
Examples:
"transaction-12345"
payment_methodobjectrequired
支付方式。
methodenum<string>required
交易所用的支付方式。
Examples:
"card"
error_codestring | null
错误码(如有)。
Examples:
"null"
"missing_redirect_url"
buyerobject
买家信息。
shipping_detailsobject
收货信息。
cart_itemsarray
商品信息
three_d_secureobject | null
3D Secure 认证对象。
metadataobject | null
自定义元数据对象。
created_atstring
创建时间(ISO 8601)。
Examples:
"2013-07-16T19:23:00.000+00:00"
curl --request GET \--url https://api.efundpay.com/v4/transactions/7099948d-7286-47e4-aad8-b68f7eb44591 \--header 'Authorization: Bearer <token>' \--header 'x-merchant-account-id: <x-merchant-account-id>'
{"type": "transaction","id": "7099948d-7286-47e4-aad8-b68f7eb44591","merchant_account_id": "default","currency": "EUR","amount": 1299,"status": "authorization_succeeded","country": "US","external_identifier": "transaction-12345","payment_method": {"payment_url_link": "https://www.efundpay.com/redirect/12345","payment_app_link": "app://pay/abc123","url_link_expire_sec": "300","payment_qr_code": "weixin://wxpay/bizpayurl?pr=abc1233","payment_qr_code_expire_sec": "300","country": "US","details": {"bin": "411111","card_type": "credit","card_issuer_name": "Test Bank"},"expiration_date": "12/30","method": "card","scheme": "visa"},"method": "card","instrument_type": "pan","error_code": null,"payment_service": {"type": "payment-service","id": "824ff064-7f4b-430b-9801-59aff90d013e","payment_service_definition_id": "stripe-card","method": "card","display_name": "Stripe USA"},"pending_review": false,"buyer": {"type": "buyer","id": "fe26475d-ec3e-4884-9553-f7356683f7f9","display_name": "John Doe","external_identifier": "buyer-12345","billing_details": {"first_name": "John","last_name": "Doe","email_address": "john@example.com","phone_number": "+1234567890","address": {"city": "San Jose","country": "US","postal_code": "94560","state": "California","state_code": "US-CA","house_number_or_name": "10","line1": "Stafford Appartments","line2": "29th Street","organization": "EFundFlow"},"tax_id": {"value": "12345678931","kind": "us.ein"}},"account_number": "123456789"},"raw_response_code": "00","raw_response_description": "Success","shipping_details": {"first_name": "John","last_name": "Doe","email_address": "john@example.com","phone_number": "+1234567890","address": {"city": "San Jose","country": "US","postal_code": "94560","state": "California","state_code": "US-CA","house_number_or_name": "10","line1": "Stafford Appartments","line2": "29th Street","organization": "EFundFlow"},"id": "bf8c36ad-02d9-4904-b0f9-a230b149e341","buyer_id": "fe26475d-ec3e-4884-9553-f7356683f7f9","type": "shipping-details"},"checkout_session_id": "4137b1cf-39ac-42a8-bad6-1c680d5dab6b","auth_response_code": "00","avs_response_code": "match","cvv_response_code": "match","anti_fraud_decision": "accept","payment_source": "ecommerce","merchant_initiated": false,"is_subsequent_payment": false,"three_d_secure": {"version": "2.2.0","status": "complete","method": "challenge","response_data": {"cavv": "3q2+78r+ur7erb7vyv66vv8=","eci": "05","version": "2.1.0","directory_response": "C","scheme": "visa","authentication_response": "Y","cavv_algorithm": "A","xid": "12345"}},"payment_service_transaction_id": "tx-12345","additional_identifiers": {"payment_service_authorization_id": "auth-12345","payment_service_capture_id": "capture-12345"},"metadata": {"cohort": "cohort-12345","order": "order-12345"},"created_at": "2013-07-16T19:23:00.000+00:00","updated_at": "2013-07-16T19:23:00.000+00:00","authorized_at": "2013-07-16T19:23:00.000+00:00","captured_at": "2013-07-16T19:23:00.000+00:00"}