{ "openapi": "3.0.3", "info": { "title": "LuminPay API", "version": "1.0.0", "description": "Accept stablecoin and Bitcoin payments and settle in naira. Use a lmp_test_ key with the Sandbox server and a lmp_live_ key with the Live server." }, "servers": [ { "url": "https://sandbox-api.luminpay.co", "description": "Sandbox (testnet)" }, { "url": "https://api.luminpay.co", "description": "Live" } ], "security": [ { "apiKey": [] } ], "tags": [ { "name": "Charges" }, { "name": "Webhooks" }, { "name": "Payment links" }, { "name": "Invoices" }, { "name": "Payouts" }, { "name": "Refunds" } ], "paths": { "/charges": { "post": { "tags": [ "Charges" ], "summary": "Create a charge", "operationId": "createCharge", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateChargeRequest" } } } }, "responses": { "200": { "description": "The charge. Addresses are added a few seconds later.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Charge" } } } }, "400": { "$ref": "#/components/responses/E400" }, "401": { "$ref": "#/components/responses/E401" }, "403": { "$ref": "#/components/responses/E403" }, "404": { "$ref": "#/components/responses/E404" }, "409": { "$ref": "#/components/responses/E409" }, "422": { "$ref": "#/components/responses/IdempotencyMismatch" } }, "parameters": [ { "$ref": "#/components/parameters/IdempotencyKey" } ] }, "get": { "tags": [ "Charges" ], "summary": "List charges", "operationId": "listCharges", "parameters": [ { "name": "limit", "in": "query", "schema": { "type": "integer", "maximum": 100, "default": 50 } }, { "name": "cursor", "in": "query", "schema": { "type": "string" } }, { "name": "outletId", "in": "query", "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Newest first", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChargeList" } } } }, "400": { "$ref": "#/components/responses/E400" }, "401": { "$ref": "#/components/responses/E401" }, "403": { "$ref": "#/components/responses/E403" }, "404": { "$ref": "#/components/responses/E404" } } } }, "/charges/{id}": { "get": { "tags": [ "Charges" ], "summary": "Get a charge", "operationId": "getCharge", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "" } ], "responses": { "200": { "description": "The charge", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Charge" } } } }, "400": { "$ref": "#/components/responses/E400" }, "401": { "$ref": "#/components/responses/E401" }, "403": { "$ref": "#/components/responses/E403" }, "404": { "$ref": "#/components/responses/E404" } } } }, "/webhooks-platform/endpoints": { "post": { "tags": [ "Webhooks" ], "summary": "Add a webhook endpoint", "operationId": "createWebhookEndpoint", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateWebhookEndpointRequest" } } } }, "responses": { "201": { "description": "The endpoint, with its signing secret", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookEndpoint" } } } }, "400": { "$ref": "#/components/responses/E400" }, "401": { "$ref": "#/components/responses/E401" }, "403": { "$ref": "#/components/responses/E403" }, "404": { "$ref": "#/components/responses/E404" } } }, "get": { "tags": [ "Webhooks" ], "summary": "List webhook endpoints", "operationId": "listWebhookEndpoints", "responses": { "200": { "description": "Endpoints", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/WebhookEndpoint" } } } } }, "400": { "$ref": "#/components/responses/E400" }, "401": { "$ref": "#/components/responses/E401" }, "403": { "$ref": "#/components/responses/E403" }, "404": { "$ref": "#/components/responses/E404" } } } }, "/webhooks-platform/endpoints/{id}/status": { "patch": { "tags": [ "Webhooks" ], "summary": "Turn an endpoint on or off", "operationId": "setWebhookEndpointStatus", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SetWebhookStatusRequest" } } } }, "responses": { "200": { "description": "The endpoint", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookEndpoint" } } } }, "400": { "$ref": "#/components/responses/E400" }, "401": { "$ref": "#/components/responses/E401" }, "403": { "$ref": "#/components/responses/E403" }, "404": { "$ref": "#/components/responses/E404" } } } }, "/webhooks-platform/endpoints/{id}/test": { "post": { "tags": [ "Webhooks" ], "summary": "Send a test event", "operationId": "sendWebhookTest", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "" } ], "responses": { "201": { "description": "The delivery, with your endpoint's response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookDelivery" } } } }, "400": { "$ref": "#/components/responses/E400" }, "401": { "$ref": "#/components/responses/E401" }, "403": { "$ref": "#/components/responses/E403" }, "404": { "$ref": "#/components/responses/E404" } } } }, "/webhooks-platform/events": { "get": { "tags": [ "Webhooks" ], "summary": "List webhook deliveries", "operationId": "listWebhookDeliveries", "parameters": [ { "name": "limit", "in": "query", "schema": { "type": "integer", "maximum": 100, "default": 50 } } ], "responses": { "200": { "description": "Newest first", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/WebhookDelivery" } } } } }, "400": { "$ref": "#/components/responses/E400" }, "401": { "$ref": "#/components/responses/E401" }, "403": { "$ref": "#/components/responses/E403" }, "404": { "$ref": "#/components/responses/E404" } } } }, "/payment-links": { "post": { "tags": [ "Payment links" ], "summary": "Create a payment link", "operationId": "createPaymentLink", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreatePaymentLinkRequest" } } } }, "responses": { "201": { "description": "The payment link", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaymentLink" } } } }, "400": { "$ref": "#/components/responses/E400" }, "401": { "$ref": "#/components/responses/E401" }, "403": { "$ref": "#/components/responses/E403" }, "404": { "$ref": "#/components/responses/E404" }, "409": { "$ref": "#/components/responses/IdempotencyConflict" }, "422": { "$ref": "#/components/responses/IdempotencyMismatch" } }, "parameters": [ { "$ref": "#/components/parameters/IdempotencyKey" } ] }, "get": { "tags": [ "Payment links" ], "summary": "List payment links", "operationId": "listPaymentLinks", "responses": { "200": { "description": "Payment links", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PaymentLink" } } } } }, "400": { "$ref": "#/components/responses/E400" }, "401": { "$ref": "#/components/responses/E401" }, "403": { "$ref": "#/components/responses/E403" }, "404": { "$ref": "#/components/responses/E404" } } } }, "/payment-links/{id}": { "get": { "tags": [ "Payment links" ], "summary": "Get a payment link", "operationId": "getPaymentLink", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "" } ], "responses": { "200": { "description": "The payment link", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaymentLink" } } } }, "400": { "$ref": "#/components/responses/E400" }, "401": { "$ref": "#/components/responses/E401" }, "403": { "$ref": "#/components/responses/E403" }, "404": { "$ref": "#/components/responses/E404" } } } }, "/payment-links/{id}/charges": { "get": { "tags": [ "Payment links" ], "summary": "List charges made through a payment link", "operationId": "listPaymentLinkCharges", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "" } ], "responses": { "200": { "description": "Charges", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object" } } } } }, "400": { "$ref": "#/components/responses/E400" }, "401": { "$ref": "#/components/responses/E401" }, "403": { "$ref": "#/components/responses/E403" }, "404": { "$ref": "#/components/responses/E404" } } } }, "/payment-links/{id}/status": { "patch": { "tags": [ "Payment links" ], "summary": "Turn a payment link on or off", "operationId": "setPaymentLinkStatus", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SetPaymentLinkStatusRequest" } } } }, "responses": { "200": { "description": "The payment link", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaymentLink" } } } }, "400": { "$ref": "#/components/responses/E400" }, "401": { "$ref": "#/components/responses/E401" }, "403": { "$ref": "#/components/responses/E403" }, "404": { "$ref": "#/components/responses/E404" } } } }, "/invoices": { "post": { "tags": [ "Invoices" ], "summary": "Create an invoice", "operationId": "createInvoice", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateInvoiceRequest" } } } }, "responses": { "201": { "description": "The invoice", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Invoice" } } } }, "400": { "$ref": "#/components/responses/E400" }, "401": { "$ref": "#/components/responses/E401" }, "403": { "$ref": "#/components/responses/E403" }, "404": { "$ref": "#/components/responses/E404" }, "409": { "$ref": "#/components/responses/IdempotencyConflict" }, "422": { "$ref": "#/components/responses/IdempotencyMismatch" } }, "parameters": [ { "$ref": "#/components/parameters/IdempotencyKey" } ] }, "get": { "tags": [ "Invoices" ], "summary": "List invoices", "operationId": "listInvoices", "responses": { "200": { "description": "Invoices", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Invoice" } } } } }, "400": { "$ref": "#/components/responses/E400" }, "401": { "$ref": "#/components/responses/E401" }, "403": { "$ref": "#/components/responses/E403" }, "404": { "$ref": "#/components/responses/E404" } } } }, "/invoices/{id}": { "get": { "tags": [ "Invoices" ], "summary": "Get an invoice", "operationId": "getInvoice", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "" } ], "responses": { "200": { "description": "The invoice", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Invoice" } } } }, "400": { "$ref": "#/components/responses/E400" }, "401": { "$ref": "#/components/responses/E401" }, "403": { "$ref": "#/components/responses/E403" }, "404": { "$ref": "#/components/responses/E404" } } } }, "/invoices/{id}/void": { "patch": { "tags": [ "Invoices" ], "summary": "Void an invoice", "operationId": "voidInvoice", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "" } ], "responses": { "200": { "description": "The invoice", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Invoice" } } } }, "400": { "$ref": "#/components/responses/E400" }, "401": { "$ref": "#/components/responses/E401" }, "403": { "$ref": "#/components/responses/E403" }, "404": { "$ref": "#/components/responses/E404" } } } }, "/payouts": { "get": { "tags": [ "Payouts" ], "summary": "List payouts", "parameters": [ { "name": "limit", "in": "query", "schema": { "type": "integer", "maximum": 100, "default": 20 } } ], "responses": { "200": { "description": "Your payouts, newest first.", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Payout" } } } } }, "400": { "description": "Invalid request." }, "401": { "description": "Missing, invalid, expired or restricted API key or session." } }, "security": [ { "apiKey": [] } ] }, "post": { "tags": [ "Payouts" ], "summary": "Request an instant payout", "description": "Sends naira from your balance to your verified bank account. Omit `amountNgn` to pay out everything available. Only one payout can be in progress at a time. Large or unusual payouts can need a second approval or the owner's selfie (`403 SELFIE_REQUIRED`); an instant payout carries a fee (see `GET /payouts/rules`). Payouts go only to a bank account in your own verified name. **Dashboard only:** this needs an owner or admin signed in to the dashboard with their LuminPay PIN, and the PIN sent as `pin`. An API key is refused with `403`, so a leaked key cannot move money.", "parameters": [ { "$ref": "#/components/parameters/IdempotencyKey" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "amountNgn": { "type": "integer", "minimum": 1, "description": "Whole naira. Omit to pay out the whole available balance." }, "pin": { "type": "string", "pattern": "^[0-9]{6}$", "description": "The owner's 6-digit LuminPay PIN. Asked again for every payout." } }, "required": [ "pin" ] } } } }, "responses": { "201": { "description": "The payout, now pending or awaiting approval.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Payout" } } } }, "400": { "description": "Invalid request." }, "401": { "description": "Missing, invalid, expired or restricted API key or session." }, "403": { "description": "A payout is already in progress, the balance or limits do not allow it, or the owner's selfie is needed (`SELFIE_REQUIRED`)." }, "409": { "$ref": "#/components/responses/IdempotencyConflict" }, "422": { "$ref": "#/components/responses/IdempotencyMismatch" } }, "security": [ { "apiKey": [] } ] } }, "/payouts/rules": { "get": { "tags": [ "Payouts" ], "summary": "Get payout terms", "description": "When automatic payouts go out and what an instant payout costs.", "responses": { "200": { "description": "The current rules.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PayoutRules" } } } }, "400": { "description": "Invalid request." }, "401": { "description": "Missing, invalid, expired or restricted API key or session." } }, "security": [ { "apiKey": [] } ] } }, "/payouts/schedule": { "get": { "tags": [ "Payouts" ], "summary": "Get the payout schedule", "responses": { "200": { "description": "The schedule: `manual`, `daily` or `weekly`, and the day for weekly." }, "400": { "description": "Invalid request." }, "401": { "description": "Missing, invalid, expired or restricted API key or session." } }, "security": [ { "apiKey": [] } ] }, "post": { "tags": [ "Payouts" ], "summary": "Update the payout schedule", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "schedule", "pin" ], "properties": { "schedule": { "type": "string", "enum": [ "manual", "daily", "weekly" ] }, "dayOfWeek": { "type": "integer", "minimum": 0, "maximum": 6 }, "pin": { "type": "string", "pattern": "^[0-9]{6}$", "description": "The owner's 6-digit LuminPay PIN." } } } } } }, "responses": { "200": { "description": "The saved schedule." }, "400": { "description": "Invalid request." }, "401": { "description": "Missing, invalid, expired or restricted API key or session." }, "403": { "description": "An API key was used, the signed-in person is not an owner or admin, or the session has not completed both sign-in steps (`STRONGER_SIGN_IN_REQUIRED`)." } }, "security": [ { "apiKey": [] } ], "description": "Choose when automatic payouts go out. **Dashboard only:** this needs an owner or admin signed in to the dashboard with their LuminPay PIN, and the PIN sent as `pin`. An API key is refused with `403`, so a leaked key cannot redirect your payouts." } }, "/charges/{chargeId}/refunds": { "parameters": [ { "name": "chargeId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "get": { "tags": [ "Refunds" ], "summary": "List refunds for a charge", "description": "Needs a signed-in dashboard session.", "responses": { "200": { "description": "The refunds for this charge.", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Refund" } } } } }, "400": { "description": "Invalid request." }, "401": { "description": "Missing, invalid, expired or restricted API key or session." } } }, "post": { "tags": [ "Refunds" ], "summary": "Refund a payment", "description": "A refund is a new payment back to the wallet that paid, in the same coin. LuminPay's fee is not refunded and LuminPay pays the network fee. The customer never receives more coins than they paid: if the rate moved 1% or less, or in the customer's favour, they get exactly the coins they paid; if the naira got more than 1% weaker, they get the naira price in coins at today's rate (fewer coins). You are debited the naira you were credited either way.\n\nRequires an owner, admin or manager signed in to the dashboard, and their PIN. Above your approval limit a second owner or admin must approve it; a business can also hold refunds before sending. Check the result in `merchantApprovalStatus`, `scheduledFor` and `status`. Get a quote first with `GET .../quote`.", "parameters": [ { "$ref": "#/components/parameters/IdempotencyKey" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "amount", "pin" ], "properties": { "amount": { "type": "string", "description": "Coins to refund, in the coin's smallest unit, as a string." }, "pin": { "type": "string", "description": "The signed-in person's 6-digit PIN." }, "expectedSendAmount": { "type": "string", "description": "The `sendAmount` from the quote you showed. If the rate moved and it would change, the request is refused with 409 `REFUND_QUOTE_CHANGED` and the new amount." } } } } } }, "responses": { "201": { "description": "The refund. It may be pending approval or on hold, not yet sent.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Refund" } } } }, "400": { "description": "Invalid amount, more than is left to refund, wrong PIN, or the wallet cannot receive refunds." }, "403": { "description": "Your role cannot refund." }, "409": { "description": "The rate moved since the quote (`REFUND_QUOTE_CHANGED`), or the Idempotency-Key is still in use." }, "422": { "$ref": "#/components/responses/IdempotencyMismatch" }, "503": { "description": "The exchange rate is unavailable, so the refund cannot be priced. Try again in a few minutes." } } } }, "/charges/{chargeId}/refunds/quote": { "parameters": [ { "name": "chargeId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "get": { "tags": [ "Refunds" ], "summary": "Price a refund before confirming it", "description": "Shows how many coins will be sent and why. Valid for 5 minutes. Needs a signed-in dashboard session.", "parameters": [ { "name": "amount", "in": "query", "required": true, "schema": { "type": "string" }, "description": "Coins, in the coin's smallest unit." } ], "responses": { "200": { "description": "The quote.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RefundQuote" } } } }, "400": { "description": "Invalid request." }, "401": { "description": "Missing, invalid, expired or restricted API key or session." } } } }, "/charges/{chargeId}/refunds/{refundId}/approve": { "parameters": [ { "name": "chargeId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "refundId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "post": { "tags": [ "Refunds" ], "summary": "Approve a refund", "description": "A second owner or admin approves a large refund with their own PIN. The person who asked cannot approve it. Needs a signed-in dashboard session.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "pin": { "type": "string" } } } } } }, "responses": { "200": { "description": "Done." }, "400": { "description": "The refund is not waiting, or it can no longer be stopped." }, "403": { "description": "A different owner or admin must do this." }, "401": { "description": "Missing, invalid, expired or restricted API key or session." } } } }, "/charges/{chargeId}/refunds/{refundId}/reject": { "parameters": [ { "name": "chargeId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "refundId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "post": { "tags": [ "Refunds" ], "summary": "Reject a refund", "description": "Reject a large refund that is waiting for approval, with your own PIN. Needs a signed-in dashboard session.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "pin": { "type": "string" }, "reason": { "type": "string" } } } } } }, "responses": { "200": { "description": "Done." }, "400": { "description": "The refund is not waiting, or it can no longer be stopped." }, "403": { "description": "A different owner or admin must do this." }, "401": { "description": "Missing, invalid, expired or restricted API key or session." } } } }, "/charges/{chargeId}/refunds/{refundId}/cancel": { "parameters": [ { "name": "chargeId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "refundId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "post": { "tags": [ "Refunds" ], "summary": "Cancel a refund", "description": "Cancel a refund that is on hold or waiting for approval. Nothing was sent. Needs a signed-in dashboard session.", "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object", "properties": { "reason": { "type": "string" } } } } } }, "responses": { "200": { "description": "Done." }, "400": { "description": "The refund is not waiting, or it can no longer be stopped." }, "403": { "description": "A different owner or admin must do this." }, "401": { "description": "Missing, invalid, expired or restricted API key or session." } } } }, "/refund-settings": { "get": { "tags": [ "Refunds" ], "summary": "Get refund settings", "description": "Needs a signed-in dashboard session.", "responses": { "200": { "description": "The settings.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RefundSettings" } } } }, "400": { "description": "Invalid request." }, "401": { "description": "Missing, invalid, expired or restricted API key or session." } } }, "post": { "tags": [ "Refunds" ], "summary": "Change refund settings", "description": "The approval limit and the hold before sending. Owner or admin, with their PIN.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "pin" ], "properties": { "approvalLimitKobo": { "type": "string" }, "holdMinutes": { "type": "integer", "enum": [ 0, 15, 60, 240, 1440 ] }, "pin": { "type": "string" } } } } } }, "responses": { "200": { "description": "The saved settings.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RefundSettings" } } } }, "400": { "description": "Invalid request." }, "401": { "description": "Missing, invalid, expired or restricted API key or session." } } } } }, "components": { "securitySchemes": { "apiKey": { "type": "http", "scheme": "bearer", "bearerFormat": "lmp_test_... or lmp_live_...", "description": "Your secret API key from Developers → API keys. A key can be limited in the dashboard: read only (GET requests only), allowed IP addresses, and an expiry date. A request outside a limit is refused with 401 or 403 and a message saying which limit." } }, "schemas": { "CreateChargeRequest": { "type": "object", "required": [ "asset" ], "properties": { "asset": { "type": "string", "description": "Coin to quote in. See Networks.", "example": "USDT_BSC_MAINNET", "enum": [ "USDT_BSC_MAINNET", "USDT_TRON_MAINNET", "USDT_SOLANA_MAINNET", "USDC_ETH_MAINNET", "USDC_SOLANA_MAINNET", "BTC_MAINNET", "USDC_ETH_TEST5_AN74", "USDT_BSC_TEST", "USDC_SOLANA_DEVNET", "BTC_TEST" ] }, "amountNgn": { "type": "string", "pattern": "^[1-9]\\d{0,11}$", "description": "Whole naira, digits only. Send this or amount.", "example": "25000" }, "amount": { "type": "string", "pattern": "^[1-9]\\d{0,17}$", "description": "Coin amount in its smallest unit. Send this or amountNgn." }, "reference": { "type": "string", "description": "Your id for this payment. Reusing it returns the same charge.", "example": "acme_order_1001" } } }, "PaymentAddress": { "type": "object", "properties": { "asset": { "type": "string" }, "chain": { "type": "string", "example": "bsc_mainnet" }, "address": { "type": "string" }, "amount": { "type": "string", "description": "Smallest unit" }, "scale": { "type": "integer", "description": "Decimals", "example": 18 } } }, "Charge": { "type": "object", "properties": { "chargeId": { "type": "string", "format": "uuid" }, "reference": { "type": "string" }, "status": { "type": "string", "enum": [ "pending", "processing", "paid", "underpaid", "expired", "failed", "cancelled" ] }, "asset": { "type": "string" }, "amount": { "type": "string", "description": "What the customer pays, smallest unit, fee included" }, "feeAmount": { "type": "string", "description": "LuminPay fee inside amount" }, "amountNgn": { "type": "string", "nullable": true, "description": "Naira amount in kobo" }, "rate": { "type": "string", "nullable": true, "description": "Naira per US dollar" }, "address": { "type": "string", "nullable": true }, "addresses": { "type": "array", "items": { "$ref": "#/components/schemas/PaymentAddress" } }, "txHash": { "type": "string", "nullable": true }, "expiresAt": { "type": "string", "format": "date-time" } } }, "ChargeList": { "type": "object", "properties": { "transactions": { "type": "array", "items": { "type": "object" } }, "nextCursor": { "type": "string", "nullable": true } } }, "CreateWebhookEndpointRequest": { "type": "object", "required": [ "url" ], "properties": { "url": { "type": "string", "format": "uri", "example": "https://example.com/webhooks/luminpay" } } }, "WebhookEndpoint": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "url": { "type": "string" }, "signingSecret": { "type": "string", "example": "whsec_..." }, "status": { "type": "string", "enum": [ "active", "disabled" ] }, "createdAt": { "type": "string", "format": "date-time" } } }, "SetWebhookStatusRequest": { "type": "object", "required": [ "status" ], "properties": { "status": { "type": "string", "enum": [ "active", "disabled" ] } } }, "WebhookDelivery": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "eventType": { "type": "string" }, "status": { "type": "string", "enum": [ "pending", "delivered", "failed" ] }, "attempts": { "type": "integer" }, "responseStatus": { "type": "integer", "nullable": true }, "responseBody": { "type": "string", "nullable": true }, "nextRetryAt": { "type": "string", "format": "date-time", "nullable": true }, "deliveredAt": { "type": "string", "format": "date-time", "nullable": true }, "payload": { "type": "object" } } }, "CreatePaymentLinkRequest": { "type": "object", "required": [ "title", "amountType" ], "properties": { "title": { "type": "string" }, "description": { "type": "string" }, "amountType": { "type": "string", "enum": [ "fixed", "flexible" ] }, "fixedAmountNgn": { "type": "string", "pattern": "^[1-9]\\d{0,11}$", "description": "Whole naira, e.g. \"5000\" for ₦5,000. Required when amountType is fixed." }, "successRedirectUrl": { "type": "string", "format": "uri", "description": "Where to send the customer after paying. https on Live." } } }, "SetPaymentLinkStatusRequest": { "type": "object", "required": [ "status" ], "properties": { "status": { "type": "string", "enum": [ "active", "inactive" ] } } }, "PaymentLink": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "slug": { "type": "string" }, "url": { "type": "string", "format": "uri", "description": "Share this with customers" }, "title": { "type": "string" }, "description": { "type": "string", "nullable": true }, "amountType": { "type": "string", "enum": [ "fixed", "flexible" ] }, "fixedAmountNgn": { "type": "string", "nullable": true, "description": "Kobo" }, "successRedirectUrl": { "type": "string", "nullable": true }, "status": { "type": "string", "enum": [ "active", "inactive" ] }, "paymentCount": { "type": "integer" }, "createdAt": { "type": "string", "format": "date-time" } } }, "Invoice": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "reference": { "type": "string", "example": "INV-1A2B3C4D" }, "url": { "type": "string", "format": "uri", "description": "Share this with the customer" }, "customerName": { "type": "string" }, "customerEmail": { "type": "string", "nullable": true }, "description": { "type": "string", "nullable": true }, "amountNgn": { "type": "string", "description": "Kobo" }, "dueDate": { "type": "string", "format": "date-time", "nullable": true }, "status": { "type": "string", "enum": [ "sent", "paid", "void" ] }, "chargeId": { "type": "string", "format": "uuid", "nullable": true }, "createdAt": { "type": "string", "format": "date-time" }, "paidAt": { "type": "string", "format": "date-time", "nullable": true } } }, "CreateInvoiceRequest": { "type": "object", "required": [ "customerName", "amountNgn" ], "properties": { "customerName": { "type": "string" }, "customerEmail": { "type": "string", "format": "email" }, "description": { "type": "string" }, "amountNgn": { "type": "string", "pattern": "^[1-9]\\d{0,11}$", "description": "Whole naira, e.g. \"25000\" for ₦25,000" }, "dueDate": { "type": "string", "format": "date" } } }, "Error": { "type": "object", "properties": { "statusCode": { "type": "integer" }, "message": { "oneOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" } } ] }, "error": { "type": "string" }, "code": { "type": "string" } } }, "Payout": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "reference": { "type": "string", "description": "LuminPay's unique reference for the payout." }, "status": { "type": "string", "enum": [ "awaiting_approval", "pending", "processing", "completed", "failed", "reversed" ] }, "destAmountNgn": { "type": "string", "description": "Naira sent to your bank account, for example \"49,500.00\"." }, "feeNgn": { "type": "string", "description": "Fee charged for the payout (an instant payout has a fee; the automatic payout is free)." }, "payoutType": { "type": "string", "nullable": true }, "createdAt": { "type": "string", "format": "date-time" }, "completedAt": { "type": "string", "format": "date-time", "nullable": true } } }, "PayoutRules": { "type": "object", "description": "Payout terms. Amounts are in naira.", "properties": { "dailyMinimumNgn": { "type": "number", "example": 5000, "description": "Balance needed for the automatic daily payout." }, "smallBalanceDay": { "type": "integer", "example": 5, "description": "Day of the week (0 = Sunday) when smaller balances are also paid out." }, "smallBalanceMinimumNgn": { "type": "number", "example": 100 }, "instantFeePercent": { "type": "number", "example": 1 }, "instantFeeMinNgn": { "type": "number", "example": 100 }, "instantFeeMaxNgn": { "type": "number", "example": 1000 }, "instantMinimumNgn": { "type": "number", "example": 1000, "description": "Smallest instant payout." }, "secondApprovalAboveNgn": { "type": "number", "example": 0, "description": "Payouts above this need a second approval. 0 means off." } } }, "Refund": { "type": "object", "properties": { "refundId": { "type": "string", "format": "uuid" }, "chargeId": { "type": "string", "format": "uuid" }, "amount": { "type": "string", "description": "Coins the sale is reduced by, in the coin's smallest unit." }, "sendAmount": { "type": "string", "description": "Coins actually sent. Never more than amount. Less when the naira got more than 1% weaker since the sale." }, "asset": { "type": "string" }, "destinationAddress": { "type": "string", "description": "The wallet that paid. Refunds cannot go anywhere else." }, "status": { "type": "string", "enum": [ "pending", "processing", "completed", "failed" ] }, "merchantApprovalStatus": { "type": "string", "nullable": true, "enum": [ "not_required", "pending", "approved", "rejected", "cancelled" ], "description": "`pending` means a second owner or admin must approve it." }, "scheduledFor": { "type": "string", "format": "date-time", "nullable": true, "description": "When a hold ends and the refund is sent." }, "rateBasis": { "type": "string", "nullable": true, "enum": [ "original", "current", "capped" ] }, "moveBps": { "type": "integer", "nullable": true, "description": "How far the market rate moved against the customer since the sale, in basis points." }, "merchantDebitKobo": { "type": "string", "nullable": true, "description": "Naira taken from your balance, in kobo." }, "failureReason": { "type": "string", "nullable": true }, "txHash": { "type": "string", "nullable": true }, "createdAt": { "type": "string", "format": "date-time" }, "completedAt": { "type": "string", "format": "date-time", "nullable": true } } }, "RefundQuote": { "type": "object", "properties": { "ruleApplied": { "type": "boolean" }, "amount": { "type": "string" }, "sendAmount": { "type": "string" }, "coinsWithheld": { "type": "string" }, "basis": { "type": "string", "enum": [ "original", "current", "capped" ] }, "moveBps": { "type": "integer" }, "rateSale": { "type": "number" }, "rateNow": { "type": "number" }, "rateEstimated": { "type": "boolean" }, "merchantDebitKobo": { "type": "string" }, "expiresAt": { "type": "string", "format": "date-time", "description": "The quote is valid for 5 minutes." }, "asset": { "type": "string" }, "scale": { "type": "integer" } } }, "RefundSettings": { "type": "object", "properties": { "approvalLimitKobo": { "type": "string", "description": "Refunds above this need a second owner or admin. Default 25000000 (₦250,000)." }, "holdMinutes": { "type": "integer", "enum": [ 0, 15, 60, 240, 1440 ], "description": "Hold before sending. 0 means send at once." } } } }, "responses": { "E400": { "description": "Invalid request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "E401": { "description": "Missing, invalid or wrong-environment key", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "E403": { "description": "Not allowed: verification, daily limit, or key management with an API key", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "E404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "E409": { "description": "Reference already used by another account", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "IdempotencyConflict": { "description": "A request with this Idempotency-Key is still being processed. Wait a moment and retry.", "content": { "application/json": { "schema": { "type": "object", "properties": { "statusCode": { "type": "integer", "example": 409 }, "message": { "type": "string" }, "error": { "type": "string", "example": "Conflict" } } } } } }, "IdempotencyMismatch": { "description": "This Idempotency-Key was already used for a different request. Use a new key for a different request.", "content": { "application/json": { "schema": { "type": "object", "properties": { "statusCode": { "type": "integer", "example": 422 }, "message": { "type": "string" }, "error": { "type": "string", "example": "Unprocessable Entity" } } } } } } }, "parameters": { "IdempotencyKey": { "name": "Idempotency-Key", "in": "header", "required": false, "description": "A unique value for this request, 8 to 64 characters (letters, numbers, dots, dashes, underscores, colons). Send the same value when retrying: the first answer is returned with the header `Idempotent-Replayed: true` and nothing is created twice. Kept for 24 hours. The same key with a different request returns 422; the same key while the first request is still running returns 409.", "schema": { "type": "string", "minLength": 8, "maxLength": 64, "pattern": "^[A-Za-z0-9._:-]{8,64}$" }, "example": "order_1001_attempt_1" } } } }