Get Payment Method
curl --request GET \
--url https://api.coinbase.com/api/v3/brokerage/payment_methods/{payment_method_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.coinbase.com/api/v3/brokerage/payment_methods/{payment_method_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.coinbase.com/api/v3/brokerage/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.coinbase.com/api/v3/brokerage/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 => [
"Authorization: Bearer <token>"
],
]);
$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.coinbase.com/api/v3/brokerage/payment_methods/{payment_method_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.coinbase.com/api/v3/brokerage/payment_methods/{payment_method_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coinbase.com/api/v3/brokerage/payment_methods/{payment_method_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"payment_method": {
"id": "8bfc20d7-f7c6-4422-bf07-8243ca4169fe",
"type": "ACH",
"name": "ALLY BANK ******1234",
"currency": "USD",
"verified": true,
"allow_buy": true,
"allow_sell": true,
"allow_deposit": true,
"allow_withdraw": true,
"created_at": "2021-05-31T09:59:59Z",
"updated_at": "2021-05-31T09:59:59Z"
}
}{
"error": "<string>",
"code": 123,
"message": "<string>",
"details": [
{}
]
}Payment Methods
Get Payment Method
Get information about a payment method for the current user.
GET
/
api
/
v3
/
brokerage
/
payment_methods
/
{payment_method_id}
Get Payment Method
curl --request GET \
--url https://api.coinbase.com/api/v3/brokerage/payment_methods/{payment_method_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.coinbase.com/api/v3/brokerage/payment_methods/{payment_method_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.coinbase.com/api/v3/brokerage/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.coinbase.com/api/v3/brokerage/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 => [
"Authorization: Bearer <token>"
],
]);
$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.coinbase.com/api/v3/brokerage/payment_methods/{payment_method_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.coinbase.com/api/v3/brokerage/payment_methods/{payment_method_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coinbase.com/api/v3/brokerage/payment_methods/{payment_method_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"payment_method": {
"id": "8bfc20d7-f7c6-4422-bf07-8243ca4169fe",
"type": "ACH",
"name": "ALLY BANK ******1234",
"currency": "USD",
"verified": true,
"allow_buy": true,
"allow_sell": true,
"allow_deposit": true,
"allow_withdraw": true,
"created_at": "2021-05-31T09:59:59Z",
"updated_at": "2021-05-31T09:59:59Z"
}
}{
"error": "<string>",
"code": 123,
"message": "<string>",
"details": [
{}
]
}Authorizations
ApiKeyOAuth2
A bearer token signed using your API Key Secret, see Creating API Keys section of our docs for more information. See Scope & Permissions for the permission each endpoint requires.
Path Parameters
The ID of the payment method. Refer to List Payment Methods for the list of all available payment methods and their corresponding IDs.
Response
A successful response.
Show child attributes
Show child attributes
Was this page helpful?