Get payment by cartId
curl --request GET \
--url https://prod01-apigw.{customer_name}.fabric.zone/api-payment/payment/{cartId}import requests
url = "https://prod01-apigw.{customer_name}.fabric.zone/api-payment/payment/{cartId}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://prod01-apigw.{customer_name}.fabric.zone/api-payment/payment/{cartId}', 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://prod01-apigw.{customer_name}.fabric.zone/api-payment/payment/{cartId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://prod01-apigw.{customer_name}.fabric.zone/api-payment/payment/{cartId}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://prod01-apigw.{customer_name}.fabric.zone/api-payment/payment/{cartId}")
.asString();require 'uri'
require 'net/http'
url = URI("https://prod01-apigw.{customer_name}.fabric.zone/api-payment/payment/{cartId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"query": {
"limit": 10,
"offset": 0,
"count": 1
},
"payments": [
{
"billToAddress": {
"name": {
"first": "John",
"last": "Smith"
},
"email": "user1@gmail.com",
"phone": {
"number": "3334445555",
"kind": "Mobile"
},
"street1": "1000 main street",
"city": "Seattle",
"state": "WA",
"country": "US",
"zipCode": "98101",
"street2": "1000 main street"
},
"_id": "5fee9d59f2f08a1b3cbdea08",
"createdAt": "2020-12-31T02:09:53.914Z",
"updatedAt": "2020-12-31T02:09:53.914Z",
"paymentDetails": {
"transactionDetails": {
"paymentType": "CARD_STRIPE",
"paymentToken": "pi_1IyMGc2YBvYaVyBQNkOiCE3E"
},
"paymentStatus": {
"cardHolderFullName": "First Last",
"paymentMethod": "visa",
"last4": "4242",
"amountCapturable": 99900,
"status": "succeeded"
},
"amount": 999,
"currency": "USD"
},
"version": 0,
"cartId": "60b90dd7308ded0008ee3c5d",
"isValid": true,
"__v": 0
}
]
}{
"code": "<string>",
"message": "<string>"
}{
"message": "Forbidden"
}{
"code": "CART_NOT_FOUND",
"message": "Cart not found."
}{
"code": "<string>",
"message": "<string>"
}Payments
Get payment by cartId
Get payment by cartId
GET
/
api-payment
/
payment
/
{cartId}
Get payment by cartId
curl --request GET \
--url https://prod01-apigw.{customer_name}.fabric.zone/api-payment/payment/{cartId}import requests
url = "https://prod01-apigw.{customer_name}.fabric.zone/api-payment/payment/{cartId}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://prod01-apigw.{customer_name}.fabric.zone/api-payment/payment/{cartId}', 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://prod01-apigw.{customer_name}.fabric.zone/api-payment/payment/{cartId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://prod01-apigw.{customer_name}.fabric.zone/api-payment/payment/{cartId}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://prod01-apigw.{customer_name}.fabric.zone/api-payment/payment/{cartId}")
.asString();require 'uri'
require 'net/http'
url = URI("https://prod01-apigw.{customer_name}.fabric.zone/api-payment/payment/{cartId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"query": {
"limit": 10,
"offset": 0,
"count": 1
},
"payments": [
{
"billToAddress": {
"name": {
"first": "John",
"last": "Smith"
},
"email": "user1@gmail.com",
"phone": {
"number": "3334445555",
"kind": "Mobile"
},
"street1": "1000 main street",
"city": "Seattle",
"state": "WA",
"country": "US",
"zipCode": "98101",
"street2": "1000 main street"
},
"_id": "5fee9d59f2f08a1b3cbdea08",
"createdAt": "2020-12-31T02:09:53.914Z",
"updatedAt": "2020-12-31T02:09:53.914Z",
"paymentDetails": {
"transactionDetails": {
"paymentType": "CARD_STRIPE",
"paymentToken": "pi_1IyMGc2YBvYaVyBQNkOiCE3E"
},
"paymentStatus": {
"cardHolderFullName": "First Last",
"paymentMethod": "visa",
"last4": "4242",
"amountCapturable": 99900,
"status": "succeeded"
},
"amount": 999,
"currency": "USD"
},
"version": 0,
"cartId": "60b90dd7308ded0008ee3c5d",
"isValid": true,
"__v": 0
}
]
}{
"code": "<string>",
"message": "<string>"
}{
"message": "Forbidden"
}{
"code": "CART_NOT_FOUND",
"message": "Cart not found."
}{
"code": "<string>",
"message": "<string>"
}Was this page helpful?
⌘I
