curl --request GET \
--url https://api.sbx.moduluslabs.io/ecom/v1/payment-intents/{id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.sbx.moduluslabs.io/ecom/v1/payment-intents/{id}"
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://api.sbx.moduluslabs.io/ecom/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://api.sbx.moduluslabs.io/ecom/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 => [
"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://api.sbx.moduluslabs.io/ecom/v1/payment-intents/{id}"
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://api.sbx.moduluslabs.io/ecom/v1/payment-intents/{id}")
.header("X-API-Key", "<api-key>")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.sbx.moduluslabs.io/ecom/v1/payment-intents/{id}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-API-Key", "<api-key>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123,
"currency": "<string>",
"status": "ACTIVE",
"updated_at": "2023-11-07T05:31:56Z",
"order_reference": "<string>",
"payment_attempt_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_message": "<string>",
"failure_category": "VERIFICATION_REJECTED",
"receipt": {
"approval_code": "<string>",
"transaction_id": "<string>",
"reconciliation_id": "<string>",
"card_scheme": "<string>",
"card_last_four": "<string>",
"completed_at": "2023-11-07T05:31:56Z",
"invoice_number": "<string>"
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "<string>",
"correlation_id": "<string>",
"details": {
"field": "description",
"rule": "non_blank"
}
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "<string>",
"correlation_id": "<string>",
"details": {
"field": "description",
"rule": "non_blank"
}
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "<string>",
"correlation_id": "<string>",
"details": {
"field": "description",
"rule": "non_blank"
}
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "<string>",
"correlation_id": "<string>",
"details": {
"field": "description",
"rule": "non_blank"
}
}
}Retrieve Payment Intent
Retrieve the authoritative status and receipt for a Payment Intent
curl --request GET \
--url https://api.sbx.moduluslabs.io/ecom/v1/payment-intents/{id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.sbx.moduluslabs.io/ecom/v1/payment-intents/{id}"
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://api.sbx.moduluslabs.io/ecom/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://api.sbx.moduluslabs.io/ecom/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 => [
"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://api.sbx.moduluslabs.io/ecom/v1/payment-intents/{id}"
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://api.sbx.moduluslabs.io/ecom/v1/payment-intents/{id}")
.header("X-API-Key", "<api-key>")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.sbx.moduluslabs.io/ecom/v1/payment-intents/{id}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-API-Key", "<api-key>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123,
"currency": "<string>",
"status": "ACTIVE",
"updated_at": "2023-11-07T05:31:56Z",
"order_reference": "<string>",
"payment_attempt_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_message": "<string>",
"failure_category": "VERIFICATION_REJECTED",
"receipt": {
"approval_code": "<string>",
"transaction_id": "<string>",
"reconciliation_id": "<string>",
"card_scheme": "<string>",
"card_last_four": "<string>",
"completed_at": "2023-11-07T05:31:56Z",
"invoice_number": "<string>"
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "<string>",
"correlation_id": "<string>",
"details": {
"field": "description",
"rule": "non_blank"
}
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "<string>",
"correlation_id": "<string>",
"details": {
"field": "description",
"rule": "non_blank"
}
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "<string>",
"correlation_id": "<string>",
"details": {
"field": "description",
"rule": "non_blank"
}
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "<string>",
"correlation_id": "<string>",
"details": {
"field": "description",
"rule": "non_blank"
}
}
}X-API-Key. The response intentionally excludes
client_secret.Authorizations
Server-side secret key (sk_...) supplied in X-API-Key. Never expose this key in a browser or mobile app.
Path Parameters
Payment Intent identifier returned by the create operation.
Response
Payment intent retrieved.
Unique Payment Intent identifier (UUID v7).
Payment amount in the currency's smallest unit (for PHP, centavos).
ISO 4217 currency code.
Authoritative intent or latest payment-attempt status.
ACTIVE, EXPIRED, CONSUMED, CANCELLED, REQUIRES_ACTION, PROCESSING, SUCCEEDED, DECLINED, FAILED UTC RFC 3339 timestamp when the returned state was last updated.
Merchant-defined order reference supplied when the Payment Intent was created. Omitted when no order reference was supplied.
100Identifier of the latest payment attempt. Omitted until an attempt exists.
Customer-safe message for the latest outcome. Omitted when no message is available.
Normalized failure category for a failed attempt. PROCESSOR_UNAVAILABLE means the processor or issuer network returned an authoritative unavailable response and no authorization was created. CARD_NOT_ELIGIBLE means the card was rejected by a card-eligibility rule before reaching the processor. Omitted for non-failure states.
VERIFICATION_REJECTED, VERIFICATION_UNAVAILABLE, PAYMENT_REJECTED, PAYMENT_PROCESSING_ERROR, PROCESSOR_UNAVAILABLE, CARD_NOT_ELIGIBLE Receipt details for a successful payment. Omitted when no successful payment exists.
Show child attributes
Show child attributes
Was this page helpful?