curl -X POST https://api.sandbox.deuna.io/v2/merchants/orders/purchase \
-H "X-Api-Key: YOUR_PRIVATE_API_KEY" \
-H "X-Store-Code: STORE_CODE" \
-H "Content-Type: application/json" \
-d '{
"payer_info": {
"email": "buyer@example.com"
},
"payment_source": {
"method_type": "credit_card",
"payment_method": "TOKENIZED_PAYMENT_METHOD"
},
"order_type": "DEUNA_CHECKOUT",
"order": {
"order_id": "retail-93418",
"store_code": "es-online",
"currency": "EUR",
"items_total_amount": 10900,
"sub_total": 11400,
"shipping_amount": 500,
"total_tax_amount": 2152,
"total_discount": 1000,
"total_amount": 13552,
"items": [
{
"id": "shoe-runner-42-blue",
"sku": "RUNNER-BLU-42",
"upc": "8437012345678",
"name": "Runner trainers",
"description": "Everyday lightweight trainers",
"quantity": 1,
"brand": "Northline",
"category": "footwear",
"sub_category": "trainers",
"color": "navy",
"size": "42",
"taxable": true,
"image_url": "https://merchant.example.com/products/runner-blue.jpg",
"details_url": "https://merchant.example.com/products/runner-blue",
"unit_price": {
"amount": 11900,
"currency": "EUR",
"currency_symbol": "€"
},
"total_amount": {
"amount": 10900,
"original_amount": 11900,
"currency": "EUR",
"currency_symbol": "€",
"total_discount": 1000
},
"tax_amount": {
"amount": 2052,
"currency": "EUR",
"currency_symbol": "€"
},
"weight": {
"weight": 850,
"unit": "g"
},
"discounts": [
{
"amount": 1000,
"ref_idx": 0
}
]
}
],
"discounts": [
{
"amount": 1000,
"code": "WELCOME10",
"reference": "campaign-2026-welcome",
"description": "Welcome discount",
"details_url": "https://merchant.example.com/promotions/welcome10",
"free_shipping": {
"is_free_shipping": false,
"maximum_cost_allowed": 0
},
"discount_category": "coupon",
"target_type": "items",
"type": "fixed_amount"
}
],
"shipping_address": {
"first_name": "Alex",
"last_name": "Morgan",
"email": "alex@example.com",
"phone": "+34600000000",
"address1": "Calle de Alcalá 125",
"address2": "3B",
"city": "Madrid",
"zipcode": "28009",
"state_name": "Madrid",
"state_code": "MD",
"country_code": "ES",
"address_type": "home",
"is_default": true
},
"shipping_method": {
"code": "standard-48h",
"name": "Standard delivery",
"min_delivery_date": "2026-10-05",
"max_delivery_date": "2026-10-06",
"cost": 500,
"display_cost": "€5.00",
"tax_amount": 100,
"display_tax_amount": "€1.00",
"scheduler": []
},
"shipping_options": {
"type": "delivery",
"method": "standard-48h",
"carrier": "Merchant Logistics",
"price": {
"amount": 500,
"currency": "EUR"
},
"requires_shipping": true,
"details": {
"store_id": "es-online",
"store_name": "Online store",
"address": "Calle de Alcalá 125, Madrid",
"address_coordinates": {
"lat": 40.4217,
"lng": -3.6772
},
"contact": {
"name": "Customer care",
"phone": "+34910000000"
},
"additional_details": {
"address_notes": "Leave with the concierge."
}
}
},
"channel_type": "desktop_web",
"metadata": {
"vertical": "retail",
"fulfillment_node": "warehouse-mad-02"
}
},
"callback_urls": {
"on_success": "https://merchant.example.com/payments/success",
"on_pending": "https://merchant.example.com/payments/pending",
"on_reject": "https://merchant.example.com/payments/rejected",
"on_canceled": "https://merchant.example.com/payments/canceled",
"on_failed": "https://merchant.example.com/payments/failed"
}
}'
const response = await fetch("https://api.sandbox.deuna.io/v2/merchants/orders/purchase", {
method: "POST",
headers: {
"X-Api-Key": "YOUR_PRIVATE_API_KEY",
"X-Store-Code": "STORE_CODE",
"Content-Type": "application/json"
},
body: JSON.stringify({
"payer_info": {
"email": "buyer@example.com"
},
"payment_source": {
"method_type": "credit_card",
"payment_method": "TOKENIZED_PAYMENT_METHOD"
},
"order_type": "DEUNA_CHECKOUT",
"order": {
"order_id": "retail-93418",
"store_code": "es-online",
"currency": "EUR",
"items_total_amount": 10900,
"sub_total": 11400,
"shipping_amount": 500,
"total_tax_amount": 2152,
"total_discount": 1000,
"total_amount": 13552,
"items": [
{
"id": "shoe-runner-42-blue",
"sku": "RUNNER-BLU-42",
"upc": "8437012345678",
"name": "Runner trainers",
"description": "Everyday lightweight trainers",
"quantity": 1,
"brand": "Northline",
"category": "footwear",
"sub_category": "trainers",
"color": "navy",
"size": "42",
"taxable": true,
"image_url": "https://merchant.example.com/products/runner-blue.jpg",
"details_url": "https://merchant.example.com/products/runner-blue",
"unit_price": {
"amount": 11900,
"currency": "EUR",
"currency_symbol": "€"
},
"total_amount": {
"amount": 10900,
"original_amount": 11900,
"currency": "EUR",
"currency_symbol": "€",
"total_discount": 1000
},
"tax_amount": {
"amount": 2052,
"currency": "EUR",
"currency_symbol": "€"
},
"weight": {
"weight": 850,
"unit": "g"
},
"discounts": [
{
"amount": 1000,
"ref_idx": 0
}
]
}
],
"discounts": [
{
"amount": 1000,
"code": "WELCOME10",
"reference": "campaign-2026-welcome",
"description": "Welcome discount",
"details_url": "https://merchant.example.com/promotions/welcome10",
"free_shipping": {
"is_free_shipping": false,
"maximum_cost_allowed": 0
},
"discount_category": "coupon",
"target_type": "items",
"type": "fixed_amount"
}
],
"shipping_address": {
"first_name": "Alex",
"last_name": "Morgan",
"email": "alex@example.com",
"phone": "+34600000000",
"address1": "Calle de Alcalá 125",
"address2": "3B",
"city": "Madrid",
"zipcode": "28009",
"state_name": "Madrid",
"state_code": "MD",
"country_code": "ES",
"address_type": "home",
"is_default": true
},
"shipping_method": {
"code": "standard-48h",
"name": "Standard delivery",
"min_delivery_date": "2026-10-05",
"max_delivery_date": "2026-10-06",
"cost": 500,
"display_cost": "€5.00",
"tax_amount": 100,
"display_tax_amount": "€1.00",
"scheduler": []
},
"shipping_options": {
"type": "delivery",
"method": "standard-48h",
"carrier": "Merchant Logistics",
"price": {
"amount": 500,
"currency": "EUR"
},
"requires_shipping": true,
"details": {
"store_id": "es-online",
"store_name": "Online store",
"address": "Calle de Alcalá 125, Madrid",
"address_coordinates": {
"lat": 40.4217,
"lng": -3.6772
},
"contact": {
"name": "Customer care",
"phone": "+34910000000"
},
"additional_details": {
"address_notes": "Leave with the concierge."
}
}
},
"channel_type": "desktop_web",
"metadata": {
"vertical": "retail",
"fulfillment_node": "warehouse-mad-02"
}
},
"callback_urls": {
"on_success": "https://merchant.example.com/payments/success",
"on_pending": "https://merchant.example.com/payments/pending",
"on_reject": "https://merchant.example.com/payments/rejected",
"on_canceled": "https://merchant.example.com/payments/canceled",
"on_failed": "https://merchant.example.com/payments/failed"
}
})
});
const order = await response.json();
import requests
response = requests.post(
"https://api.sandbox.deuna.io/v2/merchants/orders/purchase",
headers={"X-Api-Key": "YOUR_PRIVATE_API_KEY", "X-Store-Code": "STORE_CODE"},
json={
"payer_info": {
"email": "buyer@example.com"
},
"payment_source": {
"method_type": "credit_card",
"payment_method": "TOKENIZED_PAYMENT_METHOD"
},
"order_type": "DEUNA_CHECKOUT",
"order": {
"order_id": "retail-93418",
"store_code": "es-online",
"currency": "EUR",
"items_total_amount": 10900,
"sub_total": 11400,
"shipping_amount": 500,
"total_tax_amount": 2152,
"total_discount": 1000,
"total_amount": 13552,
"items": [
{
"id": "shoe-runner-42-blue",
"sku": "RUNNER-BLU-42",
"upc": "8437012345678",
"name": "Runner trainers",
"description": "Everyday lightweight trainers",
"quantity": 1,
"brand": "Northline",
"category": "footwear",
"sub_category": "trainers",
"color": "navy",
"size": "42",
"taxable": true,
"image_url": "https://merchant.example.com/products/runner-blue.jpg",
"details_url": "https://merchant.example.com/products/runner-blue",
"unit_price": {
"amount": 11900,
"currency": "EUR",
"currency_symbol": "€"
},
"total_amount": {
"amount": 10900,
"original_amount": 11900,
"currency": "EUR",
"currency_symbol": "€",
"total_discount": 1000
},
"tax_amount": {
"amount": 2052,
"currency": "EUR",
"currency_symbol": "€"
},
"weight": {
"weight": 850,
"unit": "g"
},
"discounts": [
{
"amount": 1000,
"ref_idx": 0
}
]
}
],
"discounts": [
{
"amount": 1000,
"code": "WELCOME10",
"reference": "campaign-2026-welcome",
"description": "Welcome discount",
"details_url": "https://merchant.example.com/promotions/welcome10",
"free_shipping": {
"is_free_shipping": false,
"maximum_cost_allowed": 0
},
"discount_category": "coupon",
"target_type": "items",
"type": "fixed_amount"
}
],
"shipping_address": {
"first_name": "Alex",
"last_name": "Morgan",
"email": "alex@example.com",
"phone": "+34600000000",
"address1": "Calle de Alcalá 125",
"address2": "3B",
"city": "Madrid",
"zipcode": "28009",
"state_name": "Madrid",
"state_code": "MD",
"country_code": "ES",
"address_type": "home",
"is_default": true
},
"shipping_method": {
"code": "standard-48h",
"name": "Standard delivery",
"min_delivery_date": "2026-10-05",
"max_delivery_date": "2026-10-06",
"cost": 500,
"display_cost": "€5.00",
"tax_amount": 100,
"display_tax_amount": "€1.00",
"scheduler": []
},
"shipping_options": {
"type": "delivery",
"method": "standard-48h",
"carrier": "Merchant Logistics",
"price": {
"amount": 500,
"currency": "EUR"
},
"requires_shipping": true,
"details": {
"store_id": "es-online",
"store_name": "Online store",
"address": "Calle de Alcalá 125, Madrid",
"address_coordinates": {
"lat": 40.4217,
"lng": -3.6772
},
"contact": {
"name": "Customer care",
"phone": "+34910000000"
},
"additional_details": {
"address_notes": "Leave with the concierge."
}
}
},
"channel_type": "desktop_web",
"metadata": {
"vertical": "retail",
"fulfillment_node": "warehouse-mad-02"
}
},
"callback_urls": {
"on_success": "https://merchant.example.com/payments/success",
"on_pending": "https://merchant.example.com/payments/pending",
"on_reject": "https://merchant.example.com/payments/rejected",
"on_canceled": "https://merchant.example.com/payments/canceled",
"on_failed": "https://merchant.example.com/payments/failed"
}
},
)
order = response.json()
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.deuna.io/v2/merchants/orders/purchase",
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"X-Api-Key: YOUR_PRIVATE_API_KEY",
"X-Store-Code: STORE_CODE",
"Content-Type: application/json"
],
CURLOPT_POSTFIELDS => json_encode([
"payer_info" => [
"email" => "buyer@example.com"
],
"payment_source" => [
"method_type" => "credit_card",
"payment_method" => "TOKENIZED_PAYMENT_METHOD"
],
"order_type" => "DEUNA_CHECKOUT",
"order" => [
"order_id" => "retail-93418",
"store_code" => "es-online",
"currency" => "EUR",
"items_total_amount" => 10900,
"sub_total" => 11400,
"shipping_amount" => 500,
"total_tax_amount" => 2152,
"total_discount" => 1000,
"total_amount" => 13552,
"items" => [
[
"id" => "shoe-runner-42-blue",
"sku" => "RUNNER-BLU-42",
"upc" => "8437012345678",
"name" => "Runner trainers",
"description" => "Everyday lightweight trainers",
"quantity" => 1,
"brand" => "Northline",
"category" => "footwear",
"sub_category" => "trainers",
"color" => "navy",
"size" => "42",
"taxable" => true,
"image_url" => "https://merchant.example.com/products/runner-blue.jpg",
"details_url" => "https://merchant.example.com/products/runner-blue",
"unit_price" => [
"amount" => 11900,
"currency" => "EUR",
"currency_symbol" => "€"
],
"total_amount" => [
"amount" => 10900,
"original_amount" => 11900,
"currency" => "EUR",
"currency_symbol" => "€",
"total_discount" => 1000
],
"tax_amount" => [
"amount" => 2052,
"currency" => "EUR",
"currency_symbol" => "€"
],
"weight" => [
"weight" => 850,
"unit" => "g"
],
"discounts" => [
[
"amount" => 1000,
"ref_idx" => 0
]
]
]
],
"discounts" => [
[
"amount" => 1000,
"code" => "WELCOME10",
"reference" => "campaign-2026-welcome",
"description" => "Welcome discount",
"details_url" => "https://merchant.example.com/promotions/welcome10",
"free_shipping" => [
"is_free_shipping" => false,
"maximum_cost_allowed" => 0
],
"discount_category" => "coupon",
"target_type" => "items",
"type" => "fixed_amount"
]
],
"shipping_address" => [
"first_name" => "Alex",
"last_name" => "Morgan",
"email" => "alex@example.com",
"phone" => "+34600000000",
"address1" => "Calle de Alcalá 125",
"address2" => "3B",
"city" => "Madrid",
"zipcode" => "28009",
"state_name" => "Madrid",
"state_code" => "MD",
"country_code" => "ES",
"address_type" => "home",
"is_default" => true
],
"shipping_method" => [
"code" => "standard-48h",
"name" => "Standard delivery",
"min_delivery_date" => "2026-10-05",
"max_delivery_date" => "2026-10-06",
"cost" => 500,
"display_cost" => "€5.00",
"tax_amount" => 100,
"display_tax_amount" => "€1.00",
"scheduler" => []
],
"shipping_options" => [
"type" => "delivery",
"method" => "standard-48h",
"carrier" => "Merchant Logistics",
"price" => [
"amount" => 500,
"currency" => "EUR"
],
"requires_shipping" => true,
"details" => [
"store_id" => "es-online",
"store_name" => "Online store",
"address" => "Calle de Alcalá 125, Madrid",
"address_coordinates" => [
"lat" => 40.4217,
"lng" => -3.6772
],
"contact" => [
"name" => "Customer care",
"phone" => "+34910000000"
],
"additional_details" => [
"address_notes" => "Leave with the concierge."
]
]
],
"channel_type" => "desktop_web",
"metadata" => [
"vertical" => "retail",
"fulfillment_node" => "warehouse-mad-02"
]
],
"callback_urls" => [
"on_success" => "https://merchant.example.com/payments/success",
"on_pending" => "https://merchant.example.com/payments/pending",
"on_reject" => "https://merchant.example.com/payments/rejected",
"on_canceled" => "https://merchant.example.com/payments/canceled",
"on_failed" => "https://merchant.example.com/payments/failed"
]
])
]);
$response = curl_exec($curl);
curl_close($curl);
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.sandbox.deuna.io/v2/merchants/orders/purchase"))
.header("X-Api-Key", "YOUR_PRIVATE_API_KEY")
.header("X-Store-Code", "STORE_CODE")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"payer_info\": {\n \"email\": \"buyer@example.com\"\n },\n \"payment_source\": {\n \"method_type\": \"credit_card\",\n \"payment_method\": \"TOKENIZED_PAYMENT_METHOD\"\n },\n \"order_type\": \"DEUNA_CHECKOUT\",\n \"order\": {\n \"order_id\": \"retail-93418\",\n \"store_code\": \"es-online\",\n \"currency\": \"EUR\",\n \"items_total_amount\": 10900,\n \"sub_total\": 11400,\n \"shipping_amount\": 500,\n \"total_tax_amount\": 2152,\n \"total_discount\": 1000,\n \"total_amount\": 13552,\n \"items\": [\n {\n \"id\": \"shoe-runner-42-blue\",\n \"sku\": \"RUNNER-BLU-42\",\n \"upc\": \"8437012345678\",\n \"name\": \"Runner trainers\",\n \"description\": \"Everyday lightweight trainers\",\n \"quantity\": 1,\n \"brand\": \"Northline\",\n \"category\": \"footwear\",\n \"sub_category\": \"trainers\",\n \"color\": \"navy\",\n \"size\": \"42\",\n \"taxable\": true,\n \"image_url\": \"https://merchant.example.com/products/runner-blue.jpg\",\n \"details_url\": \"https://merchant.example.com/products/runner-blue\",\n \"unit_price\": {\n \"amount\": 11900,\n \"currency\": \"EUR\",\n \"currency_symbol\": \"€\"\n },\n \"total_amount\": {\n \"amount\": 10900,\n \"original_amount\": 11900,\n \"currency\": \"EUR\",\n \"currency_symbol\": \"€\",\n \"total_discount\": 1000\n },\n \"tax_amount\": {\n \"amount\": 2052,\n \"currency\": \"EUR\",\n \"currency_symbol\": \"€\"\n },\n \"weight\": {\n \"weight\": 850,\n \"unit\": \"g\"\n },\n \"discounts\": [\n {\n \"amount\": 1000,\n \"ref_idx\": 0\n }\n ]\n }\n ],\n \"discounts\": [\n {\n \"amount\": 1000,\n \"code\": \"WELCOME10\",\n \"reference\": \"campaign-2026-welcome\",\n \"description\": \"Welcome discount\",\n \"details_url\": \"https://merchant.example.com/promotions/welcome10\",\n \"free_shipping\": {\n \"is_free_shipping\": false,\n \"maximum_cost_allowed\": 0\n },\n \"discount_category\": \"coupon\",\n \"target_type\": \"items\",\n \"type\": \"fixed_amount\"\n }\n ],\n \"shipping_address\": {\n \"first_name\": \"Alex\",\n \"last_name\": \"Morgan\",\n \"email\": \"alex@example.com\",\n \"phone\": \"+34600000000\",\n \"address1\": \"Calle de Alcalá 125\",\n \"address2\": \"3B\",\n \"city\": \"Madrid\",\n \"zipcode\": \"28009\",\n \"state_name\": \"Madrid\",\n \"state_code\": \"MD\",\n \"country_code\": \"ES\",\n \"address_type\": \"home\",\n \"is_default\": true\n },\n \"shipping_method\": {\n \"code\": \"standard-48h\",\n \"name\": \"Standard delivery\",\n \"min_delivery_date\": \"2026-10-05\",\n \"max_delivery_date\": \"2026-10-06\",\n \"cost\": 500,\n \"display_cost\": \"€5.00\",\n \"tax_amount\": 100,\n \"display_tax_amount\": \"€1.00\",\n \"scheduler\": []\n },\n \"shipping_options\": {\n \"type\": \"delivery\",\n \"method\": \"standard-48h\",\n \"carrier\": \"Merchant Logistics\",\n \"price\": {\n \"amount\": 500,\n \"currency\": \"EUR\"\n },\n \"requires_shipping\": true,\n \"details\": {\n \"store_id\": \"es-online\",\n \"store_name\": \"Online store\",\n \"address\": \"Calle de Alcalá 125, Madrid\",\n \"address_coordinates\": {\n \"lat\": 40.4217,\n \"lng\": -3.6772\n },\n \"contact\": {\n \"name\": \"Customer care\",\n \"phone\": \"+34910000000\"\n },\n \"additional_details\": {\n \"address_notes\": \"Leave with the concierge.\"\n }\n }\n },\n \"channel_type\": \"desktop_web\",\n \"metadata\": {\n \"vertical\": \"retail\",\n \"fulfillment_node\": \"warehouse-mad-02\"\n }\n },\n \"callback_urls\": {\n \"on_success\": \"https://merchant.example.com/payments/success\",\n \"on_pending\": \"https://merchant.example.com/payments/pending\",\n \"on_reject\": \"https://merchant.example.com/payments/rejected\",\n \"on_canceled\": \"https://merchant.example.com/payments/canceled\",\n \"on_failed\": \"https://merchant.example.com/payments/failed\"\n }\n }"))
.build();
HttpResponse<String> response = HttpClient.newHttpClient().send(
request, HttpResponse.BodyHandlers.ofString()
);
System.out.println(response.body());
}
}
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
request, err := http.NewRequest("POST", "https://api.sandbox.deuna.io/v2/merchants/orders/purchase", strings.NewReader("{\n \"payer_info\": {\n \"email\": \"buyer@example.com\"\n },\n \"payment_source\": {\n \"method_type\": \"credit_card\",\n \"payment_method\": \"TOKENIZED_PAYMENT_METHOD\"\n },\n \"order_type\": \"DEUNA_CHECKOUT\",\n \"order\": {\n \"order_id\": \"retail-93418\",\n \"store_code\": \"es-online\",\n \"currency\": \"EUR\",\n \"items_total_amount\": 10900,\n \"sub_total\": 11400,\n \"shipping_amount\": 500,\n \"total_tax_amount\": 2152,\n \"total_discount\": 1000,\n \"total_amount\": 13552,\n \"items\": [\n {\n \"id\": \"shoe-runner-42-blue\",\n \"sku\": \"RUNNER-BLU-42\",\n \"upc\": \"8437012345678\",\n \"name\": \"Runner trainers\",\n \"description\": \"Everyday lightweight trainers\",\n \"quantity\": 1,\n \"brand\": \"Northline\",\n \"category\": \"footwear\",\n \"sub_category\": \"trainers\",\n \"color\": \"navy\",\n \"size\": \"42\",\n \"taxable\": true,\n \"image_url\": \"https://merchant.example.com/products/runner-blue.jpg\",\n \"details_url\": \"https://merchant.example.com/products/runner-blue\",\n \"unit_price\": {\n \"amount\": 11900,\n \"currency\": \"EUR\",\n \"currency_symbol\": \"€\"\n },\n \"total_amount\": {\n \"amount\": 10900,\n \"original_amount\": 11900,\n \"currency\": \"EUR\",\n \"currency_symbol\": \"€\",\n \"total_discount\": 1000\n },\n \"tax_amount\": {\n \"amount\": 2052,\n \"currency\": \"EUR\",\n \"currency_symbol\": \"€\"\n },\n \"weight\": {\n \"weight\": 850,\n \"unit\": \"g\"\n },\n \"discounts\": [\n {\n \"amount\": 1000,\n \"ref_idx\": 0\n }\n ]\n }\n ],\n \"discounts\": [\n {\n \"amount\": 1000,\n \"code\": \"WELCOME10\",\n \"reference\": \"campaign-2026-welcome\",\n \"description\": \"Welcome discount\",\n \"details_url\": \"https://merchant.example.com/promotions/welcome10\",\n \"free_shipping\": {\n \"is_free_shipping\": false,\n \"maximum_cost_allowed\": 0\n },\n \"discount_category\": \"coupon\",\n \"target_type\": \"items\",\n \"type\": \"fixed_amount\"\n }\n ],\n \"shipping_address\": {\n \"first_name\": \"Alex\",\n \"last_name\": \"Morgan\",\n \"email\": \"alex@example.com\",\n \"phone\": \"+34600000000\",\n \"address1\": \"Calle de Alcalá 125\",\n \"address2\": \"3B\",\n \"city\": \"Madrid\",\n \"zipcode\": \"28009\",\n \"state_name\": \"Madrid\",\n \"state_code\": \"MD\",\n \"country_code\": \"ES\",\n \"address_type\": \"home\",\n \"is_default\": true\n },\n \"shipping_method\": {\n \"code\": \"standard-48h\",\n \"name\": \"Standard delivery\",\n \"min_delivery_date\": \"2026-10-05\",\n \"max_delivery_date\": \"2026-10-06\",\n \"cost\": 500,\n \"display_cost\": \"€5.00\",\n \"tax_amount\": 100,\n \"display_tax_amount\": \"€1.00\",\n \"scheduler\": []\n },\n \"shipping_options\": {\n \"type\": \"delivery\",\n \"method\": \"standard-48h\",\n \"carrier\": \"Merchant Logistics\",\n \"price\": {\n \"amount\": 500,\n \"currency\": \"EUR\"\n },\n \"requires_shipping\": true,\n \"details\": {\n \"store_id\": \"es-online\",\n \"store_name\": \"Online store\",\n \"address\": \"Calle de Alcalá 125, Madrid\",\n \"address_coordinates\": {\n \"lat\": 40.4217,\n \"lng\": -3.6772\n },\n \"contact\": {\n \"name\": \"Customer care\",\n \"phone\": \"+34910000000\"\n },\n \"additional_details\": {\n \"address_notes\": \"Leave with the concierge.\"\n }\n }\n },\n \"channel_type\": \"desktop_web\",\n \"metadata\": {\n \"vertical\": \"retail\",\n \"fulfillment_node\": \"warehouse-mad-02\"\n }\n },\n \"callback_urls\": {\n \"on_success\": \"https://merchant.example.com/payments/success\",\n \"on_pending\": \"https://merchant.example.com/payments/pending\",\n \"on_reject\": \"https://merchant.example.com/payments/rejected\",\n \"on_canceled\": \"https://merchant.example.com/payments/canceled\",\n \"on_failed\": \"https://merchant.example.com/payments/failed\"\n }\n }"))
if err != nil { panic(err) }
request.Header.Set("X-Api-Key", "YOUR_PRIVATE_API_KEY")
request.Header.Set("X-Store-Code", "STORE_CODE")
request.Header.Set("Content-Type", "application/json")
response, err := http.DefaultClient.Do(request)
if err != nil { panic(err) }
defer response.Body.Close()
body, _ := io.ReadAll(response.Body)
fmt.Println(string(body))
}