Chargement de l'aide...
Chargement...
Apprenez à créer des commandes avec l'API Luneo
const response = await fetch('https://api.luneo.app/v1/orders', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
designId: 'dsg_123',
productId: 'prod_456',
quantity: 1,
shipping: {
address: '123 Rue de la Paix',
city: 'Paris',
postalCode: '75001',
country: 'FR'
}
})
});
const order = await response.json();
logger.info('Commande créée:', order.id);L'API retourne un objet commande avec un PaymentIntent Stripe pour compléter le paiement.