Create payment intent
curl --request POST \
--url https://api.atlas.kitchen/storefronts/v1/payment_intents \
--header 'X-Channel-Id: <api-key>' \
--header 'X-Session-Id: <api-key>'import requests
url = "https://api.atlas.kitchen/storefronts/v1/payment_intents"
headers = {
"X-Channel-Id": "<api-key>",
"X-Session-Id": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Channel-Id': '<api-key>', 'X-Session-Id': '<api-key>'}
};
fetch('https://api.atlas.kitchen/storefronts/v1/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.atlas.kitchen/storefronts/v1/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_HTTPHEADER => [
"X-Channel-Id: <api-key>",
"X-Session-Id: <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.atlas.kitchen/storefronts/v1/payment_intents"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-Channel-Id", "<api-key>")
req.Header.Add("X-Session-Id", "<api-key>")
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.atlas.kitchen/storefronts/v1/payment_intents")
.header("X-Channel-Id", "<api-key>")
.header("X-Session-Id", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.atlas.kitchen/storefronts/v1/payment_intents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Channel-Id"] = '<api-key>'
request["X-Session-Id"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"amount": 2490,
"tip": 0,
"status": "pending",
"atlas_pay_url": "https://pay.atlas.kitchen/intent/ab2c8505-c7bc-40ea-9f54-97774ce347b5",
"currency": "SGD"
}Create payment intent
Validates the cart and creates a payment intent with the payment processor.
Returns an atlas_pay_url — redirect the diner there to complete payment.
If a pending intent already exists for the same amount, it is returned instead of creating a duplicate.
After payment: Once the diner completes payment on the hosted page,
they are redirected back to your application. At that point, call
POST /cart/order to validate the payment and convert the cart to an order.
Do NOT wait for webhooks — POST /cart/order checks payment status in real-time.
POST
/
payment_intents
Create payment intent
curl --request POST \
--url https://api.atlas.kitchen/storefronts/v1/payment_intents \
--header 'X-Channel-Id: <api-key>' \
--header 'X-Session-Id: <api-key>'import requests
url = "https://api.atlas.kitchen/storefronts/v1/payment_intents"
headers = {
"X-Channel-Id": "<api-key>",
"X-Session-Id": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Channel-Id': '<api-key>', 'X-Session-Id': '<api-key>'}
};
fetch('https://api.atlas.kitchen/storefronts/v1/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.atlas.kitchen/storefronts/v1/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_HTTPHEADER => [
"X-Channel-Id: <api-key>",
"X-Session-Id: <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.atlas.kitchen/storefronts/v1/payment_intents"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-Channel-Id", "<api-key>")
req.Header.Add("X-Session-Id", "<api-key>")
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.atlas.kitchen/storefronts/v1/payment_intents")
.header("X-Channel-Id", "<api-key>")
.header("X-Session-Id", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.atlas.kitchen/storefronts/v1/payment_intents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Channel-Id"] = '<api-key>'
request["X-Session-Id"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"amount": 2490,
"tip": 0,
"status": "pending",
"atlas_pay_url": "https://pay.atlas.kitchen/intent/ab2c8505-c7bc-40ea-9f54-97774ce347b5",
"currency": "SGD"
}Authorizations
Merchant storefront identifier. Provided during onboarding.
Diner session identifier. Created by GET /channel and returned in the X-Session-Id response header.
Was this page helpful?