Top up a wallet
curl --request POST \
--url https://core.nozle.app/api/v1/wallet_transactions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"wallet_transaction": {
"wallet_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"name": "Tokens for models 'high-fidelity-boost'",
"paid_credits": "20.0",
"granted_credits": "10.0",
"voided_credits": "5.0",
"invoice_requires_successful_payment": false,
"ignore_paid_top_up_limits": false,
"invoice_custom_section": {
"skip_invoice_custom_sections": false,
"invoice_custom_section_codes": [
"eu_bank_details"
]
},
"payment_method": {
"payment_method_type": "provider",
"payment_method_id": "1a901a90-1a90-1a90-1a90-1a901a901a90"
},
"metadata": [
{
"key": "example key",
"value": "example value"
},
{
"key": "another key",
"value": "another value"
}
]
}
}
EOFimport requests
url = "https://core.nozle.app/api/v1/wallet_transactions"
payload = { "wallet_transaction": {
"wallet_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"name": "Tokens for models 'high-fidelity-boost'",
"paid_credits": "20.0",
"granted_credits": "10.0",
"voided_credits": "5.0",
"invoice_requires_successful_payment": False,
"ignore_paid_top_up_limits": False,
"invoice_custom_section": {
"skip_invoice_custom_sections": False,
"invoice_custom_section_codes": ["eu_bank_details"]
},
"payment_method": {
"payment_method_type": "provider",
"payment_method_id": "1a901a90-1a90-1a90-1a90-1a901a901a90"
},
"metadata": [
{
"key": "example key",
"value": "example value"
},
{
"key": "another key",
"value": "another value"
}
]
} }
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({
wallet_transaction: {
wallet_id: '1a901a90-1a90-1a90-1a90-1a901a901a90',
name: 'Tokens for models \'high-fidelity-boost\'',
paid_credits: '20.0',
granted_credits: '10.0',
voided_credits: '5.0',
invoice_requires_successful_payment: false,
ignore_paid_top_up_limits: false,
invoice_custom_section: {
skip_invoice_custom_sections: false,
invoice_custom_section_codes: ['eu_bank_details']
},
payment_method: {
payment_method_type: 'provider',
payment_method_id: '1a901a90-1a90-1a90-1a90-1a901a901a90'
},
metadata: [
{key: 'example key', value: 'example value'},
{key: 'another key', value: 'another value'}
]
}
})
};
fetch('https://core.nozle.app/api/v1/wallet_transactions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://core.nozle.app/api/v1/wallet_transactions"
payload := strings.NewReader("{\n \"wallet_transaction\": {\n \"wallet_id\": \"1a901a90-1a90-1a90-1a90-1a901a901a90\",\n \"name\": \"Tokens for models 'high-fidelity-boost'\",\n \"paid_credits\": \"20.0\",\n \"granted_credits\": \"10.0\",\n \"voided_credits\": \"5.0\",\n \"invoice_requires_successful_payment\": false,\n \"ignore_paid_top_up_limits\": false,\n \"invoice_custom_section\": {\n \"skip_invoice_custom_sections\": false,\n \"invoice_custom_section_codes\": [\n \"eu_bank_details\"\n ]\n },\n \"payment_method\": {\n \"payment_method_type\": \"provider\",\n \"payment_method_id\": \"1a901a90-1a90-1a90-1a90-1a901a901a90\"\n },\n \"metadata\": [\n {\n \"key\": \"example key\",\n \"value\": \"example value\"\n },\n {\n \"key\": \"another key\",\n \"value\": \"another value\"\n }\n ]\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))
}require 'uri'
require 'net/http'
url = URI("https://core.nozle.app/api/v1/wallet_transactions")
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 \"wallet_transaction\": {\n \"wallet_id\": \"1a901a90-1a90-1a90-1a90-1a901a901a90\",\n \"name\": \"Tokens for models 'high-fidelity-boost'\",\n \"paid_credits\": \"20.0\",\n \"granted_credits\": \"10.0\",\n \"voided_credits\": \"5.0\",\n \"invoice_requires_successful_payment\": false,\n \"ignore_paid_top_up_limits\": false,\n \"invoice_custom_section\": {\n \"skip_invoice_custom_sections\": false,\n \"invoice_custom_section_codes\": [\n \"eu_bank_details\"\n ]\n },\n \"payment_method\": {\n \"payment_method_type\": \"provider\",\n \"payment_method_id\": \"1a901a90-1a90-1a90-1a90-1a901a901a90\"\n },\n \"metadata\": [\n {\n \"key\": \"example key\",\n \"value\": \"example value\"\n },\n {\n \"key\": \"another key\",\n \"value\": \"another value\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://core.nozle.app/api/v1/wallet_transactions",
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([
'wallet_transaction' => [
'wallet_id' => '1a901a90-1a90-1a90-1a90-1a901a901a90',
'name' => 'Tokens for models \'high-fidelity-boost\'',
'paid_credits' => '20.0',
'granted_credits' => '10.0',
'voided_credits' => '5.0',
'invoice_requires_successful_payment' => false,
'ignore_paid_top_up_limits' => false,
'invoice_custom_section' => [
'skip_invoice_custom_sections' => false,
'invoice_custom_section_codes' => [
'eu_bank_details'
]
],
'payment_method' => [
'payment_method_type' => 'provider',
'payment_method_id' => '1a901a90-1a90-1a90-1a90-1a901a901a90'
],
'metadata' => [
[
'key' => 'example key',
'value' => 'example value'
],
[
'key' => 'another key',
'value' => 'another value'
]
]
]
]),
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;
}HttpResponse<String> response = Unirest.post("https://core.nozle.app/api/v1/wallet_transactions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"wallet_transaction\": {\n \"wallet_id\": \"1a901a90-1a90-1a90-1a90-1a901a901a90\",\n \"name\": \"Tokens for models 'high-fidelity-boost'\",\n \"paid_credits\": \"20.0\",\n \"granted_credits\": \"10.0\",\n \"voided_credits\": \"5.0\",\n \"invoice_requires_successful_payment\": false,\n \"ignore_paid_top_up_limits\": false,\n \"invoice_custom_section\": {\n \"skip_invoice_custom_sections\": false,\n \"invoice_custom_section_codes\": [\n \"eu_bank_details\"\n ]\n },\n \"payment_method\": {\n \"payment_method_type\": \"provider\",\n \"payment_method_id\": \"1a901a90-1a90-1a90-1a90-1a901a901a90\"\n },\n \"metadata\": [\n {\n \"key\": \"example key\",\n \"value\": \"example value\"\n },\n {\n \"key\": \"another key\",\n \"value\": \"another value\"\n }\n ]\n }\n}")
.asString();{
"wallet_transactions": [
{
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"lago_wallet_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"lago_invoice_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"lago_credit_note_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"lago_voided_invoice_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"status": "settled",
"source": "manual",
"transaction_status": "purchased",
"transaction_type": "inbound",
"amount": "10.0",
"credit_amount": "100.0",
"invoice_requires_successful_payment": false,
"metadata": [
{
"key": "example key",
"value": "example value"
},
{
"key": "another key",
"value": "another value"
}
],
"remaining_amount_cents": 5000,
"remaining_credit_amount": "5.0",
"priority": 50,
"settled_at": "2022-04-29T08:59:51Z",
"failed_at": "2022-04-29T08:59:51Z",
"created_at": "2022-04-29T08:59:51Z",
"name": "Tokens for models 'high-fidelity-boost'",
"payment_method": {
"payment_method_type": "provider",
"payment_method_id": "1a901a90-1a90-1a90-1a90-1a901a901a90"
},
"applied_invoice_custom_sections": [
{
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"created_at": "2023-07-06T14:35:58Z",
"invoice_custom_section": {
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"name": "EU Bank Details",
"code": "eu_bank_details",
"description": "This section contains the bank details for EU customers.",
"details": "Bank Name: Nozle Bank, IBAN: FR7630004000031234567890143",
"display_name": "Bank Details:",
"applied_to_organization": true,
"organization_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"created_at": "2023-07-06T14:35:58Z"
},
"invoice_custom_section_id": "1a901a90-1a90-1a90-1a90-1a901a901a90"
}
]
}
]
}{
"status": 400,
"error": "Bad request"
}{
"status": 401,
"error": "Unauthorized"
}{
"status": 403,
"error": "Forbidden",
"code": "feature_unavailable"
}{
"status": 422,
"error": "Unprocessable entity",
"code": "validation_errors",
"error_details": {}
}Wallets
Top up a wallet
This endpoint is used to top-up an active wallet.
POST
/
wallet_transactions
Top up a wallet
curl --request POST \
--url https://core.nozle.app/api/v1/wallet_transactions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"wallet_transaction": {
"wallet_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"name": "Tokens for models 'high-fidelity-boost'",
"paid_credits": "20.0",
"granted_credits": "10.0",
"voided_credits": "5.0",
"invoice_requires_successful_payment": false,
"ignore_paid_top_up_limits": false,
"invoice_custom_section": {
"skip_invoice_custom_sections": false,
"invoice_custom_section_codes": [
"eu_bank_details"
]
},
"payment_method": {
"payment_method_type": "provider",
"payment_method_id": "1a901a90-1a90-1a90-1a90-1a901a901a90"
},
"metadata": [
{
"key": "example key",
"value": "example value"
},
{
"key": "another key",
"value": "another value"
}
]
}
}
EOFimport requests
url = "https://core.nozle.app/api/v1/wallet_transactions"
payload = { "wallet_transaction": {
"wallet_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"name": "Tokens for models 'high-fidelity-boost'",
"paid_credits": "20.0",
"granted_credits": "10.0",
"voided_credits": "5.0",
"invoice_requires_successful_payment": False,
"ignore_paid_top_up_limits": False,
"invoice_custom_section": {
"skip_invoice_custom_sections": False,
"invoice_custom_section_codes": ["eu_bank_details"]
},
"payment_method": {
"payment_method_type": "provider",
"payment_method_id": "1a901a90-1a90-1a90-1a90-1a901a901a90"
},
"metadata": [
{
"key": "example key",
"value": "example value"
},
{
"key": "another key",
"value": "another value"
}
]
} }
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({
wallet_transaction: {
wallet_id: '1a901a90-1a90-1a90-1a90-1a901a901a90',
name: 'Tokens for models \'high-fidelity-boost\'',
paid_credits: '20.0',
granted_credits: '10.0',
voided_credits: '5.0',
invoice_requires_successful_payment: false,
ignore_paid_top_up_limits: false,
invoice_custom_section: {
skip_invoice_custom_sections: false,
invoice_custom_section_codes: ['eu_bank_details']
},
payment_method: {
payment_method_type: 'provider',
payment_method_id: '1a901a90-1a90-1a90-1a90-1a901a901a90'
},
metadata: [
{key: 'example key', value: 'example value'},
{key: 'another key', value: 'another value'}
]
}
})
};
fetch('https://core.nozle.app/api/v1/wallet_transactions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://core.nozle.app/api/v1/wallet_transactions"
payload := strings.NewReader("{\n \"wallet_transaction\": {\n \"wallet_id\": \"1a901a90-1a90-1a90-1a90-1a901a901a90\",\n \"name\": \"Tokens for models 'high-fidelity-boost'\",\n \"paid_credits\": \"20.0\",\n \"granted_credits\": \"10.0\",\n \"voided_credits\": \"5.0\",\n \"invoice_requires_successful_payment\": false,\n \"ignore_paid_top_up_limits\": false,\n \"invoice_custom_section\": {\n \"skip_invoice_custom_sections\": false,\n \"invoice_custom_section_codes\": [\n \"eu_bank_details\"\n ]\n },\n \"payment_method\": {\n \"payment_method_type\": \"provider\",\n \"payment_method_id\": \"1a901a90-1a90-1a90-1a90-1a901a901a90\"\n },\n \"metadata\": [\n {\n \"key\": \"example key\",\n \"value\": \"example value\"\n },\n {\n \"key\": \"another key\",\n \"value\": \"another value\"\n }\n ]\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))
}require 'uri'
require 'net/http'
url = URI("https://core.nozle.app/api/v1/wallet_transactions")
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 \"wallet_transaction\": {\n \"wallet_id\": \"1a901a90-1a90-1a90-1a90-1a901a901a90\",\n \"name\": \"Tokens for models 'high-fidelity-boost'\",\n \"paid_credits\": \"20.0\",\n \"granted_credits\": \"10.0\",\n \"voided_credits\": \"5.0\",\n \"invoice_requires_successful_payment\": false,\n \"ignore_paid_top_up_limits\": false,\n \"invoice_custom_section\": {\n \"skip_invoice_custom_sections\": false,\n \"invoice_custom_section_codes\": [\n \"eu_bank_details\"\n ]\n },\n \"payment_method\": {\n \"payment_method_type\": \"provider\",\n \"payment_method_id\": \"1a901a90-1a90-1a90-1a90-1a901a901a90\"\n },\n \"metadata\": [\n {\n \"key\": \"example key\",\n \"value\": \"example value\"\n },\n {\n \"key\": \"another key\",\n \"value\": \"another value\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://core.nozle.app/api/v1/wallet_transactions",
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([
'wallet_transaction' => [
'wallet_id' => '1a901a90-1a90-1a90-1a90-1a901a901a90',
'name' => 'Tokens for models \'high-fidelity-boost\'',
'paid_credits' => '20.0',
'granted_credits' => '10.0',
'voided_credits' => '5.0',
'invoice_requires_successful_payment' => false,
'ignore_paid_top_up_limits' => false,
'invoice_custom_section' => [
'skip_invoice_custom_sections' => false,
'invoice_custom_section_codes' => [
'eu_bank_details'
]
],
'payment_method' => [
'payment_method_type' => 'provider',
'payment_method_id' => '1a901a90-1a90-1a90-1a90-1a901a901a90'
],
'metadata' => [
[
'key' => 'example key',
'value' => 'example value'
],
[
'key' => 'another key',
'value' => 'another value'
]
]
]
]),
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;
}HttpResponse<String> response = Unirest.post("https://core.nozle.app/api/v1/wallet_transactions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"wallet_transaction\": {\n \"wallet_id\": \"1a901a90-1a90-1a90-1a90-1a901a901a90\",\n \"name\": \"Tokens for models 'high-fidelity-boost'\",\n \"paid_credits\": \"20.0\",\n \"granted_credits\": \"10.0\",\n \"voided_credits\": \"5.0\",\n \"invoice_requires_successful_payment\": false,\n \"ignore_paid_top_up_limits\": false,\n \"invoice_custom_section\": {\n \"skip_invoice_custom_sections\": false,\n \"invoice_custom_section_codes\": [\n \"eu_bank_details\"\n ]\n },\n \"payment_method\": {\n \"payment_method_type\": \"provider\",\n \"payment_method_id\": \"1a901a90-1a90-1a90-1a90-1a901a901a90\"\n },\n \"metadata\": [\n {\n \"key\": \"example key\",\n \"value\": \"example value\"\n },\n {\n \"key\": \"another key\",\n \"value\": \"another value\"\n }\n ]\n }\n}")
.asString();{
"wallet_transactions": [
{
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"lago_wallet_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"lago_invoice_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"lago_credit_note_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"lago_voided_invoice_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"status": "settled",
"source": "manual",
"transaction_status": "purchased",
"transaction_type": "inbound",
"amount": "10.0",
"credit_amount": "100.0",
"invoice_requires_successful_payment": false,
"metadata": [
{
"key": "example key",
"value": "example value"
},
{
"key": "another key",
"value": "another value"
}
],
"remaining_amount_cents": 5000,
"remaining_credit_amount": "5.0",
"priority": 50,
"settled_at": "2022-04-29T08:59:51Z",
"failed_at": "2022-04-29T08:59:51Z",
"created_at": "2022-04-29T08:59:51Z",
"name": "Tokens for models 'high-fidelity-boost'",
"payment_method": {
"payment_method_type": "provider",
"payment_method_id": "1a901a90-1a90-1a90-1a90-1a901a901a90"
},
"applied_invoice_custom_sections": [
{
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"created_at": "2023-07-06T14:35:58Z",
"invoice_custom_section": {
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"name": "EU Bank Details",
"code": "eu_bank_details",
"description": "This section contains the bank details for EU customers.",
"details": "Bank Name: Nozle Bank, IBAN: FR7630004000031234567890143",
"display_name": "Bank Details:",
"applied_to_organization": true,
"organization_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"created_at": "2023-07-06T14:35:58Z"
},
"invoice_custom_section_id": "1a901a90-1a90-1a90-1a90-1a901a901a90"
}
]
}
]
}{
"status": 400,
"error": "Bad request"
}{
"status": 401,
"error": "Unauthorized"
}{
"status": 403,
"error": "Forbidden",
"code": "feature_unavailable"
}{
"status": 422,
"error": "Unprocessable entity",
"code": "validation_errors",
"error_details": {}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Wallet transaction payload
Show child attributes
Show child attributes
Response
Wallet transaction created
Show child attributes
Show child attributes