Skip to main content
POST
/
ext-stripe
/
payment-intent
/
confirm
/
{paymentIntentId}
Confirm Stripe payment intent
curl --request POST \
  --url https://prod01-apigw.{customer_name}.fabric.zone/ext-stripe/payment-intent/confirm/{paymentIntentId} \
  --header 'Content-Type: application/json' \
  --data '
{
  "payment_method": "pi_1GsyhzFbKq2PvwXbwAI3ZluI",
  "receipt_email": "joedoe@fabric.inc",
  "setup_future_usage": "off_session"
}
'
import requests

url = "https://prod01-apigw.{customer_name}.fabric.zone/ext-stripe/payment-intent/confirm/{paymentIntentId}"

payload = {
"payment_method": "pi_1GsyhzFbKq2PvwXbwAI3ZluI",
"receipt_email": "joedoe@fabric.inc",
"setup_future_usage": "off_session"
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
payment_method: 'pi_1GsyhzFbKq2PvwXbwAI3ZluI',
receipt_email: 'joedoe@fabric.inc',
setup_future_usage: 'off_session'
})
};

fetch('https://prod01-apigw.{customer_name}.fabric.zone/ext-stripe/payment-intent/confirm/{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://prod01-apigw.{customer_name}.fabric.zone/ext-stripe/payment-intent/confirm/{paymentIntentId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'payment_method' => 'pi_1GsyhzFbKq2PvwXbwAI3ZluI',
'receipt_email' => 'joedoe@fabric.inc',
'setup_future_usage' => 'off_session'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://prod01-apigw.{customer_name}.fabric.zone/ext-stripe/payment-intent/confirm/{paymentIntentId}"

payload := strings.NewReader("{\n \"payment_method\": \"pi_1GsyhzFbKq2PvwXbwAI3ZluI\",\n \"receipt_email\": \"joedoe@fabric.inc\",\n \"setup_future_usage\": \"off_session\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://prod01-apigw.{customer_name}.fabric.zone/ext-stripe/payment-intent/confirm/{paymentIntentId}")
.header("Content-Type", "application/json")
.body("{\n \"payment_method\": \"pi_1GsyhzFbKq2PvwXbwAI3ZluI\",\n \"receipt_email\": \"joedoe@fabric.inc\",\n \"setup_future_usage\": \"off_session\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://prod01-apigw.{customer_name}.fabric.zone/ext-stripe/payment-intent/confirm/{paymentIntentId}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"payment_method\": \"pi_1GsyhzFbKq2PvwXbwAI3ZluI\",\n \"receipt_email\": \"joedoe@fabric.inc\",\n \"setup_future_usage\": \"off_session\"\n}"

response = http.request(request)
puts response.read_body
{
  "id": "pi_1GsyhzFbKq2PvwXbwAI3ZluI",
  "object": "payment_intent",
  "amount": 1000,
  "amount_capturable": 0,
  "amount_received": 0,
  "application": "<string>",
  "application_fee_amount": 123,
  "canceled_at": "<string>",
  "cancellation_reason": "<string>",
  "capture_method": "manual",
  "client_secret": "pi_1GsyhzFbKq2Pvw1bwAI3ZluI_secret_GKG6hcap7VCggeoqJICAqSsRW",
  "confirmation_method": "automatic",
  "created": 1591913835,
  "currency": "usd",
  "customer": "<string>",
  "description": "<string>",
  "invoice": "<string>",
  "last_payment_error": "<string>",
  "livemode": true,
  "metadata": {},
  "next_action": "<string>",
  "on_behalf_of": "<string>",
  "payment_method": "<string>",
  "payment_method_options": {
    "card": {
      "installments": "<string>",
      "network": "<string>",
      "request_three_d_secure": "automatic"
    }
  },
  "payment_method_types": [
    "card"
  ],
  "receipt_email": "<string>",
  "review": "<string>",
  "setup_future_usage": "on_session",
  "shipping": "<string>",
  "source": "<string>",
  "statement_descriptor": "<string>",
  "statement_descriptor_suffix": "<string>",
  "status": "requires_payment_method",
  "transfer_data": "<string>",
  "transfer_group": "<string>",
  "billing_details": {
    "address": {
      "line1": "3520 Millenio",
      "city": "Vancouver",
      "state": "BC",
      "country": "CA",
      "postal_code": "V5R 6G9",
      "line2": "Crowley Drive"
    },
    "name": "John Smith",
    "email": "john@fabric.inc",
    "phone": "123-456-7890"
  },
  "charges": {
    "object": "list",
    "data": [
      {
        "id": "ch_1GszZAFbKq2PvwXbWRHwiXg0",
        "object": "charge",
        "amount": 1500,
        "amount_refunded": 0,
        "application": "<string>",
        "application_fee": "<string>",
        "application_fee_amount": "<string>",
        "balance_transaction": "<string>",
        "calculated_statement_descriptor": "Stripe",
        "captured": false,
        "created": 1591917132,
        "currency": "usd",
        "customer": "<string>",
        "description": "<string>",
        "destination": "<string>",
        "dispute": false,
        "disputed": "<string>",
        "failure_code": "<string>",
        "failure_message": "<string>",
        "fraud_details": {},
        "invoice": "<string>",
        "livemode": false,
        "metadata": "<string>",
        "on_behalf_of": "<string>",
        "order": "<string>",
        "outcome": {
          "network_status": "approved_by_network",
          "reason": "<string>",
          "risk_level": "normal",
          "risk_score": 7,
          "seller_message": "Payment complete.",
          "type": "authorized"
        },
        "paid": true,
        "payment_intent": "pi_1GsyhzFbKq2PvwXbwAI3ZluI",
        "payment_method": "pm_1GszYCFbKq2PvwXb2CDbdZOP",
        "payment_method_details": {
          "card": {
            "brand": "visa",
            "checks": {
              "address_line1_check": "<string>",
              "address_postal_code_check": "pass",
              "cvc_check": "pass"
            },
            "country": "US",
            "exp_month": 3,
            "exp_year": 2023,
            "fingerprint": "KYFNiC9k7gBUEnMg",
            "funding": "credit",
            "installments": "<string>",
            "last4": "4242",
            "network": "visa",
            "three_d_secure": "<string>",
            "wallet": "<string>"
          },
          "type": "card"
        },
        "receipt_email": "<string>",
        "receipt_number": "<string>",
        "receipt_url": "https://pay.stripe.com/receipts/acct_1GrptTFbKq2PvwXb/ch_1GszZAFbKq2PvwXbWRHwiXg0/rcpt_HRtLuMrk7E5VQ1rLWNVzKrXHFZHHczr",
        "refunded": false,
        "refunds": {
          "object": "list",
          "data": "<array>",
          "has_more": false,
          "total_count": 0,
          "url": "/v1/charges/ch_1GszZAFbKq2PvwXbWRHwiXg0/refunds"
        },
        "review": "<string>",
        "shipping": "<string>",
        "source": "<string>",
        "source_transfer": "<string>",
        "statement_descriptor": "<string>",
        "statement_descriptor_suffix": "<string>",
        "status": "succeeded",
        "transfer_data": "<string>",
        "transfer_group": "<string>"
      }
    ],
    "has_more": false,
    "total_count": 0,
    "url": "/v1/charges?payment_intent=pi_1GsyhzFbKq2PvwXbwAI3ZluI"
  }
}
{
"code": "<string>",
"message": "<string>"
}
{
"message": "Forbidden"
}
{
"code": "<string>",
"message": "<string>"
}

Headers

x-api-key
string
Example:

"0LybWR49k95cCwYh3cu0waCYoh4H2Eux2J52wn4k"

Path Parameters

paymentIntentId
string
required

Payment intent Id.

Body

application/json
payment_method
string
Example:

"pi_1GsyhzFbKq2PvwXbwAI3ZluI"

receipt_email
string<email>
Example:

"joedoe@fabric.inc"

setup_future_usage
enum<string>
Available options:
on_session,
off_session
Example:

"off_session"

Response

Confirm stripe payment intent

id
string
Example:

"pi_1GsyhzFbKq2PvwXbwAI3ZluI"

object
string
Example:

"payment_intent"

amount
number
Example:

1000

amount_capturable
number
Example:

0

amount_received
number
Example:

0

application
string
application_fee_amount
number
canceled_at
string
cancellation_reason
string
capture_method
string
Example:

"manual"

client_secret
string
Example:

"pi_1GsyhzFbKq2Pvw1bwAI3ZluI_secret_GKG6hcap7VCggeoqJICAqSsRW"

confirmation_method
string
Example:

"automatic"

created
number
Example:

1591913835

currency
string
Example:

"usd"

customer
string
description
string
invoice
string
last_payment_error
string
livemode
boolean
metadata
object
next_action
string
on_behalf_of
string
payment_method
string
payment_method_options
object
payment_method_types
string[]
Example:
["card"]
receipt_email
string
review
string
setup_future_usage
string
Example:

"on_session"

shipping
string
source
string
statement_descriptor
string
statement_descriptor_suffix
string
status
string
Example:

"requires_payment_method"

transfer_data
string
transfer_group
string
billing_details
object
charges
object