Create invoice
curl --request POST \
--url https://api.meum.io/v1/invoices \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"external_order_id": "order_demo_1048",
"amount": "100.00",
"currency": "USD",
"return_url": "https://shop.example.com/thank-you",
"metadata": {
"line_items": 2
}
}
'import requests
url = "https://api.meum.io/v1/invoices"
payload = {
"external_order_id": "order_demo_1048",
"amount": "100.00",
"currency": "USD",
"return_url": "https://shop.example.com/thank-you",
"metadata": { "line_items": 2 }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
external_order_id: 'order_demo_1048',
amount: '100.00',
currency: 'USD',
return_url: 'https://shop.example.com/thank-you',
metadata: {line_items: 2}
})
};
fetch('https://api.meum.io/v1/invoices', 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.meum.io/v1/invoices",
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([
'external_order_id' => 'order_demo_1048',
'amount' => '100.00',
'currency' => 'USD',
'return_url' => 'https://shop.example.com/thank-you',
'metadata' => [
'line_items' => 2
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.meum.io/v1/invoices"
payload := strings.NewReader("{\n \"external_order_id\": \"order_demo_1048\",\n \"amount\": \"100.00\",\n \"currency\": \"USD\",\n \"return_url\": \"https://shop.example.com/thank-you\",\n \"metadata\": {\n \"line_items\": 2\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.meum.io/v1/invoices")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"external_order_id\": \"order_demo_1048\",\n \"amount\": \"100.00\",\n \"currency\": \"USD\",\n \"return_url\": \"https://shop.example.com/thank-you\",\n \"metadata\": {\n \"line_items\": 2\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meum.io/v1/invoices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"external_order_id\": \"order_demo_1048\",\n \"amount\": \"100.00\",\n \"currency\": \"USD\",\n \"return_url\": \"https://shop.example.com/thank-you\",\n \"metadata\": {\n \"line_items\": 2\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"status": "pending",
"checkout_url": "https://pay.meum.io/550e8400-e29b-41d4-a716-446655440000",
"payment_url": "<string>",
"amount": "100.00",
"currency": "USD",
"output_asset": "USDC",
"expires_at": "2023-11-07T05:31:56Z"
}{
"error": "Payout wallet not configured",
"code": "EXTERNAL_ORDER_INTEGRATION_CONFLICT",
"details": {}
}{
"error": "Payout wallet not configured",
"code": "EXTERNAL_ORDER_INTEGRATION_CONFLICT",
"details": {}
}{
"error": "Payout wallet not configured",
"code": "EXTERNAL_ORDER_INTEGRATION_CONFLICT",
"details": {}
}{
"error": "Payout wallet not configured",
"code": "EXTERNAL_ORDER_INTEGRATION_CONFLICT",
"details": {}
}Invoices
Create invoice
Creates a new checkout invoice for the authenticated store. Returns a legacy error shape on some validation failures for backward compatibility.
POST
/
v1
/
invoices
Create invoice
curl --request POST \
--url https://api.meum.io/v1/invoices \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"external_order_id": "order_demo_1048",
"amount": "100.00",
"currency": "USD",
"return_url": "https://shop.example.com/thank-you",
"metadata": {
"line_items": 2
}
}
'import requests
url = "https://api.meum.io/v1/invoices"
payload = {
"external_order_id": "order_demo_1048",
"amount": "100.00",
"currency": "USD",
"return_url": "https://shop.example.com/thank-you",
"metadata": { "line_items": 2 }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
external_order_id: 'order_demo_1048',
amount: '100.00',
currency: 'USD',
return_url: 'https://shop.example.com/thank-you',
metadata: {line_items: 2}
})
};
fetch('https://api.meum.io/v1/invoices', 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.meum.io/v1/invoices",
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([
'external_order_id' => 'order_demo_1048',
'amount' => '100.00',
'currency' => 'USD',
'return_url' => 'https://shop.example.com/thank-you',
'metadata' => [
'line_items' => 2
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.meum.io/v1/invoices"
payload := strings.NewReader("{\n \"external_order_id\": \"order_demo_1048\",\n \"amount\": \"100.00\",\n \"currency\": \"USD\",\n \"return_url\": \"https://shop.example.com/thank-you\",\n \"metadata\": {\n \"line_items\": 2\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.meum.io/v1/invoices")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"external_order_id\": \"order_demo_1048\",\n \"amount\": \"100.00\",\n \"currency\": \"USD\",\n \"return_url\": \"https://shop.example.com/thank-you\",\n \"metadata\": {\n \"line_items\": 2\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meum.io/v1/invoices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"external_order_id\": \"order_demo_1048\",\n \"amount\": \"100.00\",\n \"currency\": \"USD\",\n \"return_url\": \"https://shop.example.com/thank-you\",\n \"metadata\": {\n \"line_items\": 2\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"status": "pending",
"checkout_url": "https://pay.meum.io/550e8400-e29b-41d4-a716-446655440000",
"payment_url": "<string>",
"amount": "100.00",
"currency": "USD",
"output_asset": "USDC",
"expires_at": "2023-11-07T05:31:56Z"
}{
"error": "Payout wallet not configured",
"code": "EXTERNAL_ORDER_INTEGRATION_CONFLICT",
"details": {}
}{
"error": "Payout wallet not configured",
"code": "EXTERNAL_ORDER_INTEGRATION_CONFLICT",
"details": {}
}{
"error": "Payout wallet not configured",
"code": "EXTERNAL_ORDER_INTEGRATION_CONFLICT",
"details": {}
}{
"error": "Payout wallet not configured",
"code": "EXTERNAL_ORDER_INTEGRATION_CONFLICT",
"details": {}
}Authorizations
Body
application/json
Response
Invoice created
Where the invoice is in the payment flow:
pending: created, not yet ready for paymentquoted: price quote ready; customer can proceed to payawaiting_payment: waiting for the customer to send fundspaid: payment received and confirmedunderpaid: customer paid less than the requested amountexpired: not paid before the deadlinefailed: payment or processing failedrefunded: payment was returned to the customercancelled: invoice was cancelled before completion
Available options:
pending, quoted, awaiting_payment, paid, underpaid, expired, failed, refunded, cancelled