支付方式(直接工作流)
按 ID 检索已注册支付方式的 PCI 数据
检索包含完整卡号的已注册支付方式,仅限 PCI 商户
GET
/
customers
/
{customer_id}
/
payment-methods
/
{payment_method_id}
按 Id 检索已注册的支付方式 PCI 数据
curl --request GET \
--url https://api-sandbox.y.uno/v1/customers/{customer_id}/payment-methods/{payment_method_id} \
--header 'private-secret-key: <api-key>' \
--header 'public-api-key: <api-key>'import requests
url = "https://api-sandbox.y.uno/v1/customers/{customer_id}/payment-methods/{payment_method_id}"
headers = {
"public-api-key": "<api-key>",
"private-secret-key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'public-api-key': '<api-key>', 'private-secret-key': '<api-key>'}
};
fetch('https://api-sandbox.y.uno/v1/customers/{customer_id}/payment-methods/{payment_method_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-sandbox.y.uno/v1/customers/{customer_id}/payment-methods/{payment_method_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"private-secret-key: <api-key>",
"public-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.y.uno/v1/customers/{customer_id}/payment-methods/{payment_method_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("public-api-key", "<api-key>")
req.Header.Add("private-secret-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-sandbox.y.uno/v1/customers/{customer_id}/payment-methods/{payment_method_id}")
.header("public-api-key", "<api-key>")
.header("private-secret-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.y.uno/v1/customers/{customer_id}/payment-methods/{payment_method_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["public-api-key"] = '<api-key>'
request["private-secret-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"idempotency_key": "2ca58c6d-8794-4c8f-a2f6-bba4b7498b74",
"id": "2fd6bf11-2129-4061-9c2a-34e196f89753",
"account_id": "493e9374-510a-4201-9e09-de669d75f256",
"name": "VISA ****1111",
"description": "VISA ****1111",
"type": "CARD",
"category": "CARD",
"country": "US",
"status": "ENROLLED",
"sub_status": null,
"vaulted_token": "7ced7717-f860-4705-a376-58a714953de9",
"action": "FORM",
"redirect_url": null,
"created_at": "2024-06-04T12:47:46.992602Z",
"updated_at": "2024-06-04T12:47:46.992603Z",
"enrollment": {
"session": "",
"sdk_required_action": false
},
"provider": {
"id": "YUNO",
"type": "YUNO",
"token": "e47299a5-269e-42a1-9be1-9f64e400413a",
"provider_status": null
},
"customer_payer": {
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"gender": "M",
"date_of_birth": "1990-02-28",
"document": {
"document_number": "123456789",
"document_type": "SSN"
},
"phone": {
"number": "5551234567",
"country_code": "1"
},
"billing_address": {
"address_line_1": "123 Main St",
"address_line_2": "Apt 4B",
"country": "US",
"state": "NY",
"city": "New York",
"zip_code": "10001"
}
},
"card_data": {
"number": "4111111111111111",
"iin": "41111111",
"lfd": "1111",
"expiration_month": 3,
"expiration_year": 26,
"number_length": 16,
"security_code_length": 3,
"brand": "VISA",
"issuer": "JPMORGAN CHASE BANK N A",
"issuer_code": null,
"country_code": "US",
"category": "CREDIT",
"type": "CREDIT",
"fingerprint": "55a7fe38-cdc3-45dc-8c5f-820751799c76",
"network_token": {
"network": "VISA",
"number": "4895370000004321",
"status": "ACTIVE",
"par": "V0010013022182956191212272716",
"network_token_id": "DM4MMC1GB000000011cdd1c11c874e27",
"token_data": {
"iin": "489537",
"lfd": "4321",
"expiration_month": 9,
"expiration_year": 2030
},
"response": {
"code": "00",
"message": "Approved"
}
}
},
"last_successfully_used": null,
"last_successfully_used_at": null,
"verify": {
"vault_on_success": false,
"payment": null
},
"preferred": null,
"parent_type": null,
"callback_url": null
}
检索用户已注册的特定支付方式,响应中包含完整卡号。
检索已注册的支付方式要检索已注册支付方式的信息,您需要提供
payment_method_id,即使用注册支付方式 endpoint 时收到的 vaulted_token。仅限 PCI 商户此 endpoint 仅适用于通过 PCI 认证的商户。如需启用,请联系您的大客户经理(KAM)。
授权
路径参数
客户的唯一标识符,通过 Create Customer endpoint 创建(UUID,36 个字符)。
payment_method 的唯一标识符。该信息是使用注册支付方式注册支付方式时作为 vaulted_token 收到的(UUID,36 个字符)。
响应
200
此页面对您有帮助吗?
⌘I
按 Id 检索已注册的支付方式 PCI 数据
curl --request GET \
--url https://api-sandbox.y.uno/v1/customers/{customer_id}/payment-methods/{payment_method_id} \
--header 'private-secret-key: <api-key>' \
--header 'public-api-key: <api-key>'import requests
url = "https://api-sandbox.y.uno/v1/customers/{customer_id}/payment-methods/{payment_method_id}"
headers = {
"public-api-key": "<api-key>",
"private-secret-key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'public-api-key': '<api-key>', 'private-secret-key': '<api-key>'}
};
fetch('https://api-sandbox.y.uno/v1/customers/{customer_id}/payment-methods/{payment_method_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-sandbox.y.uno/v1/customers/{customer_id}/payment-methods/{payment_method_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"private-secret-key: <api-key>",
"public-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.y.uno/v1/customers/{customer_id}/payment-methods/{payment_method_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("public-api-key", "<api-key>")
req.Header.Add("private-secret-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-sandbox.y.uno/v1/customers/{customer_id}/payment-methods/{payment_method_id}")
.header("public-api-key", "<api-key>")
.header("private-secret-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.y.uno/v1/customers/{customer_id}/payment-methods/{payment_method_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["public-api-key"] = '<api-key>'
request["private-secret-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"idempotency_key": "2ca58c6d-8794-4c8f-a2f6-bba4b7498b74",
"id": "2fd6bf11-2129-4061-9c2a-34e196f89753",
"account_id": "493e9374-510a-4201-9e09-de669d75f256",
"name": "VISA ****1111",
"description": "VISA ****1111",
"type": "CARD",
"category": "CARD",
"country": "US",
"status": "ENROLLED",
"sub_status": null,
"vaulted_token": "7ced7717-f860-4705-a376-58a714953de9",
"action": "FORM",
"redirect_url": null,
"created_at": "2024-06-04T12:47:46.992602Z",
"updated_at": "2024-06-04T12:47:46.992603Z",
"enrollment": {
"session": "",
"sdk_required_action": false
},
"provider": {
"id": "YUNO",
"type": "YUNO",
"token": "e47299a5-269e-42a1-9be1-9f64e400413a",
"provider_status": null
},
"customer_payer": {
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"gender": "M",
"date_of_birth": "1990-02-28",
"document": {
"document_number": "123456789",
"document_type": "SSN"
},
"phone": {
"number": "5551234567",
"country_code": "1"
},
"billing_address": {
"address_line_1": "123 Main St",
"address_line_2": "Apt 4B",
"country": "US",
"state": "NY",
"city": "New York",
"zip_code": "10001"
}
},
"card_data": {
"number": "4111111111111111",
"iin": "41111111",
"lfd": "1111",
"expiration_month": 3,
"expiration_year": 26,
"number_length": 16,
"security_code_length": 3,
"brand": "VISA",
"issuer": "JPMORGAN CHASE BANK N A",
"issuer_code": null,
"country_code": "US",
"category": "CREDIT",
"type": "CREDIT",
"fingerprint": "55a7fe38-cdc3-45dc-8c5f-820751799c76",
"network_token": {
"network": "VISA",
"number": "4895370000004321",
"status": "ACTIVE",
"par": "V0010013022182956191212272716",
"network_token_id": "DM4MMC1GB000000011cdd1c11c874e27",
"token_data": {
"iin": "489537",
"lfd": "4321",
"expiration_month": 9,
"expiration_year": 2030
},
"response": {
"code": "00",
"message": "Approved"
}
}
},
"last_successfully_used": null,
"last_successfully_used_at": null,
"verify": {
"vault_on_success": false,
"payment": null
},
"preferred": null,
"parent_type": null,
"callback_url": null
}