-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
I am getting "Internal Server Error" when trying to create an order.
To reproduce it you can use this script
import { ApiClient } from "@utrustdev/utrust-ts-library";
async function test() {
console.log(process.env.UTRUST_API_KEY);
const { createOrder } = ApiClient(process.env.UTRUST_API_KEY, "sandbox");
const order = {
reference: "1234",
amount: { total: "60.00", currency: "EUR" },
return_urls: {
callback_url: "https://www.example.com/callback",
return_url: "https://www.example.com/thank-you",
},
line_items: [
{
sku: "basic",
name: "subscription",
price: "60.00",
currency: "EUR",
quantity: 1,
},
],
};
const customer = {
email: "[email protected]",
country: "IT",
};
try {
const { data } = await createOrder(order, customer);
console.log(data);
} catch (error) {
console.log(error);
}
}
test();Any hint?
Metadata
Metadata
Assignees
Labels
No labels