Create a one-time Commerce order and card PaymentIntent
curl --request POST \
--url https://api.contactbutton.com/v1/public/commerce/offers/{offer}/payment-intents \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"amount_minor": 5000500,
"quantity": 1,
"customer_name": "<string>",
"customer_email": "jsmith@example.com",
"customer_message": "<string>",
"marketing_consent": false,
"source_id": "<string>",
"attribution": {}
}
'import requests
url = "https://api.contactbutton.com/v1/public/commerce/offers/{offer}/payment-intents"
payload = {
"amount_minor": 5000500,
"quantity": 1,
"customer_name": "<string>",
"customer_email": "jsmith@example.com",
"customer_message": "<string>",
"marketing_consent": False,
"source_id": "<string>",
"attribution": {}
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Idempotency-Key': '<idempotency-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount_minor: 5000500,
quantity: 1,
customer_name: '<string>',
customer_email: 'jsmith@example.com',
customer_message: '<string>',
marketing_consent: false,
source_id: '<string>',
attribution: {}
})
};
fetch('https://api.contactbutton.com/v1/public/commerce/offers/{offer}/payment-intents', 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.contactbutton.com/v1/public/commerce/offers/{offer}/payment-intents",
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([
'amount_minor' => 5000500,
'quantity' => 1,
'customer_name' => '<string>',
'customer_email' => 'jsmith@example.com',
'customer_message' => '<string>',
'marketing_consent' => false,
'source_id' => '<string>',
'attribution' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Idempotency-Key: <idempotency-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.contactbutton.com/v1/public/commerce/offers/{offer}/payment-intents"
payload := strings.NewReader("{\n \"amount_minor\": 5000500,\n \"quantity\": 1,\n \"customer_name\": \"<string>\",\n \"customer_email\": \"jsmith@example.com\",\n \"customer_message\": \"<string>\",\n \"marketing_consent\": false,\n \"source_id\": \"<string>\",\n \"attribution\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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://api.contactbutton.com/v1/public/commerce/offers/{offer}/payment-intents")
.header("Idempotency-Key", "<idempotency-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount_minor\": 5000500,\n \"quantity\": 1,\n \"customer_name\": \"<string>\",\n \"customer_email\": \"jsmith@example.com\",\n \"customer_message\": \"<string>\",\n \"marketing_consent\": false,\n \"source_id\": \"<string>\",\n \"attribution\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.contactbutton.com/v1/public/commerce/offers/{offer}/payment-intents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount_minor\": 5000500,\n \"quantity\": 1,\n \"customer_name\": \"<string>\",\n \"customer_email\": \"jsmith@example.com\",\n \"customer_message\": \"<string>\",\n \"marketing_consent\": false,\n \"source_id\": \"<string>\",\n \"attribution\": {}\n}"
response = http.request(request)
puts response.read_body{
"data": "<unknown>",
"meta": {
"request_id": "<string>",
"next_cursor": "<string>"
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"instance": "<string>",
"request_id": "<string>",
"errors": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"instance": "<string>",
"request_id": "<string>",
"errors": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"instance": "<string>",
"request_id": "<string>",
"errors": {}
}Create a one-time Commerce order and card PaymentIntent
The server calculates price, connected account, and the fixed 1applicationfee.USDtransactionsmusttotalatleast10. Order payment state is finalized by signed Stripe webhooks.
POST
/
public
/
commerce
/
offers
/
{offer}
/
payment-intents
Create a one-time Commerce order and card PaymentIntent
curl --request POST \
--url https://api.contactbutton.com/v1/public/commerce/offers/{offer}/payment-intents \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"amount_minor": 5000500,
"quantity": 1,
"customer_name": "<string>",
"customer_email": "jsmith@example.com",
"customer_message": "<string>",
"marketing_consent": false,
"source_id": "<string>",
"attribution": {}
}
'import requests
url = "https://api.contactbutton.com/v1/public/commerce/offers/{offer}/payment-intents"
payload = {
"amount_minor": 5000500,
"quantity": 1,
"customer_name": "<string>",
"customer_email": "jsmith@example.com",
"customer_message": "<string>",
"marketing_consent": False,
"source_id": "<string>",
"attribution": {}
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Idempotency-Key': '<idempotency-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount_minor: 5000500,
quantity: 1,
customer_name: '<string>',
customer_email: 'jsmith@example.com',
customer_message: '<string>',
marketing_consent: false,
source_id: '<string>',
attribution: {}
})
};
fetch('https://api.contactbutton.com/v1/public/commerce/offers/{offer}/payment-intents', 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.contactbutton.com/v1/public/commerce/offers/{offer}/payment-intents",
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([
'amount_minor' => 5000500,
'quantity' => 1,
'customer_name' => '<string>',
'customer_email' => 'jsmith@example.com',
'customer_message' => '<string>',
'marketing_consent' => false,
'source_id' => '<string>',
'attribution' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Idempotency-Key: <idempotency-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.contactbutton.com/v1/public/commerce/offers/{offer}/payment-intents"
payload := strings.NewReader("{\n \"amount_minor\": 5000500,\n \"quantity\": 1,\n \"customer_name\": \"<string>\",\n \"customer_email\": \"jsmith@example.com\",\n \"customer_message\": \"<string>\",\n \"marketing_consent\": false,\n \"source_id\": \"<string>\",\n \"attribution\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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://api.contactbutton.com/v1/public/commerce/offers/{offer}/payment-intents")
.header("Idempotency-Key", "<idempotency-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount_minor\": 5000500,\n \"quantity\": 1,\n \"customer_name\": \"<string>\",\n \"customer_email\": \"jsmith@example.com\",\n \"customer_message\": \"<string>\",\n \"marketing_consent\": false,\n \"source_id\": \"<string>\",\n \"attribution\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.contactbutton.com/v1/public/commerce/offers/{offer}/payment-intents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount_minor\": 5000500,\n \"quantity\": 1,\n \"customer_name\": \"<string>\",\n \"customer_email\": \"jsmith@example.com\",\n \"customer_message\": \"<string>\",\n \"marketing_consent\": false,\n \"source_id\": \"<string>\",\n \"attribution\": {}\n}"
response = http.request(request)
puts response.read_body{
"data": "<unknown>",
"meta": {
"request_id": "<string>",
"next_cursor": "<string>"
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"instance": "<string>",
"request_id": "<string>",
"errors": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"instance": "<string>",
"request_id": "<string>",
"errors": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"instance": "<string>",
"request_id": "<string>",
"errors": {}
}Headers
Stable 8–120 character key for safe payment creation retries.
Required string length:
8 - 120Path Parameters
Body
application/json
Required and server-validated for contribution offers; ignored for fixed-price offers.
Required range:
1000 <= x <= 10000000Required range:
1 <= x <= 100Maximum string length:
255Maximum string length:
255Maximum string length:
2000Available options:
direct, button, list, popup, page, post, booking Maximum string length:
191Was this page helpful?