Skip to main content
POST
/
api
/
v3
/
deposit
/
crypto-bridge
/
{kotani_reference_id}
/
refund-config
Regenerate expired refund config invoice
curl --request POST \
  --url https://sandbox-api.kotanipay.com/api/v3/api/v3/deposit/crypto-bridge/{kotani_reference_id}/refund-config \
  --header 'Authorization: Bearer <token>'
{
  "success": false,
  "message": "Invoice not yet expired or max regenerations reached",
  "data": {}
}
Regenerate the bolt11 Lightning refund invoice for a crypto bridge deposit whose current invoice has expired. The crypto provider requires a valid, unexpired invoice to execute a refund — call this endpoint when expires_at in the Get Refund Config response is in the past.

When to Use

A Lightning refund invoice is valid for 15 minutes from deposit creation. If the deposit is still pending and the invoice has expired, call this endpoint to issue a fresh one before the provider attempts to settle. Typical flow:
  1. Call Get Refund Config — check expires_at
  2. If expires_at is in the past, call this endpoint to regenerate
  3. The provider receives the updated invoice automatically via Kotani’s settlement pipeline

Limits & Rules

RuleDetail
ChainLightning (CHAIN: LIGHTNING) only — on-chain deposits use a static address and never expire
Maximum regenerations3 per transaction
Minimum interval30 seconds between consecutive regeneration requests
Terminal statesCannot regenerate once the transaction is COMPLETED or REFUNDED
Invoice must be expiredReturns 400 if the current invoice has not yet expired

Error Responses

StatusReason
400Non-Lightning transaction, maximum regenerations (3) reached, invoice not yet expired, or called too soon (< 30 s since last regeneration)
400Transaction is in a terminal state (COMPLETED or REFUNDED)
404Transaction not found for the given kotani_reference_id

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

kotani_reference_id
string
required

Kotani reference ID of the transaction

Example:

"KOTANI-BR-1732454321-ABC123"

Response

success
boolean
Example:

false

message
string
Example:

"Invoice not yet expired or max regenerations reached"

data
object
Example:
{}