Retrieve 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"
}
}
}JavaScript SDK
Retrieve Payment Intent
Retrieve the authoritative status and receipt for a Payment Intent
GET
/
payment-intents
/
{id}
Retrieve 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"
}
}
}Use this server-side endpoint to recover the latest payment state or receipt.
Send the secret key in
X-API-Key. The response intentionally excludes
client_secret.Authorizations
Response
Payment intent retrieved.
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.
Available options:
VERIFICATION_REJECTED, VERIFICATION_UNAVAILABLE, PAYMENT_REJECTED, PAYMENT_PROCESSING_ERROR, PROCESSOR_UNAVAILABLE, CARD_NOT_ELIGIBLE Was this page helpful?