Get a payment
curl --request GET \
--url https://api-sandbox.circle.com/v1/payments/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-sandbox.circle.com/v1/payments/{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-sandbox.circle.com/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://api-sandbox.circle.com/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: 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-sandbox.circle.com/v1/payments/{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-sandbox.circle.com/v1/payments/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.circle.com/v1/payments/{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{
"data": {
"id": "b8627ae8-732b-4d25-b947-1df8f4007a29",
"type": "payment",
"merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32",
"merchantWalletId": "212000",
"amount": {
"amount": "3.14",
"currency": "USD"
},
"fromAmount": {
"amount": "3.14",
"currency": "EUR"
},
"source": {
"id": "b8627ae8-732b-4d25-b947-1df8f4007a29",
"type": "card"
},
"description": "Payment",
"status": "pending",
"requiredAction": {
"type": "three_d_secure_required",
"redirectUrl": "https://example.org"
},
"verification": {
"avs": "D",
"cvv": "not_requested",
"threeDSecure": "pass",
"eci": "00"
},
"originalPayment": {
"id": "b8627ae8-732b-4d25-b947-1df8f4007a29",
"type": "payment",
"merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32",
"merchantWalletId": "212000",
"amount": {
"amount": "3.14",
"currency": "USD"
},
"source": {
"id": "b8627ae8-732b-4d25-b947-1df8f4007a29",
"type": "card"
},
"description": "Payment",
"status": "pending",
"captured": false,
"captureAmount": {
"amount": "3.14",
"currency": "USD"
},
"captureDate": "2020-04-10T02:13:30.000Z",
"requiredAction": {
"type": "three_d_secure_required",
"redirectUrl": "https://example.org"
},
"cancel": {
"id": "b8627ae8-732b-4d25-b947-1df8f4007a29",
"type": "cancel",
"description": "Payment",
"status": "pending",
"createDate": "2020-04-10T02:13:30.000Z"
},
"refunds": [
{
"id": "b8627ae8-732b-4d25-b947-1df8f4007a29",
"type": "payment",
"amount": {
"amount": "3.14",
"currency": "USD"
},
"description": "Payment",
"status": "pending",
"requiredAction": {
"type": "three_d_secure_required",
"redirectUrl": "https://example.org"
},
"fees": {
"amount": "3.14",
"currency": "USD"
},
"createDate": "2020-04-10T02:13:30.000Z"
}
],
"fees": {
"amount": "3.14",
"currency": "USD"
},
"channel": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7",
"createDate": "2020-04-10T02:13:30.000Z",
"updateDate": "2020-04-10T02:13:30.000Z"
},
"cancel": {
"id": "b8627ae8-732b-4d25-b947-1df8f4007a29",
"type": "cancel",
"merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32",
"merchantWalletId": "212000",
"amount": {
"amount": "3.14",
"currency": "USD"
},
"source": {
"id": "b8627ae8-732b-4d25-b947-1df8f4007a29",
"type": "card"
},
"description": "Payment",
"status": "pending",
"originalPayment": {
"id": "b8627ae8-732b-4d25-b947-1df8f4007a29",
"type": "payment",
"amount": {
"amount": "3.14",
"currency": "USD"
},
"description": "Payment",
"status": "pending",
"requiredAction": {
"type": "three_d_secure_required",
"redirectUrl": "https://example.org"
},
"fees": {
"amount": "3.14",
"currency": "USD"
},
"createDate": "2020-04-10T02:13:30.000Z"
},
"fees": {
"amount": "3.14",
"currency": "USD"
},
"channel": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7",
"createDate": "2020-04-10T02:13:30.000Z",
"updateDate": "2020-04-10T02:13:30.000Z"
},
"refunds": [
{
"id": "b8627ae8-732b-4d25-b947-1df8f4007a29",
"type": "refund",
"merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32",
"merchantWalletId": "212000",
"amount": {
"amount": "3.14",
"currency": "USD"
},
"source": {
"id": "b8627ae8-732b-4d25-b947-1df8f4007a29",
"type": "card"
},
"description": "Payment",
"status": "pending",
"originalPayment": {
"id": "b8627ae8-732b-4d25-b947-1df8f4007a29",
"type": "payment",
"amount": {
"amount": "3.14",
"currency": "USD"
},
"description": "Payment",
"status": "pending",
"requiredAction": {
"type": "three_d_secure_required",
"redirectUrl": "https://example.org"
},
"fees": {
"amount": "3.14",
"currency": "USD"
},
"createDate": "2020-04-10T02:13:30.000Z"
},
"cancel": {
"id": "b8627ae8-732b-4d25-b947-1df8f4007a29",
"type": "cancel",
"description": "Payment",
"status": "pending",
"createDate": "2020-04-10T02:13:30.000Z"
},
"fees": {
"amount": "3.14",
"currency": "USD"
},
"channel": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7",
"createDate": "2020-04-10T02:13:30.000Z",
"updateDate": "2020-04-10T02:13:30.000Z"
}
],
"fees": {
"amount": "3.14",
"currency": "USD"
},
"trackingRef": "24910599141085313498894",
"externalRef": "YYYYMMDDXXXXXXXX012345",
"errorCode": "payment_failed",
"metadata": {
"email": "satoshi@circle.com",
"phoneNumber": "+14155555555"
},
"channel": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7",
"riskEvaluation": {
"decision": "approved",
"reason": "3000"
},
"createDate": "2020-04-10T02:13:30.000Z",
"updateDate": "2020-04-10T02:13:30.000Z"
}
}Get a payment
GET
/
v1
/
payments
/
{id}
Get a payment
curl --request GET \
--url https://api-sandbox.circle.com/v1/payments/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-sandbox.circle.com/v1/payments/{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-sandbox.circle.com/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://api-sandbox.circle.com/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: 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-sandbox.circle.com/v1/payments/{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-sandbox.circle.com/v1/payments/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.circle.com/v1/payments/{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{
"data": {
"id": "b8627ae8-732b-4d25-b947-1df8f4007a29",
"type": "payment",
"merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32",
"merchantWalletId": "212000",
"amount": {
"amount": "3.14",
"currency": "USD"
},
"fromAmount": {
"amount": "3.14",
"currency": "EUR"
},
"source": {
"id": "b8627ae8-732b-4d25-b947-1df8f4007a29",
"type": "card"
},
"description": "Payment",
"status": "pending",
"requiredAction": {
"type": "three_d_secure_required",
"redirectUrl": "https://example.org"
},
"verification": {
"avs": "D",
"cvv": "not_requested",
"threeDSecure": "pass",
"eci": "00"
},
"originalPayment": {
"id": "b8627ae8-732b-4d25-b947-1df8f4007a29",
"type": "payment",
"merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32",
"merchantWalletId": "212000",
"amount": {
"amount": "3.14",
"currency": "USD"
},
"source": {
"id": "b8627ae8-732b-4d25-b947-1df8f4007a29",
"type": "card"
},
"description": "Payment",
"status": "pending",
"captured": false,
"captureAmount": {
"amount": "3.14",
"currency": "USD"
},
"captureDate": "2020-04-10T02:13:30.000Z",
"requiredAction": {
"type": "three_d_secure_required",
"redirectUrl": "https://example.org"
},
"cancel": {
"id": "b8627ae8-732b-4d25-b947-1df8f4007a29",
"type": "cancel",
"description": "Payment",
"status": "pending",
"createDate": "2020-04-10T02:13:30.000Z"
},
"refunds": [
{
"id": "b8627ae8-732b-4d25-b947-1df8f4007a29",
"type": "payment",
"amount": {
"amount": "3.14",
"currency": "USD"
},
"description": "Payment",
"status": "pending",
"requiredAction": {
"type": "three_d_secure_required",
"redirectUrl": "https://example.org"
},
"fees": {
"amount": "3.14",
"currency": "USD"
},
"createDate": "2020-04-10T02:13:30.000Z"
}
],
"fees": {
"amount": "3.14",
"currency": "USD"
},
"channel": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7",
"createDate": "2020-04-10T02:13:30.000Z",
"updateDate": "2020-04-10T02:13:30.000Z"
},
"cancel": {
"id": "b8627ae8-732b-4d25-b947-1df8f4007a29",
"type": "cancel",
"merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32",
"merchantWalletId": "212000",
"amount": {
"amount": "3.14",
"currency": "USD"
},
"source": {
"id": "b8627ae8-732b-4d25-b947-1df8f4007a29",
"type": "card"
},
"description": "Payment",
"status": "pending",
"originalPayment": {
"id": "b8627ae8-732b-4d25-b947-1df8f4007a29",
"type": "payment",
"amount": {
"amount": "3.14",
"currency": "USD"
},
"description": "Payment",
"status": "pending",
"requiredAction": {
"type": "three_d_secure_required",
"redirectUrl": "https://example.org"
},
"fees": {
"amount": "3.14",
"currency": "USD"
},
"createDate": "2020-04-10T02:13:30.000Z"
},
"fees": {
"amount": "3.14",
"currency": "USD"
},
"channel": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7",
"createDate": "2020-04-10T02:13:30.000Z",
"updateDate": "2020-04-10T02:13:30.000Z"
},
"refunds": [
{
"id": "b8627ae8-732b-4d25-b947-1df8f4007a29",
"type": "refund",
"merchantId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32",
"merchantWalletId": "212000",
"amount": {
"amount": "3.14",
"currency": "USD"
},
"source": {
"id": "b8627ae8-732b-4d25-b947-1df8f4007a29",
"type": "card"
},
"description": "Payment",
"status": "pending",
"originalPayment": {
"id": "b8627ae8-732b-4d25-b947-1df8f4007a29",
"type": "payment",
"amount": {
"amount": "3.14",
"currency": "USD"
},
"description": "Payment",
"status": "pending",
"requiredAction": {
"type": "three_d_secure_required",
"redirectUrl": "https://example.org"
},
"fees": {
"amount": "3.14",
"currency": "USD"
},
"createDate": "2020-04-10T02:13:30.000Z"
},
"cancel": {
"id": "b8627ae8-732b-4d25-b947-1df8f4007a29",
"type": "cancel",
"description": "Payment",
"status": "pending",
"createDate": "2020-04-10T02:13:30.000Z"
},
"fees": {
"amount": "3.14",
"currency": "USD"
},
"channel": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7",
"createDate": "2020-04-10T02:13:30.000Z",
"updateDate": "2020-04-10T02:13:30.000Z"
}
],
"fees": {
"amount": "3.14",
"currency": "USD"
},
"trackingRef": "24910599141085313498894",
"externalRef": "YYYYMMDDXXXXXXXX012345",
"errorCode": "payment_failed",
"metadata": {
"email": "satoshi@circle.com",
"phoneNumber": "+14155555555"
},
"channel": "ba943ff1-ca16-49b2-ba55-1057e70ca5c7",
"riskEvaluation": {
"decision": "approved",
"reason": "3000"
},
"createDate": "2020-04-10T02:13:30.000Z",
"updateDate": "2020-04-10T02:13:30.000Z"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Universally unique identifier (UUID v4) of a resource.
Example:
"b3d9d2d5-4c12-4946-a09d-953e82fae2b0"
Response
Successfully retrieved a payment.
- Option 1
- Option 2
Show child attributes
Show child attributes
Was this page helpful?
⌘I