Get payment
curl --request GET \
--url https://payments.coinbase.com/api/v1/payments/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://payments.coinbase.com/api/v1/payments/{id}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://payments.coinbase.com/api/v1/payments/{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://payments.coinbase.com/api/v1/payments/{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 => [
"Authorization: <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://payments.coinbase.com/api/v1/payments/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<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://payments.coinbase.com/api/v1/payments/{id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://payments.coinbase.com/api/v1/payments/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"payment": {
"entity": "<string>",
"id": "<string>",
"maxAmount": "<string>",
"token": "<string>",
"networkId": 123,
"payer": "<string>",
"signature": "<string>",
"receiver": "<string>",
"maxFeeBps": 123,
"minFeeBps": 123,
"feeReceiver": "<string>",
"salt": "<string>",
"paymentInfoHash": "<string>",
"nonce": "<string>",
"authorizationExpiry": "<string>",
"preApprovalExpiry": "<string>",
"refundExpiry": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"operator": "<string>",
"contractAddress": "<string>",
"authorizedAmount": "<string>",
"capturedAmount": "<string>",
"voidedAmount": "<string>",
"refundedAmount": "<string>",
"chargedAmount": "<string>",
"merchantId": "<string>"
},
"paymentOperations": [
{
"entity": "<string>",
"id": "<string>",
"transactionHash": "<string>",
"params": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"payment": {
"entity": "<string>",
"id": "<string>",
"maxAmount": "<string>",
"token": "<string>",
"networkId": 123,
"payer": "<string>",
"signature": "<string>",
"receiver": "<string>",
"maxFeeBps": 123,
"minFeeBps": 123,
"feeReceiver": "<string>",
"salt": "<string>",
"paymentInfoHash": "<string>",
"nonce": "<string>",
"authorizationExpiry": "<string>",
"preApprovalExpiry": "<string>",
"refundExpiry": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"operator": "<string>",
"contractAddress": "<string>",
"authorizedAmount": "<string>",
"capturedAmount": "<string>",
"voidedAmount": "<string>",
"refundedAmount": "<string>",
"chargedAmount": "<string>",
"merchantId": "<string>"
},
"output": "<string>",
"error": "<string>",
"errorCode": "<string>",
"revertReason": "<string>",
"blockNumber": "<string>",
"metadata": {}
}
]
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Payments
Get payment
Get a payment by ID. If authenticated with a Bearer token and the operator owns this payment, payment operations will also be returned.
GET
/
api
/
v1
/
payments
/
{id}
Get payment
curl --request GET \
--url https://payments.coinbase.com/api/v1/payments/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://payments.coinbase.com/api/v1/payments/{id}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://payments.coinbase.com/api/v1/payments/{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://payments.coinbase.com/api/v1/payments/{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 => [
"Authorization: <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://payments.coinbase.com/api/v1/payments/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<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://payments.coinbase.com/api/v1/payments/{id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://payments.coinbase.com/api/v1/payments/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"payment": {
"entity": "<string>",
"id": "<string>",
"maxAmount": "<string>",
"token": "<string>",
"networkId": 123,
"payer": "<string>",
"signature": "<string>",
"receiver": "<string>",
"maxFeeBps": 123,
"minFeeBps": 123,
"feeReceiver": "<string>",
"salt": "<string>",
"paymentInfoHash": "<string>",
"nonce": "<string>",
"authorizationExpiry": "<string>",
"preApprovalExpiry": "<string>",
"refundExpiry": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"operator": "<string>",
"contractAddress": "<string>",
"authorizedAmount": "<string>",
"capturedAmount": "<string>",
"voidedAmount": "<string>",
"refundedAmount": "<string>",
"chargedAmount": "<string>",
"merchantId": "<string>"
},
"paymentOperations": [
{
"entity": "<string>",
"id": "<string>",
"transactionHash": "<string>",
"params": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"payment": {
"entity": "<string>",
"id": "<string>",
"maxAmount": "<string>",
"token": "<string>",
"networkId": 123,
"payer": "<string>",
"signature": "<string>",
"receiver": "<string>",
"maxFeeBps": 123,
"minFeeBps": 123,
"feeReceiver": "<string>",
"salt": "<string>",
"paymentInfoHash": "<string>",
"nonce": "<string>",
"authorizationExpiry": "<string>",
"preApprovalExpiry": "<string>",
"refundExpiry": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"operator": "<string>",
"contractAddress": "<string>",
"authorizedAmount": "<string>",
"capturedAmount": "<string>",
"voidedAmount": "<string>",
"refundedAmount": "<string>",
"chargedAmount": "<string>",
"merchantId": "<string>"
},
"output": "<string>",
"error": "<string>",
"errorCode": "<string>",
"revertReason": "<string>",
"blockNumber": "<string>",
"metadata": {}
}
]
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Authorizations
Authorization header using the Bearer scheme. Learn more about JWT tokens in the Coinbase Developer Portal.
Path Parameters
The ID of the payment.
Response
A successful response.
Payment details including identifiers, amounts, and blockchain transaction data.
Show child attributes
Show child attributes
Example:
{
"entity": "payment",
"id": "payment123",
"maxAmount": "100.00",
"token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"networkId": 8453,
"payer": "0xpayer",
"signature": "0xsig",
"receiver": "0xreceiver",
"minFeeBps": 50,
"maxFeeBps": 50,
"feeReceiver": "0xcccccccccccccccccccccccccccccccccccccccc",
"salt": "2334324235415445346745646",
"paymentInfoHash": "2334324235415445346745646",
"nonce": "2334324235415445346745646",
"authorizationExpiry": 1843954582,
"preApprovalExpiry": 0,
"refundExpiry": 1843954582,
"createdAt": "2024-03-20T00:00:00.000Z",
"updatedAt": "2024-03-20T00:00:00.000Z",
"operator": "0xoperator",
"contractAddress": "0xcontract",
"authorizedAmount": "50.00",
"capturedAmount": "50.00",
"voidedAmount": "0.00",
"refundedAmount": "0.00",
"chargedAmount": "50.00"
}
List of payment operations associated with the payment. Only returned when authenticated as the operator that owns this payment.
Show child attributes
Show child attributes
Was this page helpful?
⌘I