Skip to main content
GET
/
v1
/
charges
/
{id}
Retrieve
curl --request GET \
  --url https://{defaultHost}/v1/charges/{id} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://{defaultHost}/v1/charges/{id}"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://{defaultHost}/v1/charges/{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://{defaultHost}/v1/charges/{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://{defaultHost}/v1/charges/{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://{defaultHost}/v1/charges/{id}")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://{defaultHost}/v1/charges/{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
{
  "id": "b47ca4c2-6cd2-41d5-aefb-4dc459642c56",
  "object": "charge",
  "amount": 2900,
  "currency": "usd",
  "disputed_amount": 0,
  "external_charge_id": "73egdro1cichvkn",
  "fully_refunded": false,
  "live_mode": true,
  "refunded_amount": 0,
  "customer": "5f009737-3ed4-4ad4-8f0f-106d64a2df6c",
  "checkout": "53778bf5-8a34-43ef-a4b8-480e1c1ebcfc",
  "payment_intent": "54aa5776-2be4-44c0-b8bf-c208e1c6a89f",
  "payment_method": null,
  "created_at": 1782485811,
  "updated_at": 1782485811
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Response

200 - application/json

Success

id
string | null

The UUID of the specific object.

object
string

A string describing the object type returned.

amount
integer

The amount in cents that was charged, represented as a whole integer. For example 9900 is equivalent to $99.

currency
string

Three-letter ISO currency code, in lowercase.

disputed_amount
integer

The amount in cents that has been disputed.

external_charge_id
string

The external processor ID representing this charge.

fully_refunded
boolean

Whether or not this charge has been refunded completely.

live_mode
boolean

Set to true if this charge is in live mode, and set to false if it is in test mode.

refunded_amount
integer

Amount in cents refunded (can be less than the amount attribute on the charge if a partial refund was issued).

customer

Expandable – The associated customer ID.

checkout

Expandable – The associated checkout ID.

disputes

Expandable – Property not returned unless expanded.

payment_intent

Expandable – The associated payment intent ID.

payment_method

Expandable – The associated payment method ID.

refunds

Expandable – Property not returned unless expanded.

created_at
integer | null

Time at which the object was created. Measured in seconds since the Unix epoch.

updated_at
integer | null

Time at which the object was last updated. Measured in seconds since the Unix epoch.