curl --request GET \
--url https://apiv2.example.com/payment-intents/{paymentIntentId} \
--header 'X-Api-Key: <api-key>'import requests
url = "https://apiv2.example.com/payment-intents/{paymentIntentId}"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://apiv2.example.com/payment-intents/{paymentIntentId}', 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://apiv2.example.com/payment-intents/{paymentIntentId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <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://apiv2.example.com/payment-intents/{paymentIntentId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<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://apiv2.example.com/payment-intents/{paymentIntentId}")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiv2.example.com/payment-intents/{paymentIntentId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"paymentIntentId": "64870b5c-fb61-4c9a-955a-e148e0826c20",
"customerId": "a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d",
"status": "SUCCEEDED",
"amount": 29,
"currency": "USD",
"lineItems": [
{
"description": "Mobile subscription - Premium Plan",
"amount": 29,
"subscriptionId": "a8174435-6378-4be5-a9f5-8b4aaadae5d4",
"licenseId": "ffb19d4f-b3b6-4f2b-9365-dd80bdcf0a77",
"discounts": [
{
"description": "Loyalty discount",
"amount": 5
}
],
"taxes": [
{
"description": "VAT 25%",
"amount": 7.25
}
]
}
],
"attempts": [
{
"paymentAttemptId": "a4da2b04-aa79-4b40-8987-048d6caf118f",
"amount": 29,
"currency": "USD",
"result": "SUCCEEDED",
"createdAt": "2024-01-15T10:00:00Z",
"reason": "card_declined",
"chargedAt": "2024-01-15T10:00:00Z"
}
],
"refunds": [
{
"refundId": "c014b666-22e4-430e-bb18-9257a383dfe2",
"amount": 29,
"currency": "USD",
"status": "SUCCEEDED",
"createdAt": "2024-01-15T10:00:00Z",
"reason": "REQUESTED_BY_CUSTOMER"
}
],
"createdAt": "2024-01-15T10:00:00Z",
"updatedAt": "2024-01-15T10:00:00Z",
"description": "Mobile subscription renewal",
"dueAt": "2024-01-15T10:00:00Z"
}{
"message": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"suggestion": "<string>"
}
],
"hint": "<string>"
}{
"message": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"suggestion": "<string>"
}
],
"hint": "<string>"
}{
"message": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"suggestion": "<string>"
}
],
"hint": "<string>"
}{
"message": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"suggestion": "<string>"
}
],
"hint": "<string>"
}{
"message": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"suggestion": "<string>"
}
],
"hint": "<string>"
}Get payment intent
Get a payment intent by ID, including its charge attempts, refunds, and line items.
curl --request GET \
--url https://apiv2.example.com/payment-intents/{paymentIntentId} \
--header 'X-Api-Key: <api-key>'import requests
url = "https://apiv2.example.com/payment-intents/{paymentIntentId}"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://apiv2.example.com/payment-intents/{paymentIntentId}', 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://apiv2.example.com/payment-intents/{paymentIntentId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <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://apiv2.example.com/payment-intents/{paymentIntentId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<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://apiv2.example.com/payment-intents/{paymentIntentId}")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiv2.example.com/payment-intents/{paymentIntentId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"paymentIntentId": "64870b5c-fb61-4c9a-955a-e148e0826c20",
"customerId": "a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d",
"status": "SUCCEEDED",
"amount": 29,
"currency": "USD",
"lineItems": [
{
"description": "Mobile subscription - Premium Plan",
"amount": 29,
"subscriptionId": "a8174435-6378-4be5-a9f5-8b4aaadae5d4",
"licenseId": "ffb19d4f-b3b6-4f2b-9365-dd80bdcf0a77",
"discounts": [
{
"description": "Loyalty discount",
"amount": 5
}
],
"taxes": [
{
"description": "VAT 25%",
"amount": 7.25
}
]
}
],
"attempts": [
{
"paymentAttemptId": "a4da2b04-aa79-4b40-8987-048d6caf118f",
"amount": 29,
"currency": "USD",
"result": "SUCCEEDED",
"createdAt": "2024-01-15T10:00:00Z",
"reason": "card_declined",
"chargedAt": "2024-01-15T10:00:00Z"
}
],
"refunds": [
{
"refundId": "c014b666-22e4-430e-bb18-9257a383dfe2",
"amount": 29,
"currency": "USD",
"status": "SUCCEEDED",
"createdAt": "2024-01-15T10:00:00Z",
"reason": "REQUESTED_BY_CUSTOMER"
}
],
"createdAt": "2024-01-15T10:00:00Z",
"updatedAt": "2024-01-15T10:00:00Z",
"description": "Mobile subscription renewal",
"dueAt": "2024-01-15T10:00:00Z"
}{
"message": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"suggestion": "<string>"
}
],
"hint": "<string>"
}{
"message": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"suggestion": "<string>"
}
],
"hint": "<string>"
}{
"message": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"suggestion": "<string>"
}
],
"hint": "<string>"
}{
"message": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"suggestion": "<string>"
}
],
"hint": "<string>"
}{
"message": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"suggestion": "<string>"
}
],
"hint": "<string>"
}Authorizations
An API key that grants access to the Connect API. You can create and manage API keys in the portal.
Path Parameters
The unique identifier of the payment intent to retrieve.
Response
Payment intent retrieved successfully
A collection of money driven over card rails for a customer, with its charge attempts, refunds, and billed line items.
The unique identifier for this payment intent.
"64870b5c-fb61-4c9a-955a-e148e0826c20"
The customer this payment intent collects from.
"a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d"
Current stage of a payment intent as it is collected over card rails.
PENDING, REQUIRES_ACTION, PROCESSING, SUCCEEDED, REQUIRES_PAYMENT_METHOD, CANCELED "SUCCEEDED"
The total amount to collect.
29
The currency of the amount.
"USD"
The items that make up the collected amount.
Show child attributes
Show child attributes
Charge attempts made against this payment intent, most recent first.
Show child attributes
Show child attributes
Refunds issued against this payment intent.
Show child attributes
Show child attributes
When the payment intent was created.
"2024-01-15T10:00:00Z"
When the payment intent was last updated.
"2024-01-15T10:00:00Z"
A human-readable description of what is being collected.
"Mobile subscription renewal"
When the amount is due.
"2024-01-15T10:00:00Z"