Payments
Retrieve Payment by ID
Retrieves payment details using the payment ID provided in the request path.
GET
/
payments
/
{payment_id}
Retrieve Payment by ID
curl --request GET \
--url https://api-sandbox.y.uno/v1/payments/{payment_id} \
--header 'private-secret-key: <api-key>' \
--header 'public-api-key: <api-key>'import requests
url = "https://api-sandbox.y.uno/v1/payments/{payment_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/payments/{payment_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/payments/{payment_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/payments/{payment_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/payments/{payment_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/payments/{payment_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{
"payment": {
"id": "e3f397ed-b7d0-4816-ab75-8457b0a30ec1",
"account_id": "493e9374-510a-4201-9e09-de669d75f256",
"description": "Test Bank of America",
"country": "US",
"status": "READY_TO_PAY",
"sub_status": "CREATED",
"merchant_order_id": "0000022",
"created_at": "2023-07-20T17:24:58.900553Z",
"updated_at": "2023-07-20T17:25:13.447662Z",
"amount": {
"captured": 0,
"currency": "USD",
"refunded": 0,
"value": 52000
},
"checkout": {
"session": "954dc216-60ff-4ae4-a299-c603b93bd267",
"sdk_action_required": true
},
"payment_method": {
"vaulted_token": "",
"type": "BANK_TRANSFER",
"vault_on_success": false,
"token": "2cd31999-e44e-4de3-bbe4-179981ff4295",
"payment_method_detail": {
"bank_transfer": {
"provider_image": "",
"account_type": null,
"bank_name": "Bank of America",
"beneficiary_name": "John Doe",
"bank_account": "123456789",
"bank_account_2": null,
"beneficiary_document_type": "SSN",
"beneficiary_document": "123-45-6789",
"payment_instruction": null,
"redirect_url": "https://api-sandbox.bankofamerica.com/v1/payment_methods/redirect/bank_transfer?transferCode=52xB9jF695TdDvHK-approved"
}
}
},
"customer_payer": {
"id": "cfae0941-7234-427a-a739-ef4fce966c79",
"merchant_customer_id": "1689873883",
"first_name": "John",
"last_name": "Doe",
"gender": "M",
"date_of_birth": "1980-01-01",
"email": "johndoe@gmail.com",
"nationality": "US",
"ip_address": "192.168.1.1",
"device_fingerprint": null,
"browser_info": {
"user_agent": "",
"accept_header": "",
"accept_content": null,
"accept_browser": null,
"color_depth": "",
"screen_height": "",
"screen_width": "",
"javascript_enabled": null,
"java_enabled": null,
"browser_time_difference": null,
"language": ""
},
"document": {
"document_type": "SSN",
"document_number": "123-45-6789"
},
"phone": {
"number": "5551234567",
"country_code": "1"
},
"billing_address": {
"address_line_1": "123 Main Street",
"address_line_2": null,
"city": "New York",
"state": "NY",
"country": "US",
"zip_code": "10001"
},
"shipping_address": {
"address_line_1": "123 Main Street",
"address_line_2": null,
"city": "New York",
"state": "NY",
"country": "US",
"zip_code": "10001"
},
"device_fingerprints": [],
"geolocation": null,
"merchant_customer_validations": null,
"merchant_customer_created_at": null
},
"additional_data": null,
"taxes": null,
"transactions": [
{
"id": "09135cb9-159c-4662-8fe3-da5523bb2266",
"type": "PURCHASE",
"status": "SUCCEEDED",
"category": "BANK_TRANSFER",
"amount": 52000,
"provider_id": "BANK_OF_AMERICA",
"payment_method": {
"vaulted_token": "",
"type": "BANK_TRANSFER",
"vault_on_success": false,
"token": "2cd31999-e44e-4de3-bbe4-179981ff4295",
"detail": {
"bank_transfer": {
"provider_image": "",
"account_type": null,
"bank_name": "Bank of America",
"beneficiary_name": "John Doe",
"bank_account": "123456789",
"bank_account_2": null,
"beneficiary_document_type": "SSN",
"beneficiary_document": "123-45-6789",
"payment_instruction": null,
"redirect_url": "https://api-sandbox.bankofamerica.com/v1/payment_methods/redirect/bank_transfer?transferCode=52xB9jF695TdDvHK-approved"
}
}
},
"response_code": "SUCCEEDED",
"response_message": "Transaction successful",
"reason": null,
"description": "Test Bank of America",
"merchant_reference": null,
"provider_data": {
"id": "BANK_OF_AMERICA",
"transaction_id": "117490-1689873907-17347",
"account_id": "",
"status": "APPROVED",
"status_detail": "",
"response_code": "",
"response_message": "",
"iso8583_response_code": "00",
"iso8583_response_message": "Approved or completed successfully",
"raw_response": {
"data": {
"amount_in_cents": 5200000,
"bill_id": null,
"billing_data": null,
"created_at": "2023-07-20T17:25:07.167Z",
"currency": "USD",
"customer_data": null,
"customer_email": "johndoe@gmail.com",
"finalized_at": null,
"id": "117490-1689873907-17347",
"payment_link_id": null,
"payment_method": {
"extra": {
"is_three_ds": false
},
"payment_description": "Test Bank of America",
"sandbox_status": "APPROVED",
"type": "BANK_TRANSFER",
"user_type": "PERSON"
},
"payment_method_type": "BANK_TRANSFER",
"payment_source_id": null,
"redirect_url": "https://google.com/?checkoutSession=954dc216-60ff-4ae4-a299-c603b93bd267",
"reference": "09135cb9-159c-4662-8fe3-da5523bb2266",
"shipping_address": {
"address_line_1": "123 Main Street",
"address_line_2": null,
"city": "New York",
"state": "NY",
"country": "US",
"zip_code": "10001"
},
"status": "PENDING",
"status_message": null,
"taxes": []
},
"meta": {}
},
"third_party_transaction_id": ""
},
"three_d_secure_action_required": null,
"created_at": "2023-07-20T17:25:05.410687Z",
"updated_at": "2023-07-20T17:25:11.472652Z"
}
],
"split": [],
"callback_url": "https://y.uno/?checkoutSession=954dc216-60ff-4ae4-a299-c603b93bd267",
"workflow": "SDK_CHECKOUT",
"metadata": [],
"account_code": "493e9374-510a-4201-9e09-de669d75f256",
"fraud_screening": null,
"idempotency_key": null,
"payment_link_code": "",
"routing_rules": null,
"split_marketplace": []
}
}
This request enables you to retrieve details of payments based on their
id, which needs to be provided in the request path.
transactions in this response is an array containing every transaction of the payment. In webhook payloads the same field name carries a single object — the transaction that triggered the event — with the full list under transactions_history. See Webhook object and examples.Authorizations
Path Parameters
Query Parameters
When true, includes the provider raw response in the output (default false).
When true, includes the transactions history in the response (default false).
Response
200
- SDK_Checkout - Required Fields
- Card - With card details
- Card - With airline data
- Card - With 3DS direct
- Card - With customer, billing, and shipping details
- Card - With customer, billing, shipping and order items
- Card - With installments
- Card - With authorization
- Card - With device fingerprint
- Card - With vault on success
- Card - With vaulted token
- Bank Transfer
- Buy Now Pay Later
- Payment Link
- Ticket
- Wallet
Show child attributes
Show child attributes
Was this page helpful?
⌘I
Retrieve Payment by ID
curl --request GET \
--url https://api-sandbox.y.uno/v1/payments/{payment_id} \
--header 'private-secret-key: <api-key>' \
--header 'public-api-key: <api-key>'import requests
url = "https://api-sandbox.y.uno/v1/payments/{payment_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/payments/{payment_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/payments/{payment_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/payments/{payment_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/payments/{payment_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/payments/{payment_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{
"payment": {
"id": "e3f397ed-b7d0-4816-ab75-8457b0a30ec1",
"account_id": "493e9374-510a-4201-9e09-de669d75f256",
"description": "Test Bank of America",
"country": "US",
"status": "READY_TO_PAY",
"sub_status": "CREATED",
"merchant_order_id": "0000022",
"created_at": "2023-07-20T17:24:58.900553Z",
"updated_at": "2023-07-20T17:25:13.447662Z",
"amount": {
"captured": 0,
"currency": "USD",
"refunded": 0,
"value": 52000
},
"checkout": {
"session": "954dc216-60ff-4ae4-a299-c603b93bd267",
"sdk_action_required": true
},
"payment_method": {
"vaulted_token": "",
"type": "BANK_TRANSFER",
"vault_on_success": false,
"token": "2cd31999-e44e-4de3-bbe4-179981ff4295",
"payment_method_detail": {
"bank_transfer": {
"provider_image": "",
"account_type": null,
"bank_name": "Bank of America",
"beneficiary_name": "John Doe",
"bank_account": "123456789",
"bank_account_2": null,
"beneficiary_document_type": "SSN",
"beneficiary_document": "123-45-6789",
"payment_instruction": null,
"redirect_url": "https://api-sandbox.bankofamerica.com/v1/payment_methods/redirect/bank_transfer?transferCode=52xB9jF695TdDvHK-approved"
}
}
},
"customer_payer": {
"id": "cfae0941-7234-427a-a739-ef4fce966c79",
"merchant_customer_id": "1689873883",
"first_name": "John",
"last_name": "Doe",
"gender": "M",
"date_of_birth": "1980-01-01",
"email": "johndoe@gmail.com",
"nationality": "US",
"ip_address": "192.168.1.1",
"device_fingerprint": null,
"browser_info": {
"user_agent": "",
"accept_header": "",
"accept_content": null,
"accept_browser": null,
"color_depth": "",
"screen_height": "",
"screen_width": "",
"javascript_enabled": null,
"java_enabled": null,
"browser_time_difference": null,
"language": ""
},
"document": {
"document_type": "SSN",
"document_number": "123-45-6789"
},
"phone": {
"number": "5551234567",
"country_code": "1"
},
"billing_address": {
"address_line_1": "123 Main Street",
"address_line_2": null,
"city": "New York",
"state": "NY",
"country": "US",
"zip_code": "10001"
},
"shipping_address": {
"address_line_1": "123 Main Street",
"address_line_2": null,
"city": "New York",
"state": "NY",
"country": "US",
"zip_code": "10001"
},
"device_fingerprints": [],
"geolocation": null,
"merchant_customer_validations": null,
"merchant_customer_created_at": null
},
"additional_data": null,
"taxes": null,
"transactions": [
{
"id": "09135cb9-159c-4662-8fe3-da5523bb2266",
"type": "PURCHASE",
"status": "SUCCEEDED",
"category": "BANK_TRANSFER",
"amount": 52000,
"provider_id": "BANK_OF_AMERICA",
"payment_method": {
"vaulted_token": "",
"type": "BANK_TRANSFER",
"vault_on_success": false,
"token": "2cd31999-e44e-4de3-bbe4-179981ff4295",
"detail": {
"bank_transfer": {
"provider_image": "",
"account_type": null,
"bank_name": "Bank of America",
"beneficiary_name": "John Doe",
"bank_account": "123456789",
"bank_account_2": null,
"beneficiary_document_type": "SSN",
"beneficiary_document": "123-45-6789",
"payment_instruction": null,
"redirect_url": "https://api-sandbox.bankofamerica.com/v1/payment_methods/redirect/bank_transfer?transferCode=52xB9jF695TdDvHK-approved"
}
}
},
"response_code": "SUCCEEDED",
"response_message": "Transaction successful",
"reason": null,
"description": "Test Bank of America",
"merchant_reference": null,
"provider_data": {
"id": "BANK_OF_AMERICA",
"transaction_id": "117490-1689873907-17347",
"account_id": "",
"status": "APPROVED",
"status_detail": "",
"response_code": "",
"response_message": "",
"iso8583_response_code": "00",
"iso8583_response_message": "Approved or completed successfully",
"raw_response": {
"data": {
"amount_in_cents": 5200000,
"bill_id": null,
"billing_data": null,
"created_at": "2023-07-20T17:25:07.167Z",
"currency": "USD",
"customer_data": null,
"customer_email": "johndoe@gmail.com",
"finalized_at": null,
"id": "117490-1689873907-17347",
"payment_link_id": null,
"payment_method": {
"extra": {
"is_three_ds": false
},
"payment_description": "Test Bank of America",
"sandbox_status": "APPROVED",
"type": "BANK_TRANSFER",
"user_type": "PERSON"
},
"payment_method_type": "BANK_TRANSFER",
"payment_source_id": null,
"redirect_url": "https://google.com/?checkoutSession=954dc216-60ff-4ae4-a299-c603b93bd267",
"reference": "09135cb9-159c-4662-8fe3-da5523bb2266",
"shipping_address": {
"address_line_1": "123 Main Street",
"address_line_2": null,
"city": "New York",
"state": "NY",
"country": "US",
"zip_code": "10001"
},
"status": "PENDING",
"status_message": null,
"taxes": []
},
"meta": {}
},
"third_party_transaction_id": ""
},
"three_d_secure_action_required": null,
"created_at": "2023-07-20T17:25:05.410687Z",
"updated_at": "2023-07-20T17:25:11.472652Z"
}
],
"split": [],
"callback_url": "https://y.uno/?checkoutSession=954dc216-60ff-4ae4-a299-c603b93bd267",
"workflow": "SDK_CHECKOUT",
"metadata": [],
"account_code": "493e9374-510a-4201-9e09-de669d75f256",
"fraud_screening": null,
"idempotency_key": null,
"payment_link_code": "",
"routing_rules": null,
"split_marketplace": []
}
}