Retrieve
curl --request GET \
--url https://{defaultHost}/v1/payment_intents/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://{defaultHost}/v1/payment_intents/{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/payment_intents/{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/payment_intents/{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/payment_intents/{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/payment_intents/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{defaultHost}/v1/payment_intents/{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": "54ad6b6c-009a-479b-a4cd-174ba7896cc1",
"object": "payment_intent",
"amount": 500,
"currency": "usd",
"external_intent_id": "pi_3JhDzG2fs4LLhxzS06L7dgBR",
"live_mode": true,
"off_session": false,
"processor_data": {
"stripe": {
"account_id": "external_account_50",
"publishable_key": "pk_test_51KeWoQFugiAKLuJycCZesY1aYEzfauqW2SHSZSUj5xCorx7h7oZd5i6Vz2whx7Y5fMZr6WQQTeOoQEtaEnpk4fkB00dinySlbK",
"client_secret": "pi_3K6NFo2fs4LLhxzS1leftxKh_secret_qoy2TA8XJEYKTp4bbF8hT3clV",
"type": "payment",
"payment_method_id": null
}
},
"processor_type": "stripe",
"reusable": false,
"status": "pending",
"checkout": null,
"customer": "a3f0e92d-7c74-4abd-b7a2-1837f5b23bb0",
"payment_method": null,
"platform_fee": null,
"service_fee": null,
"created_at": 1793796929,
"updated_at": 1793796929
}Payment Intents
Retrieve
Retrieves details of a specific payment intent.
GET
/
v1
/
payment_intents
/
{id}
Retrieve
curl --request GET \
--url https://{defaultHost}/v1/payment_intents/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://{defaultHost}/v1/payment_intents/{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/payment_intents/{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/payment_intents/{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/payment_intents/{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/payment_intents/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{defaultHost}/v1/payment_intents/{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": "54ad6b6c-009a-479b-a4cd-174ba7896cc1",
"object": "payment_intent",
"amount": 500,
"currency": "usd",
"external_intent_id": "pi_3JhDzG2fs4LLhxzS06L7dgBR",
"live_mode": true,
"off_session": false,
"processor_data": {
"stripe": {
"account_id": "external_account_50",
"publishable_key": "pk_test_51KeWoQFugiAKLuJycCZesY1aYEzfauqW2SHSZSUj5xCorx7h7oZd5i6Vz2whx7Y5fMZr6WQQTeOoQEtaEnpk4fkB00dinySlbK",
"client_secret": "pi_3K6NFo2fs4LLhxzS1leftxKh_secret_qoy2TA8XJEYKTp4bbF8hT3clV",
"type": "payment",
"payment_method_id": null
}
},
"processor_type": "stripe",
"reusable": false,
"status": "pending",
"checkout": null,
"customer": "a3f0e92d-7c74-4abd-b7a2-1837f5b23bb0",
"payment_method": null,
"platform_fee": null,
"service_fee": null,
"created_at": 1793796929,
"updated_at": 1793796929
}Authorizations
Query Parameters
If true, the server will check the associated payment processor to see if a status change has occured. (This should be used when retrieving a checkout or payment intent immediately after it has been paid through the processor. In this scenario, it's possible that you'll request the checkout before the server has received the webhook from the processor. Setting this pararmeter to true prevents this scenario.)
Response
200 - application/json
Success
Expandable – The associated checkout ID.
Expandable – The associated customer ID.
Expandable – The associated payment method ID.
Expandable – The associated platform fee ID.
Expandable – The associated service fee ID.
Was this page helpful?