{
  "openapi" : "3.0.1",
  "info" : {
    "title" : "TBC API documentation",
    "description" : "All API responses are returned in a response container \nthat either returns the requested \ndata or a json encoded error in case of such. Error responses are return with an appropriate HTTP \nerror status code (eg.: 401) which is also part of the json resonse. The response container looks \nlike the following:\n\n```\n{\n  \"statusCode\": 200,\n  \"result\": {\n    \"data\": \"the resonse data\"\n  },\n  \"error\": {\n    \"statusCode\": 401,\n    \"message\": \"Unauthorized - invalid or missing credentials\"\n  }\n}\n```",
    "termsOfService" : "",
    "version" : "1.0"
  },
  "servers" : [ {
    "url" : "https://api.thebitcoincompany.com"
  }, {
    "url" : "https://api.dev.thebitcoincompany.com"
  } ],
  "security" : [ {
    "apiToken" : [ ],
    "apiKey" : [ ],
    "apiSecret" : [ ]
  } ],
  "paths" : {
    "/organization/credentials" : {
      "post" : {
        "tags" : [ "organization" ],
        "summary" : "Create new api credentials for an organization",
        "description" : "Generates new api credentials for an organization (api key and secret). The response will return the new credentials as plain text after creating them.",
        "operationId" : "createApiCredentialsRoute",
        "requestBody" : {
          "description" : "The credential name and organization id and to create the credentials for.",
          "content" : {
            "*/*" : {
              "schema" : {
                "$ref" : "#/components/schemas/ApiCredentialsCreateRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The new api credentials for the organization",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ApiCredentialsCreateResult"
                }
              }
            }
          },
          "400" : {
            "description" : "Bad request - invalid parameter"
          },
          "401" : {
            "description" : "Unauthorized - invalid or missing credentials"
          }
        }
      }
    },
    "/organization/credentials/{organizationId}/{apiKey}" : {
      "delete" : {
        "tags" : [ "organization" ],
        "summary" : "Deletes api credentials of an organization",
        "description" : "Deletes api credentials of an organization (api key and secret). This operation can not be undone.",
        "operationId" : "deleteApiCredentialsRoute",
        "parameters" : [ {
          "name" : "organizationId",
          "in" : "path",
          "description" : "The unique id of the organization",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "apiKey",
          "in" : "path",
          "description" : "The api key of the organization",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "Api credentials deleted"
          },
          "400" : {
            "description" : "Bad request - invalid parameter"
          },
          "401" : {
            "description" : "Unauthorized - invalid or missing credentials"
          }
        }
      }
    },
    "/organization/user/{organizationId}/{userId}" : {
      "delete" : {
        "tags" : [ "organization" ],
        "summary" : "Removes an organization user",
        "description" : "Removes an organization user. Removing the last user will prevent customers from managing their account.",
        "operationId" : "deleteOrganizationUserRoute",
        "parameters" : [ {
          "name" : "organizationId",
          "in" : "path",
          "description" : "The unique id of the organization",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "userId",
          "in" : "path",
          "description" : "The unique id of the user",
          "required" : true,
          "schema" : {
            "type" : "integer",
            "format" : "int64"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "Organization user created or updated"
          },
          "401" : {
            "description" : "Unauthorized - invalid or missing credentials"
          }
        }
      }
    },
    "/organization/{organizationId}" : {
      "get" : {
        "tags" : [ "organization" ],
        "summary" : "Get organization details by id",
        "description" : "Returns the organization details for given id.",
        "operationId" : "getOrganizationRoute",
        "parameters" : [ {
          "name" : "organizationId",
          "in" : "path",
          "description" : "The unique id of the organization",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "The details of an organization.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OrganizationDetails"
                }
              }
            }
          },
          "404" : {
            "description" : "Not found - organization not found"
          },
          "401" : {
            "description" : "Unauthorized - invalid or missing credentials"
          }
        }
      }
    },
    "/organization/spread-account/{organizationId}" : {
      "post" : {
        "tags" : [ "organization" ],
        "summary" : "Set or update organization remittance spread account.",
        "description" : "Set or update the organization's remittance spread account. A spread account will collect an additional spread on the balance of the configured user account.",
        "operationId" : "upsertOrganizationSpreadAccountRoute",
        "parameters" : [ {
          "name" : "organizationId",
          "in" : "path",
          "description" : "The unique id of the organization for which to set the spread account",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "description" : "The user id and rate to set",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/OrganizationSpreadAccountRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "Organization remittance spread account set"
          },
          "400" : {
            "description" : "Bad request - invalid parameter"
          },
          "401" : {
            "description" : "Unauthorized - invalid or missing credentials"
          }
        }
      }
    },
    "/organization/user/{organizationId}" : {
      "post" : {
        "tags" : [ "organization" ],
        "summary" : "Creates or updates an organization user",
        "description" : "Creates or updates an organization user. If the user already exists, the permissions will be updated.",
        "operationId" : "upsertOrganizationUserRoute",
        "parameters" : [ {
          "name" : "organizationId",
          "in" : "path",
          "description" : "The unique id of the organization",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "description" : "The organization user to create or update. The user id must already exist.",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/OrganizationUserRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "Organization user created or updated"
          },
          "400" : {
            "description" : "Bad request - invalid parameter"
          },
          "401" : {
            "description" : "Unauthorized - invalid or missing credentials"
          }
        }
      }
    },
    "/giftcards/purchase/anon/bitcoin" : {
      "post" : {
        "tags" : [ "Purchase" ],
        "summary" : "Create an invoice for an anonymous user",
        "description" : "Creates a bitcoin payment invoice for either LN or OnChain payment of an anonymous user. For this purchase method it is very important to provide a valid email address as it will be the product delivery method.",
        "operationId" : "anonPurchaseRoutes",
        "parameters" : [ {
          "name" : "referralCode",
          "in" : "query",
          "description" : "An optional referral code that generates revenue for the referrer. The code must be a valid referral code if provided.",
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "description" : "The data required to create an invoice for a purchase. For anon purchases, you must provide an email address as well as a from and to message.",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/CreateInvoiceRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "Invoice created",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/BitcoinOrder"
                }
              }
            }
          },
          "400" : {
            "description" : "Invalid request - missing or invalid parameters"
          }
        }
      }
    },
    "/users/topup/bitcoin" : {
      "post" : {
        "tags" : [ "Purchase" ],
        "summary" : "Create a bitcoin invoice for topping up a users USD balance",
        "description" : "Create a bitcoin invoice for topping up a users USD balance.",
        "operationId" : "balanceTopUpRoute",
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/CreateUsdBalanceTopUpOrder"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "Invoice created",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/BitcoinOrder"
                }
              }
            }
          },
          "400" : {
            "description" : "Invalid request - missing or invalid parameters"
          },
          "401" : {
            "description" : "Unauthorized - invalid or missing credentials"
          }
        }
      }
    },
    "/giftcards/purchase/balance" : {
      "post" : {
        "tags" : [ "Purchase" ],
        "summary" : "Purchase a gift card with user balance",
        "description" : "Purchase a gift card with user balance.",
        "operationId" : "giftCardPurchaseBalanceRoute",
        "requestBody" : {
          "description" : "The data required for the purchase.",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/CreateInvoiceRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "Product purchased with balance",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/PurchasedProduct"
                  }
                }
              }
            }
          },
          "400" : {
            "description" : "Invalid request - missing or invalid parameters"
          },
          "401" : {
            "description" : "Unauthorized - invalid or missing credentials"
          }
        }
      }
    },
    "/giftcards/purchase/bitcoin" : {
      "post" : {
        "tags" : [ "Purchase" ],
        "summary" : "Create a bitcoin invoice for purchasing a gift card",
        "description" : "Create a bitcoin invoice for purchasing a gift card.",
        "operationId" : "giftCardPurchaseBitcoinRoute",
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/CreateInvoiceRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "Invoice created",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/BitcoinOrder"
                }
              }
            }
          },
          "400" : {
            "description" : "Invalid request - missing or invalid parameters"
          },
          "401" : {
            "description" : "Unauthorized - invalid or missing credentials"
          }
        }
      }
    },
    "/users/redeem-bitcoin-giftcard/lnurl" : {
      "get" : {
        "tags" : [ "Redeem code" ],
        "summary" : "Returns the info needed to create an LNURL withdrawRequest",
        "description" : "Returns the info needed to create an LNURL withdrawRequest",
        "operationId" : "initLnUrlWithdrawal",
        "parameters" : [ {
          "name" : "code",
          "in" : "query",
          "description" : "The TBC USD balance gift card code to be redeemed",
          "required" : true,
          "schema" : {
            "type" : "string"
          },
          "example" : "ASDF1234"
        } ],
        "responses" : {
          "200" : {
            "description" : "The LNURL withdrawRequest data",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/LnUrlWithdrawalData"
                }
              }
            }
          }
        }
      }
    },
    "/redeem-code" : {
      "get" : {
        "tags" : [ "Redeem code" ],
        "summary" : "Redeem a gift code",
        "description" : "Redeems a given gift card to current account",
        "operationId" : "redeemCodeRoute",
        "parameters" : [ {
          "name" : "code",
          "in" : "query",
          "description" : "The gift card code to be redeemed",
          "required" : true,
          "schema" : {
            "type" : "string"
          },
          "example" : "ASDF1234"
        }, {
          "name" : "scanned",
          "in" : "query",
          "description" : "Whether the code was scanned or not (might be required by some codes)",
          "schema" : {
            "type" : "string"
          },
          "example" : false
        } ],
        "responses" : {
          "200" : {
            "description" : "The redeem activity entry",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/MiscActivity"
                }
              }
            }
          },
          "400" : {
            "description" : "Bad request - invalid parameter"
          },
          "401" : {
            "description" : "Unauthorized - invalid or missing credentials"
          }
        }
      }
    },
    "/users/redeem-bitcoin-giftcard" : {
      "get" : {
        "tags" : [ "Redeem code" ],
        "summary" : "Returns the info needed to create a bitcoin gift card redeem",
        "description" : "Returns the info needed to create a bitcoin gift card redeem",
        "operationId" : "userRedeemBitcoinGiftCardInfoRoute",
        "parameters" : [ {
          "name" : "code",
          "in" : "query",
          "description" : "The TBC USD balance gift card code to be redeemed",
          "required" : true,
          "schema" : {
            "type" : "string"
          },
          "example" : "ASDF1234"
        } ],
        "responses" : {
          "200" : {
            "description" : "The redeem info for a bitcoin gift card",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RedeemWithdrawInfo"
                }
              }
            }
          },
          "400" : {
            "description" : "Bad request - invalid parameter"
          }
        }
      },
      "post" : {
        "tags" : [ "Redeem code" ],
        "summary" : "Redeem a bitcoin gift card code",
        "description" : "Redeems a bitcoin gift card and adds it to current balance",
        "operationId" : "userRedeemBitcoinGiftCardRoute",
        "requestBody" : {
          "description" : "The bitcoin gift card redeem options",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/BitcoinRedeemRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The redeem activity entry",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/BitcoinRedeemResponse"
                }
              }
            }
          },
          "400" : {
            "description" : "Bad request - invalid parameter"
          }
        }
      }
    },
    "/users/redeem-gift-card" : {
      "get" : {
        "tags" : [ "Redeem code" ],
        "summary" : "Redeem a TBC balance gift card code",
        "description" : "Redeems a TBC balance gift card and adds it to current USD balance",
        "operationId" : "userRedeemGiftCardRoute",
        "parameters" : [ {
          "name" : "code",
          "in" : "query",
          "description" : "The TBC USD balance gift card code to be redeemed",
          "required" : true,
          "schema" : {
            "type" : "string"
          },
          "example" : "ASDF1234"
        } ],
        "responses" : {
          "200" : {
            "description" : "The redeem activity entry",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/MiscActivity"
                }
              }
            }
          },
          "400" : {
            "description" : "Bad request - invalid parameter"
          },
          "401" : {
            "description" : "Unauthorized - invalid or missing credentials"
          }
        }
      }
    },
    "/remittance/invoice" : {
      "post" : {
        "tags" : [ "remittance" ],
        "summary" : "Create a remittance invoice for a given payout option with its requirements",
        "description" : "Creates a remittance lightning invoice for sending a remittance transaction to a recipient.",
        "operationId" : "createLud22InvoiceRoute",
        "requestBody" : {
          "description" : "The remittance invoice request with all required fields and a unique id",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/LUD22PayoutRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "Invoice and details of the newly created remittance transaction",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/LUD22PayoutResponse"
                }
              }
            }
          },
          "400" : {
            "description" : "Bad request - invalid parameter"
          },
          "401" : {
            "description" : "Unauthorized - invalid or missing credentials"
          },
          "409" : {
            "description" : "Conflict - invoice id already exists"
          }
        }
      }
    },
    "/remittance/invoice/{invoiceId}" : {
      "get" : {
        "tags" : [ "remittance" ],
        "summary" : "Get invoice",
        "description" : "Returns an existing invoice by id",
        "operationId" : "getInvoiceRoute",
        "parameters" : [ {
          "name" : "invoiceId",
          "in" : "path",
          "description" : "Invoice id",
          "required" : true,
          "schema" : {
            "type" : "string"
          },
          "example" : "5f9b5f9b-5f9b-5f9b-5f9b-5f9b5f9b5f9b"
        } ],
        "responses" : {
          "200" : {
            "description" : "Invoice",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/InvoiceResponse"
                }
              }
            }
          },
          "404" : {
            "description" : "Not found - invoice not found"
          },
          "401" : {
            "description" : "Unauthorized - invalid or missing credentials"
          }
        }
      }
    },
    "/remittance/preview" : {
      "post" : {
        "tags" : [ "remittance" ],
        "summary" : "Get a remittance rates preview with exchange rates, payout/in amounts and fee",
        "description" : "Returns a preview for the remittance pricing under current rate and fee conditions",
        "operationId" : "getPreviewRoute",
        "requestBody" : {
          "description" : "Some remittance params required for calculating a preview",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/RemittanceOfferRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "Rates for the given remittance params",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RemittanceOffer"
                }
              }
            }
          },
          "400" : {
            "description" : "Bad request - invalid parameter"
          },
          "401" : {
            "description" : "Unauthorized - invalid or missing credentials"
          }
        }
      }
    },
    "/remittance/rate/{pair}" : {
      "get" : {
        "tags" : [ "remittance" ],
        "summary" : "Get the current rate for a given trading pair",
        "description" : "Returns the current rate for a given supported trading pair",
        "operationId" : "getRateRoute",
        "parameters" : [ {
          "name" : "pair",
          "in" : "path",
          "description" : "Pair to get the rate for",
          "required" : true,
          "schema" : {
            "type" : "string"
          },
          "example" : "USDMXN"
        } ],
        "responses" : {
          "200" : {
            "description" : "Rate for the given trading pair",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RemittanceTicker"
                }
              }
            }
          },
          "400" : {
            "description" : "Bad request - invalid parameter"
          },
          "401" : {
            "description" : "Unauthorized - invalid or missing credentials"
          }
        }
      }
    },
    "/remittance/refund" : {
      "post" : {
        "tags" : [ "remittance" ],
        "summary" : "Initiates a refund for a failed remittance transaction",
        "description" : "Initiates a refund for a failed remittance transaction. Refund will be payed to LN invoice if valid.",
        "operationId" : "refundLud22InvoiceRoute",
        "requestBody" : {
          "description" : "The remittance refund request containing a valid Bolt11 invoice",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/LUD22RefundRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "Refund transaction has been initiated"
          },
          "400" : {
            "description" : "Bad request - invalid parameter"
          },
          "401" : {
            "description" : "Unauthorized - invalid or missing credentials"
          }
        }
      }
    },
    "/remittance/report" : {
      "get" : {
        "tags" : [ "remittance" ],
        "summary" : "Get the historic remittances data for given filters.",
        "description" : "Returns the remittance data for given filters either in Json or as CSV table. To select the response format use the Accept header with either application/json or text/csv.",
        "operationId" : "remittanceReportRoute",
        "parameters" : [ {
          "name" : "from",
          "in" : "query",
          "description" : "The oldest unix timestamp to include in the result",
          "schema" : {
            "type" : "integer",
            "format" : "int64"
          }
        }, {
          "name" : "to",
          "in" : "query",
          "description" : "The newest unix timestamp to include in the result",
          "schema" : {
            "type" : "integer",
            "format" : "int64"
          }
        }, {
          "name" : "lastDays",
          "in" : "query",
          "description" : "The number of recent days to include in the result (alternative to 'from' and 'to')",
          "schema" : {
            "type" : "integer",
            "format" : "int32"
          }
        }, {
          "name" : "currency",
          "in" : "query",
          "description" : "The recipient currency of the payment (e.g. 'MXN')",
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "failed",
          "in" : "query",
          "description" : "Whether to only include failed payments",
          "schema" : {
            "type" : "boolean"
          }
        }, {
          "name" : "paid",
          "in" : "query",
          "description" : "Whether to only include paid payments",
          "schema" : {
            "type" : "boolean"
          }
        }, {
          "name" : "refunded",
          "in" : "query",
          "description" : "Whether to only include refunded payments",
          "schema" : {
            "type" : "boolean"
          }
        }, {
          "name" : "succeeded",
          "in" : "query",
          "description" : "Shortcut to only return fully successful payments",
          "schema" : {
            "type" : "boolean"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "Remittance report",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/RemittanceReportRow"
                  }
                }
              },
              "text/csv" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/RemittanceReportRow"
                  }
                }
              }
            }
          },
          "401" : {
            "description" : "Unauthorized - invalid or missing credentials"
          }
        }
      }
    },
    "/remittance/invoice/{invoiceId}/settle" : {
      "post" : {
        "tags" : [ "remittance" ],
        "summary" : "Settles a test LN invoice",
        "description" : "Settles a test LN invoice. This endpoint is only available in the sandbox environment.",
        "operationId" : "settleLud22InvoiceRoute",
        "parameters" : [ {
          "name" : "invoiceId",
          "in" : "path",
          "description" : "Invoice id",
          "required" : true,
          "schema" : {
            "type" : "string"
          },
          "example" : "5f9b5f9b-5f9b-5f9b-5f9b-5f9b5f9b5f9b"
        } ],
        "responses" : {
          "200" : {
            "description" : "Remittance payment has been initiated"
          },
          "404" : {
            "description" : "Not found - invoice not found"
          },
          "401" : {
            "description" : "Unauthorized - invalid or missing credentials"
          }
        }
      }
    },
    "/remittance/webhook/subscribe" : {
      "post" : {
        "tags" : [ "remittance" ],
        "summary" : "Subscribe to remittance change webhook notifications with a default callback url",
        "description" : "Updates and or sets the url to which remittance change notifications will be sent if no callback url is provided when creating a remittance invoice. Webhook messages will be retried with an exponential backoff strategy 12 times (up to 72 hours) until the receiving endpoint responds with a 200 OK.",
        "operationId" : "subscribeWebhookRoute",
        "requestBody" : {
          "description" : "The webhook url to which notifications will be sent",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/WebhookSubscribeRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The actual payload schema that will be sent to the webhook endpoint",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/LUD22WebhookPayload"
                }
              }
            }
          },
          "401" : {
            "description" : "Unauthorized - invalid or missing credentials"
          }
        }
      }
    },
    "/remittance/currencies" : {
      "get" : {
        "tags" : [ "remittance" ],
        "summary" : "Get supported remittance currencies",
        "description" : "Returns the list of supported remittance currencies.",
        "operationId" : "supportedLud22CurrenciesRoute",
        "responses" : {
          "200" : {
            "description" : "Supported remittance currencies",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/LUD22CurrenciesResponse"
                }
              }
            }
          },
          "400" : {
            "description" : "Bad request - invalid parameter"
          },
          "401" : {
            "description" : "Unauthorized - invalid or missing credentials"
          }
        }
      }
    },
    "/remittance/options" : {
      "get" : {
        "tags" : [ "remittance" ],
        "summary" : "Get supported remittance options for provided currency",
        "description" : "Returns the list of supported remittance payout options for the given currency.",
        "operationId" : "supportedLud22PayoutOptionsRoute",
        "parameters" : [ {
          "name" : "currency",
          "in" : "query",
          "description" : "Currency to get payment methods for",
          "required" : true,
          "schema" : {
            "type" : "string"
          },
          "example" : "MXN"
        } ],
        "responses" : {
          "200" : {
            "description" : "Supported remittance options for the given currency",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/LUD22PayoutOptionsResponse"
                }
              }
            }
          },
          "400" : {
            "description" : "Bad request - invalid parameter"
          },
          "401" : {
            "description" : "Unauthorized - invalid or missing credentials"
          }
        }
      }
    },
    "/reseller/settings" : {
      "get" : {
        "tags" : [ "reseller" ],
        "summary" : "Get reseller settings for current user.",
        "description" : "Returns the reseller settings for current user.",
        "operationId" : "findUserResellerInfoRoute",
        "responses" : {
          "200" : {
            "description" : "Reseller settings",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ResellerInfo"
                }
              }
            }
          },
          "404" : {
            "description" : "Not found - reseller settings not found for user"
          },
          "401" : {
            "description" : "Unauthorized - invalid or missing credentials"
          }
        }
      },
      "post" : {
        "tags" : [ "reseller" ],
        "summary" : "Updates reseller settings for current user if they exist.",
        "description" : "Updates reseller settings for current user if they exist.",
        "operationId" : "updateUserResellerInfoRoute",
        "requestBody" : {
          "description" : "The updated reseller settings",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/ResellerInfo"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "Reseller settings",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ResellerInfo"
                }
              }
            }
          },
          "400" : {
            "description" : "Bad request - invalid parameter"
          },
          "404" : {
            "description" : "Not found - reseller settings not found for user"
          },
          "401" : {
            "description" : "Unauthorized - invalid or missing credentials"
          }
        }
      }
    },
    "/swap/offer" : {
      "post" : {
        "tags" : [ "swap" ],
        "summary" : "Create a swap offer",
        "description" : "Creates a swap offer with options and fee estimates for given params",
        "operationId" : "createSwapOfferRoute",
        "requestBody" : {
          "description" : "The swap offer request params",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/CreateSwapOfferRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The swap offer",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/SwapOfferResponse"
                }
              }
            }
          },
          "400" : {
            "description" : "Invalid request - missing or invalid parameters"
          }
        }
      }
    },
    "/swap" : {
      "post" : {
        "tags" : [ "swap" ],
        "summary" : "Create a swap",
        "description" : "Creates a swap with options and fee estimates for given params and returns an invoice",
        "operationId" : "createSwapRoute",
        "requestBody" : {
          "description" : "The create swap request params",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/CreateSwapRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The created swap with payment options",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/CreateSwapResponse"
                }
              }
            }
          },
          "400" : {
            "description" : "Invalid request - missing or invalid parameters"
          },
          "401" : {
            "description" : "Unauthorized - invalid or missing credentials"
          }
        }
      }
    },
    "/swap/{swapId}" : {
      "get" : {
        "tags" : [ "swap" ],
        "summary" : "Get swap status",
        "description" : "Returns the current status and details of an existing swap by its id.",
        "operationId" : "getSwapStatusRoute",
        "parameters" : [ {
          "name" : "swapId",
          "in" : "path",
          "description" : "The swap id",
          "required" : true,
          "schema" : {
            "type" : "string"
          },
          "example" : "618af610292315ce727ce2f3863044a770d383917fdbb1cad3d3b05eb57930d3"
        } ],
        "responses" : {
          "200" : {
            "description" : "Swap status and details",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/SwapStatusResponse"
                }
              }
            }
          }
        }
      },
      "post" : {
        "tags" : [ "swap" ],
        "summary" : "Refresh an existing swap",
        "description" : "Creates a new swap with the same parameters as the old one with given id but with a new expiry date and invoice.",
        "operationId" : "refreshSwapRoute",
        "parameters" : [ {
          "name" : "swapId",
          "in" : "path",
          "description" : "The swap id",
          "required" : true,
          "schema" : {
            "type" : "string"
          },
          "example" : "618af610292315ce727ce2f3863044a770d383917fdbb1cad3d3b05eb57930d3"
        } ],
        "responses" : {
          "200" : {
            "description" : "Swap status and details",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/SwapStatusResponse"
                }
              }
            }
          }
        }
      }
    },
    "/swap/products" : {
      "get" : {
        "tags" : [ "swap" ],
        "summary" : "Get swap products",
        "description" : "Returns all available swap pairs.",
        "operationId" : "listSwapProductsRoute",
        "responses" : {
          "200" : {
            "description" : "All available swap pairs",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/SwapProduct"
                }
              }
            }
          }
        }
      }
    },
    "/swap/refund/{swapId}" : {
      "post" : {
        "tags" : [ "swap" ],
        "summary" : "Refund a failed or overpaid swap",
        "description" : "Refunds a previously failed or overpaid swap. Requires a refundable swap id and some valid payout parameters.",
        "operationId" : "refundSwapRoute",
        "parameters" : [ {
          "name" : "swapId",
          "in" : "path",
          "description" : "The swap id",
          "required" : true,
          "schema" : {
            "type" : "string"
          },
          "example" : "618af610292315ce727ce2f3863044a770d383917fdbb1cad3d3b05eb57930d3"
        } ],
        "requestBody" : {
          "description" : "The swap refund request",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/SwapRefundRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "Swap refund response",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/SwapRefundResponse"
                }
              }
            }
          },
          "400" : {
            "description" : "Invalid request - missing or invalid parameters"
          },
          "404" : {
            "description" : "Not found - swap not found"
          }
        }
      }
    },
    "/withdraw/fee-info" : {
      "get" : {
        "tags" : [ "Withdrawal" ],
        "summary" : "Returns on chain fee info for withdrawals",
        "operationId" : "feeInfoRoute",
        "responses" : {
          "200" : {
            "description" : "Returns on chain fee info for withdrawals",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/FeeInfo"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/auth/change-password" : {
      "post" : {
        "tags" : [ "Authentication" ],
        "summary" : "Change and existing users password",
        "operationId" : "changePassword",
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/ChangePasswordRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "Success of the password change"
          },
          "400" : {
            "description" : "Invalid request - missing or invalid parameters"
          },
          "401" : {
            "description" : "Unauthorized - invalid or missing credentials"
          }
        }
      }
    },
    "/auth/sign-up" : {
      "post" : {
        "tags" : [ "Authentication" ],
        "summary" : "Creates a new user",
        "operationId" : "createUser",
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/CreateUserRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The created user details and access token",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/AuthResponse"
                }
              }
            }
          },
          "400" : {
            "description" : "Invalid request - missing or invalid parameters"
          }
        }
      }
    },
    "/auth/login" : {
      "post" : {
        "tags" : [ "Authentication" ],
        "summary" : "Login with and existing user",
        "operationId" : "loginUser",
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/LoginUserRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The users details and access token",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/AuthResponse"
                }
              }
            }
          },
          "400" : {
            "description" : "Invalid request - missing or invalid parameters"
          }
        }
      }
    },
    "/auth/refresh-token" : {
      "get" : {
        "tags" : [ "Authentication" ],
        "summary" : "Returns a new access token for the user. A refresh token must be provided in the Authorization header.",
        "operationId" : "refreshToken",
        "parameters" : [ {
          "name" : "Authorization",
          "in" : "header",
          "description" : "The refresh token for the user in Bearer format",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "The users details, fresh access token and a new refresh token",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/AuthResponse"
                }
              }
            }
          },
          "401" : {
            "description" : "Unauthorized - invalid or missing credentials"
          }
        }
      }
    },
    "/auth/request-password-reset" : {
      "post" : {
        "tags" : [ "Authentication" ],
        "summary" : "Initiates a forgotten password reset flow. A reset token will be sent via email that can then be used to reset the password.",
        "operationId" : "requestResetPassword",
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/RequestEmailCodeRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "Success of the reset password request"
          },
          "400" : {
            "description" : "Invalid request - missing or invalid parameters"
          }
        }
      }
    },
    "/auth/password-reset" : {
      "post" : {
        "tags" : [ "Authentication" ],
        "summary" : "Execute a forgotten password reset flow with the given reset token",
        "operationId" : "resetPassword",
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/ResetPasswordRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The users details and access token",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/AuthResponse"
                }
              }
            }
          },
          "400" : {
            "description" : "Invalid request - missing or invalid parameters"
          }
        }
      }
    },
    "/giftcards/address-status" : {
      "post" : {
        "tags" : [ "Purchase" ],
        "summary" : "Returns the status and details of an order paid via BTC onChain address",
        "operationId" : "getAddressStatus",
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/AddressStatusRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The order details of the purchase",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PurchasedProduct"
                }
              }
            }
          },
          "400" : {
            "description" : "Invalid request - missing or invalid parameters"
          },
          "401" : {
            "description" : "Unauthorized - invalid or missing credentials"
          }
        }
      }
    },
    "/giftcards/invoice-status" : {
      "post" : {
        "tags" : [ "Purchase" ],
        "summary" : "Returns the status and details of an order paid via Lightning invoice",
        "operationId" : "getInvoiceStatus",
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/InvoiceStatusRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The order details of the purchase",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PurchasedProduct"
                }
              }
            }
          },
          "400" : {
            "description" : "Invalid request - missing or invalid parameters"
          },
          "401" : {
            "description" : "Unauthorized - invalid or missing credentials"
          }
        }
      }
    },
    "/giftcards" : {
      "get" : {
        "tags" : [ "Purchase" ],
        "summary" : "Returns a list of all available gift cards currently available in the catalog",
        "operationId" : "listGiftCards",
        "parameters" : [ {
          "name" : "size",
          "in" : "query",
          "description" : "The max number of gift cards to return",
          "schema" : {
            "type" : "integer",
            "format" : "int32"
          }
        }, {
          "name" : "offset",
          "in" : "query",
          "description" : "The number of items to skip at the beginning",
          "schema" : {
            "type" : "integer",
            "format" : "int32"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "The list of available gift cards",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/Product"
                  }
                }
              }
            }
          },
          "400" : {
            "description" : "Invalid request - missing or invalid parameters"
          }
        }
      }
    },
    "/svs/quote-card" : {
      "post" : {
        "tags" : [ "Purchase" ],
        "summary" : "Returns BTC priced offer for a gift card.",
        "description" : "Returns BTC priced offer for a gift card. This price is just a snapshot and can change depending on exchange rate and user balances when the actual invoice is created.",
        "operationId" : "quoteGiftCard",
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/QuoteGiftCardRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "The order details of the purchase",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GiftCardQuote"
                }
              }
            }
          },
          "400" : {
            "description" : "Invalid request - missing or invalid parameters"
          },
          "401" : {
            "description" : "Unauthorized - invalid or missing credentials"
          }
        }
      }
    },
    "/withdraw/check-address" : {
      "post" : {
        "tags" : [ "Withdrawal" ],
        "summary" : "Checks if a given address has already been used for a withdrawal",
        "operationId" : "checkWithdrawalAddress",
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/CheckWithdrawalAddressReuseRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "Boolean indicating whether the address has been used",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "boolean"
                }
              }
            }
          },
          "400" : {
            "description" : "Invalid request - missing or invalid parameters"
          }
        }
      }
    },
    "/users/withdrawal-history" : {
      "get" : {
        "tags" : [ "Withdrawal" ],
        "summary" : "Returns the user's withdrawal history",
        "operationId" : "getWithdrawalHistory",
        "responses" : {
          "200" : {
            "description" : "The user's withdrawal history as a list of historic withdrawal entries",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/UserWithdrawal"
                  }
                }
              }
            }
          },
          "401" : {
            "description" : "Unauthorized - invalid or missing credentials"
          }
        }
      }
    },
    "/withdraw/queue" : {
      "post" : {
        "tags" : [ "Withdrawal" ],
        "summary" : "Queues a withdrawal to be executed for the current user",
        "operationId" : "queueWithdrawal",
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/QueueWithdrawalRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "Boolean indicating whether the withdrawal was queued successfully",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "boolean"
                }
              }
            }
          },
          "400" : {
            "description" : "Invalid request - missing or invalid parameters"
          },
          "401" : {
            "description" : "Unauthorized - invalid or missing credentials"
          }
        }
      }
    }
  },
  "components" : {
    "schemas" : {
      "ObfuscatedEmailAddress" : {
        "type" : "object"
      },
      "LnUrlWithdrawalData" : {
        "required" : [ "callback", "defaultDescription", "k1", "maxWithdrawable", "minWithdrawable", "tag" ],
        "type" : "object",
        "properties" : {
          "tag" : {
            "type" : "string"
          },
          "callback" : {
            "type" : "string"
          },
          "k1" : {
            "type" : "string"
          },
          "defaultDescription" : {
            "type" : "string"
          },
          "minWithdrawable" : {
            "$ref" : "#/components/schemas/MilliSatoshis"
          },
          "maxWithdrawable" : {
            "$ref" : "#/components/schemas/MilliSatoshis"
          }
        }
      },
      "TBCUser" : {
        "required" : [ "autoWithdraw", "cloAccountCreated", "cloCardAdded", "cloDismissed", "cloEnabled", "completedOnboarding", "creditCardsEnabled", "dailyCCLimit", "dateJoined", "donationPercent", "emailConfirmed", "emailSettings", "hasPin", "id", "kycStatus", "numReferrals", "pendingCCLimitIncrease", "pendingEmailChange", "pendingUsdBalance", "preferredLanguage", "referralCode", "referralUrl", "sessionKey", "skipChecks", "totalSpent", "usdBalance", "userIdHash", "withdrawalsEnabled" ],
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "integer",
            "format" : "int64"
          },
          "userIdHash" : {
            "type" : "string"
          },
          "sessionKey" : {
            "type" : "string"
          },
          "email" : {
            "required" : [ "domain", "lnurlp", "mailbox", "obfuscated", "value" ],
            "type" : "string",
            "description" : "The email address of the user"
          },
          "username" : {
            "type" : "string"
          },
          "lnurlKey" : {
            "required" : [ "_bytes", "compressed", "decompressed", "decompressedBytesT" ],
            "type" : "string",
            "description" : "Optional LNUrl pub key"
          },
          "auth47Key" : {
            "required" : [ "_bytes", "compressed", "decompressed", "decompressedBytesT" ],
            "type" : "string",
            "description" : "Optional Auth47 pub key"
          },
          "emailConfirmed" : {
            "type" : "boolean"
          },
          "pendingEmailChange" : {
            "type" : "boolean"
          },
          "completedOnboarding" : {
            "type" : "boolean"
          },
          "referralCode" : {
            "type" : "string"
          },
          "referralUrl" : {
            "type" : "string"
          },
          "numReferrals" : {
            "type" : "integer",
            "format" : "int32"
          },
          "usdBalance" : {
            "type" : "number"
          },
          "balance" : {
            "required" : [ "toUInt64" ],
            "type" : "number",
            "description" : "The user's balance in sats"
          },
          "pendingBalance" : {
            "required" : [ "toUInt64" ],
            "type" : "number",
            "description" : "The user's pending balance in sats"
          },
          "lifetimeShopping" : {
            "required" : [ "toUInt64" ],
            "type" : "number",
            "description" : "The user's shopping lifetime in sats"
          },
          "lifetimeReferrals" : {
            "required" : [ "toUInt64" ],
            "type" : "number",
            "description" : "The user's lifetime referrals in sats"
          },
          "lifetimeDonations" : {
            "required" : [ "toUInt64" ],
            "type" : "number",
            "description" : "The user's lifetime donations in sats"
          },
          "totalSpent" : {
            "type" : "number"
          },
          "withdrawalsEnabled" : {
            "type" : "boolean"
          },
          "skipChecks" : {
            "type" : "boolean"
          },
          "lightningAddress" : {
            "type" : "string",
            "description" : "The user's lightning address for auto withdrawals"
          },
          "autoWithdraw" : {
            "type" : "boolean"
          },
          "name" : {
            "type" : "string"
          },
          "cloEnabled" : {
            "type" : "boolean"
          },
          "cloDismissed" : {
            "type" : "boolean"
          },
          "cloAccountCreated" : {
            "type" : "boolean"
          },
          "cloCardAdded" : {
            "type" : "boolean"
          },
          "creditCardsEnabled" : {
            "type" : "boolean"
          },
          "dailyCCLimit" : {
            "type" : "number"
          },
          "pendingCCLimitIncrease" : {
            "type" : "boolean"
          },
          "notificationSettings" : {
            "$ref" : "#/components/schemas/NotificationSettings"
          },
          "signupBonusSats" : {
            "required" : [ "toUInt64" ],
            "type" : "number",
            "description" : "The user's signup bonus in sats"
          },
          "signupBonusUsd" : {
            "type" : "number",
            "description" : "The user's signup bonus in USD"
          },
          "emailSettings" : {
            "$ref" : "#/components/schemas/EmailSettings"
          },
          "hasPin" : {
            "type" : "boolean"
          },
          "donationPercent" : {
            "type" : "integer",
            "format" : "int32"
          },
          "dateJoined" : {
            "type" : "integer",
            "format" : "int64"
          },
          "prefCountry" : {
            "required" : [ "code", "phoneCode" ],
            "type" : "string",
            "description" : "The user's preferred country"
          },
          "prefAddressType" : {
            "type" : "string",
            "description" : "The user's preferred onChain address type"
          },
          "pendingUsdBalance" : {
            "type" : "number"
          },
          "accessTravelToken" : {
            "type" : "string"
          },
          "preferredLanguage" : {
            "type" : "string"
          },
          "kycStatus" : {
            "$ref" : "#/components/schemas/KycUserStatus"
          },
          "resellerInfo" : {
            "$ref" : "#/components/schemas/ResellerInfo"
          }
        },
        "description" : "A TBC users details"
      },
      "SwapRefundResponse" : {
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "The unique id of the swap being refunded"
          },
          "payoutAmount" : {
            "$ref" : "#/components/schemas/Amount"
          },
          "status" : {
            "type" : "string",
            "description" : "A status indicator for tracking multi step operations",
            "enum" : [ "created", "pending", "processing", "completed", "failed" ]
          },
          "failureReason" : {
            "type" : "string",
            "description" : "In case of swap failure the optional reason or error message"
          }
        }
      },
      "OrganizationDetails" : {
        "required" : [ "enabled", "id", "permissions", "remittance", "secrets", "users" ],
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "The unique id of the organization",
            "example" : "Tbc"
          },
          "enabled" : {
            "type" : "boolean",
            "description" : "Whether the organization is enabled",
            "example" : true
          },
          "permissions" : {
            "uniqueItems" : true,
            "type" : "array",
            "description" : "The set of permissions granted to the organization",
            "example" : "Remittance",
            "items" : {
              "type" : "string",
              "description" : "A resource id",
              "example" : "Remittance",
              "enum" : [ "Remittance", "Organization" ]
            }
          },
          "users" : {
            "type" : "array",
            "description" : "The list of users assigned to the organization",
            "items" : {
              "$ref" : "#/components/schemas/OrganizationUser"
            }
          },
          "remittance" : {
            "$ref" : "#/components/schemas/RemittanceInfo"
          },
          "secrets" : {
            "type" : "array",
            "description" : "The list of api credentials for the organization.",
            "items" : {
              "$ref" : "#/components/schemas/OrganizationCredential"
            }
          }
        },
        "description" : "Details of an organization"
      },
      "Product" : {
        "required" : [ "cardSatsBackPercentage", "categories", "cost", "countries", "currency", "currencySymbol", "dateAdded", "defaultDenoms", "defaultSatsBackPercentage", "denominationType", "denominations", "description", "id", "isOpenLoop", "isPhysical", "logo", "name", "paymentTypes", "productType", "satsBackPercentage", "stock" ],
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "The id of the product",
            "example" : "123456"
          },
          "stock" : {
            "type" : "integer",
            "description" : "The amount in stock of the product",
            "format" : "int64",
            "example" : 12
          },
          "denominations" : {
            "type" : "array",
            "description" : "The denominations (purchaseable amounts) of the product",
            "items" : {
              "type" : "integer",
              "description" : "The denominations (purchaseable amounts) of the product",
              "format" : "int64"
            }
          },
          "currency" : {
            "type" : "string",
            "description" : "The currency the product is denominated in"
          },
          "currencySymbol" : {
            "type" : "string",
            "description" : "The currency symbol of the product"
          },
          "name" : {
            "type" : "string",
            "description" : "The name of the product"
          },
          "description" : {
            "type" : "string",
            "description" : "The description of the product"
          },
          "terms" : {
            "type" : "string",
            "description" : "The products terms"
          },
          "disclaimer" : {
            "type" : "string",
            "description" : "The products disclaimer"
          },
          "preWarning" : {
            "type" : "string",
            "description" : "The products usage warnings. Eg. not usable in country..."
          },
          "isPhysical" : {
            "type" : "boolean",
            "description" : "Whether the product is physical"
          },
          "denominationType" : {
            "type" : "string",
            "description" : "The type of denominations of the product (fixed: only the given denominations are available, variable: any amount can be purchased",
            "enum" : [ "Fixed", "Variable", "VariableNoCents" ]
          },
          "defaultDenoms" : {
            "type" : "array",
            "description" : "The default denominations of the product (only for variable denominations)",
            "items" : {
              "type" : "integer",
              "description" : "The default denominations of the product (only for variable denominations)",
              "format" : "int64"
            }
          },
          "logo" : {
            "type" : "string",
            "description" : "The logo url of the product"
          },
          "panelImg" : {
            "type" : "string",
            "description" : "The panel image url"
          },
          "isOpenLoop" : {
            "type" : "boolean",
            "description" : "Whether the product is open loop (eg: prepaid Visa)"
          },
          "cost" : {
            "type" : "integer",
            "description" : "The cost of the product in fiat",
            "format" : "int64"
          },
          "satsBackPercentage" : {
            "type" : "number",
            "description" : "The percentage of the product sats amount the user earns as reward",
            "format" : "double"
          },
          "defaultSatsBackPercentage" : {
            "type" : "number",
            "description" : "The default percentage of the product sats amount the user earns as reward",
            "format" : "double"
          },
          "cardSatsBackPercentage" : {
            "type" : "number",
            "description" : "The percentage of the product sats amount the user earns as reward",
            "format" : "double"
          },
          "flatReward" : {
            "type" : "number",
            "description" : "The flat reward of the product in fiat",
            "format" : "double"
          },
          "categories" : {
            "type" : "array",
            "description" : "The categories of the product",
            "items" : {
              "type" : "string",
              "description" : "The categories of the product"
            }
          },
          "countries" : {
            "type" : "array",
            "description" : "The countries the product is available in",
            "items" : {
              "type" : "string",
              "description" : "The countries the product is available in"
            }
          },
          "productType" : {
            "type" : "string",
            "description" : "The type of product"
          },
          "dateAdded" : {
            "type" : "integer",
            "description" : "The date the product was added",
            "format" : "int64"
          },
          "paymentTypes" : {
            "type" : "string",
            "description" : "The payment types accepted for the product"
          },
          "cardType" : {
            "type" : "string",
            "description" : "The type of the purchased card"
          }
        },
        "description" : "A TBC product"
      },
      "UnifiedBitcoinPaymentParams" : {
        "type" : "object",
        "properties" : {
          "type" : {
            "type" : "string",
            "description" : "A payment type",
            "enum" : [ "Lightning", "Bitcoin", "On-chain", "User Balance", "Credit Card", "ApplePay", "GooglePay", "Liquid", "USDT", "Fiat" ]
          },
          "currency" : {
            "type" : "string",
            "description" : "The currency for the payment amount"
          },
          "amount" : {
            "type" : "number",
            "description" : "The amount to pay"
          },
          "invoice" : {
            "type" : "string",
            "description" : "The Bolt11 Lightning invoice"
          },
          "address" : {
            "type" : "string",
            "description" : "The Bitcoin on-chain address to send to"
          },
          "currentBlockHeight" : {
            "type" : "number",
            "description" : "The current block height"
          }
        }
      },
      "FutureSeqProduct" : {
        "required" : [ "completed" ],
        "type" : "object",
        "properties" : {
          "completed" : {
            "type" : "boolean"
          }
        }
      },
      "LUD22RequiredField" : {
        "required" : [ "datatype", "name" ],
        "type" : "object",
        "properties" : {
          "name" : {
            "type" : "string",
            "description" : "The name of the field",
            "example" : "recipient_name"
          },
          "datatype" : {
            "type" : "string",
            "description" : "The type of the field",
            "example" : "string"
          },
          "validation" : {
            "type" : "string",
            "description" : "A regex that the field must match",
            "example" : "[0-9]{18}"
          },
          "options" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/LUD22SelectOption"
            }
          }
        },
        "description" : "A required field for using a payout option. The field must be filled out by the sender.",
        "example" : {
          "name" : "clabe",
          "datatype" : "string",
          "validation" : "[0-9]{18}"
        }
      },
      "FutureGiftCardQuote" : {
        "required" : [ "completed" ],
        "type" : "object",
        "properties" : {
          "completed" : {
            "type" : "boolean"
          }
        }
      },
      "RemittanceReportRow" : {
        "required" : [ "createdDate", "failed", "id", "invoiceAmount", "paid", "recipientAmount", "recipientCurrency", "recipientName", "refundable", "refunded", "usdToTargetExchangeRate" ],
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string"
          },
          "paid" : {
            "type" : "boolean"
          },
          "failed" : {
            "type" : "boolean"
          },
          "refunded" : {
            "type" : "boolean"
          },
          "refundable" : {
            "type" : "boolean"
          },
          "recipientCurrency" : {
            "type" : "string"
          },
          "recipientAmount" : {
            "type" : "number"
          },
          "recipientName" : {
            "type" : "string"
          },
          "usdToTargetExchangeRate" : {
            "type" : "number"
          },
          "usdToBtcExchangeRate" : {
            "type" : "number"
          },
          "targetToBtcExchangeRate" : {
            "type" : "number"
          },
          "accountNumber" : {
            "type" : "string"
          },
          "institutionNumber" : {
            "type" : "string"
          },
          "invoiceAmount" : {
            "type" : "number"
          },
          "createdDate" : {
            "type" : "integer",
            "format" : "int64"
          },
          "paidDate" : {
            "type" : "integer",
            "format" : "int64"
          },
          "trackingLink" : {
            "type" : "string"
          },
          "satsRevenue" : {
            "type" : "integer",
            "format" : "int64"
          },
          "usdRevenue" : {
            "type" : "number"
          }
        }
      },
      "SendPaymentResult" : {
        "type" : "object",
        "description" : "The transaction data for the refund"
      },
      "GiftCardClaimData" : {
        "type" : "object",
        "properties" : {
          "claimLink" : {
            "type" : "string",
            "description" : "The link to claim the gift card"
          },
          "claimLinkChallengeAnswer" : {
            "type" : "string",
            "description" : "The answer to the claim challenge question if required"
          },
          "barcodePath" : {
            "type" : "string",
            "description" : "The path to the barcode"
          },
          "barcodeChars" : {
            "type" : "string",
            "description" : "The barcode characters"
          },
          "barcodeType" : {
            "type" : "string",
            "description" : "The barcode type"
          },
          "codes" : {
            "type" : "array",
            "description" : "The claim code",
            "items" : {
              "$ref" : "#/components/schemas/ClaimCode"
            }
          }
        },
        "description" : "Gift card claim data options. Filled fields vary depending on the claim type."
      },
      "QuoteGiftCardRequest" : {
        "type" : "object",
        "properties" : {
          "productId" : {
            "type" : "string",
            "description" : "The id of the product to quote"
          },
          "cardValue" : {
            "type" : "number",
            "description" : "The fiat value of the gift card"
          },
          "quantity" : {
            "type" : "number",
            "description" : "The number of gift cards to purchase"
          },
          "purchaseType" : {
            "type" : "string",
            "description" : "A payment type",
            "enum" : [ "Lightning", "Bitcoin", "On-chain", "User Balance", "Credit Card", "ApplePay", "GooglePay", "Liquid", "USDT", "Fiat" ]
          }
        },
        "description" : "A request to quote a gift card order"
      },
      "Currency" : {
        "type" : "object"
      },
      "UserWithdrawal" : {
        "required" : [ "activityType", "address", "amount", "date", "id", "price", "requestDate", "withdrawalType" ],
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "integer",
            "description" : "The id of the withdrawal",
            "format" : "int64"
          },
          "date" : {
            "type" : "integer",
            "description" : "The date of the withdrawal (UNIX timestamp)",
            "format" : "int64"
          },
          "requestDate" : {
            "type" : "integer",
            "description" : "The date when the withdrawal was requested (UNIX timestamp)",
            "format" : "int64"
          },
          "address" : {
            "type" : "string",
            "description" : "The withdrawal address"
          },
          "amount" : {
            "required" : [ "toUInt64" ],
            "type" : "number",
            "description" : "The amount of the withdrawal"
          },
          "price" : {
            "type" : "number",
            "description" : "The USD price of BTC at the time of the withdrawal"
          },
          "withdrawalType" : {
            "required" : [ "emoji" ],
            "type" : "string",
            "description" : "The type of the withdrawal"
          },
          "txId" : {
            "required" : [ "bytes", "hex" ],
            "type" : "string",
            "description" : "The tx id of the withdrawal if it was on chain"
          },
          "confirmations" : {
            "type" : "integer",
            "description" : "The number of confirmations for the withdrawal if it was on chain",
            "format" : "int64"
          }
        },
        "description" : "A historic user withdrawal"
      },
      "LUD22RefundRequest" : {
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "The UUID of the remittance transaction."
          },
          "pr" : {
            "type" : "string",
            "description" : "The LN (Bolt11) invoice for sending the refund back."
          }
        },
        "description" : "A request to refund a failed remittance transaction.",
        "example" : {
          "id" : "1234",
          "pr" : "lnbc1234567890"
        }
      },
      "FutureObject" : {
        "required" : [ "completed" ],
        "type" : "object",
        "properties" : {
          "completed" : {
            "type" : "boolean"
          }
        }
      },
      "NotificationSettings" : {
        "required" : [ "newMerchants", "promotions", "referralBonuses", "referralSignUps", "weeklyRewardsSummary" ],
        "type" : "object",
        "properties" : {
          "referralSignUps" : {
            "type" : "boolean"
          },
          "referralBonuses" : {
            "type" : "boolean"
          },
          "newMerchants" : {
            "type" : "boolean"
          },
          "weeklyRewardsSummary" : {
            "type" : "boolean"
          },
          "promotions" : {
            "type" : "boolean"
          }
        }
      },
      "RequestEmailCodeRequest" : {
        "type" : "object",
        "properties" : {
          "email" : {
            "required" : [ "domain", "lnurlp", "mailbox", "obfuscated", "value" ],
            "type" : "string",
            "description" : "The email address"
          }
        },
        "description" : "A request requiring an email address"
      },
      "AddressStatusRequest" : {
        "type" : "object",
        "properties" : {
          "address" : {
            "type" : "string",
            "description" : "The onChain address to get the order status for"
          }
        },
        "description" : "Request to get the status of an order paid via an onChain address"
      },
      "EmailAddress" : {
        "required" : [ "domain", "lnurlp", "mailbox", "obfuscated", "value" ],
        "type" : "object",
        "properties" : {
          "value" : {
            "type" : "string"
          },
          "obfuscated" : {
            "$ref" : "#/components/schemas/ObfuscatedEmailAddress"
          },
          "lnurlp" : {
            "type" : "string",
            "format" : "url"
          },
          "mailbox" : {
            "$ref" : "#/components/schemas/Mailbox"
          },
          "domain" : {
            "$ref" : "#/components/schemas/Domain"
          }
        },
        "description" : "The email address of the gift card recipient",
        "example" : "hello@example.com"
      },
      "FutureAuthResponse" : {
        "required" : [ "completed" ],
        "type" : "object",
        "properties" : {
          "completed" : {
            "type" : "boolean"
          }
        }
      },
      "RedeemWithdrawInfo" : {
        "type" : "object",
        "properties" : {
          "fiatAmount" : {
            "$ref" : "#/components/schemas/BigDecimal"
          },
          "fiatCurrency" : {
            "type" : "string",
            "description" : "The currency of the fiat amount",
            "example" : "USD"
          },
          "commission" : {
            "$ref" : "#/components/schemas/BigDecimal"
          },
          "satsAmount" : {
            "required" : [ "toUInt64" ],
            "type" : "integer",
            "description" : "The total amount of sats that are on the the gift card (including fees)",
            "format" : "int64"
          },
          "onChainFeeInfo" : {
            "type" : "array",
            "description" : "Fee options and cost estimates for an on chain withdrawal",
            "items" : {
              "$ref" : "#/components/schemas/WithdrawalFee"
            }
          },
          "lightningFee" : {
            "required" : [ "toUInt64" ],
            "type" : "integer",
            "description" : "Fee we will charge for a lightning withdrawal",
            "format" : "int64"
          },
          "batchOnChainFee" : {
            "required" : [ "toUInt64" ],
            "type" : "integer",
            "description" : "Fee we will charge for a batched onChain withdrawal",
            "format" : "int64"
          },
          "withdrawLnUrl" : {
            "type" : "string",
            "description" : "The url to initialize a withdraw of the gift card via lightning LNURL"
          },
          "bitcoinPrice" : {
            "type" : "number",
            "description" : "The current price of bitcoin in USD.",
            "format" : "double"
          },
          "validUntil" : {
            "type" : "integer",
            "description" : "UTC timestamp when this redeem info will expire and redeem will be executed with a new price",
            "format" : "int64"
          }
        },
        "description" : "Information about the withdrawal fee and cost estimate"
      },
      "QueueWithdrawalRequest" : {
        "type" : "object",
        "properties" : {
          "amount" : {
            "required" : [ "toUInt64" ],
            "type" : "number",
            "description" : "The amount to withdraw in sats"
          },
          "address" : {
            "type" : "string",
            "description" : "The address to withdraw to"
          }
        },
        "description" : "A request to queue a withdrawal"
      },
      "PayoutParams" : {
        "type" : "object",
        "description" : "The swap payment info as provided by the user"
      },
      "Country" : {
        "required" : [ "code", "phoneCode" ],
        "type" : "object",
        "properties" : {
          "code" : {
            "type" : "string"
          },
          "phoneCode" : {
            "type" : "string"
          }
        }
      },
      "JsValue" : {
        "type" : "object",
        "description" : "An optional default that will be used formatted as baseType"
      },
      "SwapProduct" : {
        "required" : [ "amounts", "description", "fees", "inputRequirements", "name", "pair", "paymentTypes", "userRequirements" ],
        "type" : "object",
        "properties" : {
          "pair" : {
            "$ref" : "#/components/schemas/SwapPair"
          },
          "name" : {
            "type" : "string",
            "description" : "The name of the swap product."
          },
          "description" : {
            "type" : "string",
            "description" : "A human readable description of the product."
          },
          "fees" : {
            "type" : "array",
            "description" : "A list of fees charged when doing a swap.",
            "items" : {
              "$ref" : "#/components/schemas/Fee"
            }
          },
          "terms" : {
            "type" : "string",
            "description" : "The terms for using this swap."
          },
          "amounts" : {
            "$ref" : "#/components/schemas/AmountConstraints"
          },
          "paymentTypes" : {
            "type" : "array",
            "description" : "The list of allowed payment types that can be used to pay the input invoice.",
            "items" : {
              "type" : "string",
              "description" : "A payment type",
              "enum" : [ "Lightning", "Bitcoin", "On-chain", "User Balance", "Credit Card", "ApplePay", "GooglePay", "Liquid", "USDT", "Fiat" ]
            }
          },
          "userRequirement" : {
            "type" : "string",
            "description" : "A user session requirement",
            "enum" : [ "anonymous", "account", "kyc", "reseller" ]
          },
          "offerRequirements" : {
            "$ref" : "#/components/schemas/FormSchema"
          },
          "inputRequirements" : {
            "$ref" : "#/components/schemas/FormSchema"
          },
          "validFor" : {
            "type" : "integer",
            "description" : "The number of seconds this swap is valid after creation. After this time the swap will be marked as failed on payment arrival.",
            "format" : "int64"
          }
        },
        "description" : "A single swap product from one for a pair of input and output channel."
      },
      "LUD22CurrenciesResponse" : {
        "required" : [ "callback", "tag" ],
        "type" : "object",
        "properties" : {
          "callback" : {
            "type" : "string"
          },
          "tag" : {
            "type" : "string"
          },
          "currencies" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          }
        },
        "description" : "Returns the list of supported remittance currencies.",
        "example" : {
          "callback" : "https://api.thebitcoincompany.com/remittance/options",
          "tag" : "sendGloballyRequest",
          "currencies" : [ "MXN", "BRL" ]
        }
      },
      "LUD22WebhookPayload" : {
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "The UUID of the remittance transaction."
          },
          "paymentStatus" : {
            "required" : [ "name" ],
            "type" : "string",
            "description" : "The status of the lightning invoice payment of this transaction."
          },
          "payoutStatus" : {
            "required" : [ "name" ],
            "type" : "string",
            "description" : "The status of the payout transaction at the receiver side."
          },
          "refund" : {
            "type" : "string",
            "description" : "Refund url in case the transaction has failed during processing."
          },
          "trackingId" : {
            "type" : "string",
            "description" : "The tracking id of the remittance transaction if the payout generates one."
          },
          "failureReason" : {
            "type" : "string",
            "description" : "If the transaction is a refund gives the failure reason"
          }
        },
        "description" : "Webhook payload sent on remittance transaction status changes.",
        "example" : {
          "id" : "1234",
          "paymentStatus" : "success",
          "payoutStatus" : "pending"
        }
      },
      "LoginUserRequest" : {
        "required" : [ "email", "password" ],
        "type" : "object",
        "properties" : {
          "email" : {
            "type" : "string"
          },
          "password" : {
            "type" : "string"
          }
        },
        "description" : "A request to login an existing user"
      },
      "BitcoinRedeemRequest" : {
        "required" : [ "code" ],
        "type" : "object",
        "properties" : {
          "code" : {
            "type" : "string"
          },
          "email" : {
            "required" : [ "domain", "lnurlp", "mailbox", "obfuscated", "value" ],
            "type" : "string",
            "description" : "The contact email address if user is withdrawing as an anonymous user"
          },
          "withdrawalString" : {
            "type" : "string",
            "description" : "The withdrawal string. Required if the user wants to withdraw to an external address"
          },
          "withdrawalFee" : {
            "required" : [ "toUInt64" ],
            "type" : "integer",
            "description" : "The sats per vByte the use is willing to pay for an onchain withdrawal",
            "format" : "int64"
          },
          "withdrawToBalance" : {
            "type" : "boolean",
            "description" : "Whether the user wants to withdraw to his balance. Always false for anon users"
          },
          "batchOnChainWithdraw" : {
            "type" : "boolean",
            "description" : "Whether the user wants to withdraw via batched on chain withdrawal"
          }
        },
        "description" : "Withdrawal options required for a BTC gift card redemption"
      },
      "LightningPayout" : {
        "required" : [ "invoice" ],
        "type" : "object",
        "properties" : {
          "invoice" : {
            "type" : "string",
            "description" : "A lightning payment string (LNAddress, LNUrl, invoice or NodeId)",
            "example" : "me@myaddress.com"
          }
        },
        "description" : "Parameters required to create a Bitcoin Lightning payout"
      },
      "DeliveryAddress" : {
        "required" : [ "addressLine1", "carrierId", "city", "country", "recipient", "shippingMethodId", "state", "svsDelivery", "svsOrderId", "zip" ],
        "type" : "object",
        "properties" : {
          "svsOrderId" : {
            "type" : "integer",
            "description" : "The order id.",
            "format" : "int64",
            "example" : 123456
          },
          "shippingMethodId" : {
            "type" : "string",
            "description" : "The shipping method id.",
            "example" : "123456"
          },
          "carrierId" : {
            "type" : "string",
            "description" : "The carrier id.",
            "example" : "123456"
          },
          "recipient" : {
            "type" : "string",
            "description" : "The recipient.",
            "example" : "John Doe"
          },
          "addressLine1" : {
            "type" : "string",
            "description" : "The first address line.",
            "example" : "123 Main St."
          },
          "addressLine2" : {
            "type" : "string",
            "description" : "The second address line.",
            "example" : "Apt. 1"
          },
          "addressLine3" : {
            "type" : "string",
            "description" : "The third address line.",
            "example" : "Suite 1"
          },
          "city" : {
            "type" : "string",
            "description" : "The city.",
            "example" : "New York"
          },
          "country" : {
            "required" : [ "code", "phoneCode" ],
            "type" : "string",
            "description" : "The country.",
            "example" : "US"
          },
          "state" : {
            "$ref" : "#/components/schemas/USAState"
          },
          "zip" : {
            "type" : "string",
            "description" : "The zip code.",
            "example" : "10001"
          },
          "svsDelivery" : {
            "$ref" : "#/components/schemas/PhysicalDeliveryAddress"
          }
        },
        "description" : "A delivery address."
      },
      "EmailSettings" : {
        "required" : [ "marketing", "productUpdates", "receipts" ],
        "type" : "object",
        "properties" : {
          "receipts" : {
            "type" : "boolean"
          },
          "marketing" : {
            "type" : "boolean"
          },
          "productUpdates" : {
            "type" : "boolean"
          }
        }
      },
      "CreateSwapOfferRequest" : {
        "required" : [ "amount", "pair" ],
        "type" : "object",
        "properties" : {
          "pair" : {
            "$ref" : "#/components/schemas/SwapPair"
          },
          "amount" : {
            "$ref" : "#/components/schemas/Amount"
          },
          "isPayoutAmount" : {
            "type" : "boolean",
            "description" : "Whether the amount is the desired payout amount otherwise the amount will be the pay amount",
            "default" : false
          },
          "parameters" : {
            "required" : [ "underlying" ],
            "type" : "object",
            "description" : "The optional additional params required for the swap offer",
            "oneOf" : [ {
              "$ref" : "#/components/schemas/OnChainPayoutOffer"
            } ]
          }
        },
        "description" : "Payload required to receive a swap offer"
      },
      "KycStatus" : {
        "required" : [ "name" ],
        "type" : "object",
        "properties" : {
          "name" : {
            "type" : "string"
          }
        }
      },
      "GiftPersonalization" : {
        "required" : [ "from", "to" ],
        "type" : "object",
        "properties" : {
          "nostr" : {
            "$ref" : "#/components/schemas/NostrIdentity"
          },
          "email" : {
            "$ref" : "#/components/schemas/EmailAddress"
          },
          "to" : {
            "type" : "string",
            "description" : "The name of the gift card recipient. Can be an empty string.",
            "example" : "John Doe"
          },
          "from" : {
            "type" : "string",
            "description" : "The name of the gift card sender. Can be an empty string.",
            "example" : "Jane Doe"
          },
          "message" : {
            "type" : "string",
            "description" : "A message to the gift card recipient.",
            "example" : "Happy birthday!"
          }
        },
        "description" : "Personalization information for a gift card purchase that should be sent to the recipient either via Nostr or email. So for sending a gift card either the nostr or email field must be set. In the case of a anon purchase this information is required as it will be the product delivery method."
      },
      "ResetPasswordRequest" : {
        "required" : [ "email", "password", "resetToken" ],
        "type" : "object",
        "properties" : {
          "resetToken" : {
            "type" : "string",
            "description" : "The reset token delivered via email"
          },
          "email" : {
            "required" : [ "domain", "lnurlp", "mailbox", "obfuscated", "value" ],
            "type" : "string",
            "description" : "The email of the user to reset the password for"
          },
          "password" : {
            "type" : "string",
            "description" : "The new password of the user"
          }
        },
        "description" : "A request to reset a user's password for a reset token that was sent via email"
      },
      "Mailbox" : {
        "required" : [ "value" ],
        "type" : "object",
        "properties" : {
          "value" : {
            "type" : "string"
          }
        }
      },
      "LightningPaymentParams" : {
        "type" : "object",
        "properties" : {
          "type" : {
            "type" : "string",
            "description" : "A payment type",
            "enum" : [ "Lightning", "Bitcoin", "On-chain", "User Balance", "Credit Card", "ApplePay", "GooglePay", "Liquid", "USDT", "Fiat" ]
          },
          "currency" : {
            "type" : "string",
            "description" : "The currency for the payment amount"
          },
          "amount" : {
            "type" : "number",
            "description" : "The amount to pay"
          },
          "invoice" : {
            "type" : "string",
            "description" : "The Bolt11 Lightning invoice"
          }
        },
        "description" : "Bitcoin Lightning payment params"
      },
      "ClaimCode" : {
        "required" : [ "value" ],
        "type" : "object",
        "properties" : {
          "label" : {
            "type" : "string"
          },
          "value" : {
            "type" : "string"
          }
        },
        "description" : "The claim code"
      },
      "BitcoinOrder" : {
        "required" : [ "address", "amount", "invoice", "orderId", "satsBack", "uuid" ],
        "type" : "object",
        "properties" : {
          "address" : {
            "type" : "string",
            "description" : "An on chain address to send the payment to.",
            "example" : "bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq"
          },
          "amount" : {
            "required" : [ "toUInt64" ],
            "type" : "integer",
            "description" : "The amount to pay in satoshis.",
            "format" : "int64",
            "example" : 100000
          },
          "invoice" : {
            "type" : "string",
            "description" : "A lightning invoice to send the payment to.",
            "example" : "lnbcrt1p0kzv9pp5..."
          },
          "orderId" : {
            "type" : "integer",
            "description" : "The order id.",
            "format" : "int64",
            "example" : 123456
          },
          "uuid" : {
            "type" : "string",
            "description" : "The uuid of the order.",
            "example" : "123e4567-e89b-12d3-a456-426614174000"
          },
          "satsBack" : {
            "required" : [ "toUInt64" ],
            "type" : "integer",
            "description" : "The amount of satoshis the user earns as reward.",
            "format" : "int64",
            "example" : 1000
          }
        },
        "description" : "A Bitcoin invoice response that can be paid with Lightning or on chain."
      },
      "InvoiceResponse" : {
        "required" : [ "institutionName", "invoice", "lnInvoicePaid", "recipientAmount", "recipientName", "status", "transactionId", "usdExchangeRate" ],
        "type" : "object",
        "properties" : {
          "transactionId" : {
            "type" : "string",
            "example" : "3c18d2d2-44e8-49eb-ba5c-a978cfa3b666"
          },
          "invoice" : {
            "type" : "string"
          },
          "onchainAddress" : {
            "type" : "string",
            "description" : "The on-chain Bitcoin address for payment",
            "example" : "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh"
          },
          "usdExchangeRate" : {
            "type" : "number",
            "description" : "The USD exchange rate",
            "format" : "double",
            "example" : 0.000050
          },
          "sourceBtcExchangeRate" : {
            "type" : "number",
            "description" : "The source currency btc exchange rate (currently only USD)",
            "format" : "double",
            "example" : 50000.5
          },
          "targetBtcExchangeRate" : {
            "type" : "number",
            "description" : "The target currency btc exchange rate",
            "format" : "double",
            "example" : 50000.5
          },
          "recipientName" : {
            "type" : "string",
            "description" : "The recipient name",
            "example" : "Juan Perez"
          },
          "recipientAmount" : {
            "$ref" : "#/components/schemas/SendAmount"
          },
          "bitcoinAmount" : {
            "$ref" : "#/components/schemas/SendAmount"
          },
          "payoutMethod" : {
            "type" : "string",
            "description" : "The recipient account data",
            "example" : "clabe"
          },
          "payoutAccount" : {
            "type" : "string",
            "description" : "The recipient account data",
            "example" : "1234567890"
          },
          "institutionName" : {
            "type" : "string",
            "description" : "The institution name",
            "example" : "Banorte"
          },
          "lnInvoicePaid" : {
            "type" : "boolean",
            "description" : "Whether the invoice has been paid",
            "example" : true
          },
          "status" : {
            "type" : "string",
            "description" : "Withdrawal status",
            "example" : "pending",
            "enum" : [ "waiting", "pending", "processing", "completed", "failed", "refunded", "unknown" ]
          },
          "isCustomer" : {
            "type" : "boolean",
            "description" : "Whether the recipient is TBC customer",
            "example" : false
          },
          "feePercent" : {
            "type" : "number"
          },
          "trackingLink" : {
            "type" : "string",
            "description" : "A link to get the bank payment confirmation info if one is available",
            "example" : "https://link.com"
          },
          "trackingId" : {
            "type" : "string",
            "description" : "A tracking id to get the bank payment confirmation info if one is available",
            "example" : "1234567890"
          },
          "failureReason" : {
            "type" : "string",
            "description" : "The failure reason if the transaction failed",
            "example" : "Excede el límite de abonos permitidos"
          }
        },
        "description" : "An invoice response"
      },
      "RemittanceTicker" : {
        "type" : "object",
        "properties" : {
          "pair" : {
            "type" : "string",
            "description" : "The trading pair.",
            "example" : "USDMXN"
          },
          "price" : {
            "type" : "number",
            "description" : "The price of the trading pair.",
            "format" : "double",
            "example" : 18.76
          }
        },
        "description" : "A ticker for a trading pair.",
        "example" : {
          "pair" : "USDMXN",
          "ticker" : 18.76
        }
      },
      "RemittanceOfferRequest" : {
        "required" : [ "sendAmount", "targetCurrency" ],
        "type" : "object",
        "properties" : {
          "sendAmount" : {
            "$ref" : "#/components/schemas/SendAmount"
          },
          "targetCurrency" : {
            "$ref" : "#/components/schemas/Currency"
          }
        }
      },
      "ResellerInfo" : {
        "type" : "object",
        "properties" : {
          "defaultCommission" : {
            "type" : "number",
            "description" : "The default commission for the reseller",
            "format" : "double"
          }
        },
        "description" : "Reseller settings for a user"
      },
      "PhysicalDeliveryAddress" : {
        "required" : [ "AddressLine1", "City", "Country", "Name", "State", "Zip" ],
        "type" : "object",
        "properties" : {
          "AddressLine1" : {
            "type" : "string"
          },
          "AddressLine2" : {
            "type" : "string"
          },
          "AddressLine3" : {
            "type" : "string"
          },
          "City" : {
            "type" : "string"
          },
          "Country" : {
            "$ref" : "#/components/schemas/Country"
          },
          "Name" : {
            "type" : "string"
          },
          "ShippingMethodId" : {
            "type" : "string"
          },
          "CarrierId" : {
            "type" : "string"
          },
          "State" : {
            "$ref" : "#/components/schemas/USAState"
          },
          "Zip" : {
            "type" : "string"
          }
        }
      },
      "Fee" : {
        "required" : [ "feeType", "value" ],
        "type" : "object",
        "properties" : {
          "feeType" : {
            "type" : "string",
            "description" : "The type of fee",
            "example" : "percentage",
            "enum" : [ "fixed", "percentage" ]
          },
          "value" : {
            "type" : "number",
            "description" : "The fee amount",
            "format" : "double",
            "example" : 1.1
          }
        },
        "description" : "A fee amount with its type",
        "example" : {
          "feeType" : "percentage",
          "value" : 1.1
        }
      },
      "Amount" : {
        "required" : [ "amount", "currency" ],
        "type" : "object",
        "properties" : {
          "currency" : {
            "type" : "string",
            "description" : "The currency the amount is denominated in",
            "example" : "BTC"
          },
          "amount" : {
            "type" : "number",
            "description" : "The amount",
            "format" : "double",
            "example" : 15.5
          }
        },
        "description" : "A currency amount"
      },
      "WebhookNotificationInfo" : {
        "required" : [ "callbackUrl" ],
        "type" : "object",
        "properties" : {
          "callbackUrl" : {
            "type" : "string",
            "description" : "The url to be invoked when events are published"
          },
          "psk" : {
            "type" : "string",
            "description" : "An optional pre-shared key to SHA256 sign the webhook payload and add the signature header"
          }
        },
        "description" : "Dynamic webhook notification settings"
      },
      "KycUserStatus" : {
        "required" : [ "status" ],
        "type" : "object",
        "properties" : {
          "status" : {
            "$ref" : "#/components/schemas/KycStatus"
          },
          "score" : {
            "type" : "number"
          },
          "provider" : {
            "$ref" : "#/components/schemas/KycProvider"
          }
        }
      },
      "AuthResponse" : {
        "required" : [ "accessToken", "refreshToken", "user" ],
        "type" : "object",
        "properties" : {
          "accessToken" : {
            "type" : "string",
            "description" : "The access/bearer token for the user to use in the Authorization header. This token will expire after one hour."
          },
          "refreshToken" : {
            "type" : "string",
            "description" : "The refresh token for the user to use in the Authorization header to get a new access token. This token is valid for 21 days and can be used to refresh the access token once."
          },
          "user" : {
            "$ref" : "#/components/schemas/TBCUser"
          }
        },
        "description" : "A user authentication response"
      },
      "FuturePurchasedProduct" : {
        "required" : [ "completed" ],
        "type" : "object",
        "properties" : {
          "completed" : {
            "type" : "boolean"
          }
        }
      },
      "GiftCardQuote" : {
        "required" : [ "product" ],
        "type" : "object",
        "properties" : {
          "fiatCost" : {
            "type" : "number",
            "description" : "The product cost in fiat"
          },
          "satsCost" : {
            "required" : [ "toUInt64" ],
            "type" : "number",
            "description" : "The product cost in sats"
          },
          "satsBack" : {
            "required" : [ "toUInt64" ],
            "type" : "number",
            "description" : "The sats back for the product"
          },
          "donateSats" : {
            "required" : [ "toUInt64" ],
            "type" : "number",
            "description" : "The sats that will be donated"
          },
          "usdBalancePaid" : {
            "type" : "number",
            "description" : "The usd balance calculated to be used for the purchase"
          },
          "satsBalancePaid" : {
            "required" : [ "toUInt64" ],
            "type" : "number",
            "description" : "The sats balance calculated to be used for the purchase"
          },
          "satsBackPercentage" : {
            "type" : "number",
            "description" : "The sats back percentage for the product"
          },
          "bitcoinPrice" : {
            "type" : "number",
            "description" : "The Bitcoin price used for the quote"
          },
          "balanceSpendable" : {
            "type" : "boolean",
            "description" : "Whether the user can spend from balance for this order"
          }
        },
        "description" : "A quote for a gift card"
      },
      "SwapStatusResponse" : {
        "required" : [ "amount", "feeAmount", "fees", "id", "pair", "payment", "payoutAmount", "status" ],
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "The unique id of the swap"
          },
          "pair" : {
            "$ref" : "#/components/schemas/SwapPair"
          },
          "amount" : {
            "$ref" : "#/components/schemas/Amount"
          },
          "feeAmount" : {
            "$ref" : "#/components/schemas/Amount"
          },
          "fees" : {
            "$ref" : "#/components/schemas/SwapFees"
          },
          "payoutAmount" : {
            "$ref" : "#/components/schemas/Amount"
          },
          "status" : {
            "type" : "string",
            "description" : "A status indicator for tracking multi step operations",
            "enum" : [ "created", "pending", "processing", "completed", "failed" ]
          },
          "failureReason" : {
            "type" : "string",
            "description" : "In case of swap failure the optional reason or error message"
          },
          "payment" : {
            "type" : "object",
            "description" : "The payment options required to pay the input of this swap",
            "oneOf" : [ {
              "$ref" : "#/components/schemas/LightningPaymentParams"
            }, {
              "$ref" : "#/components/schemas/OnChainPaymentParams"
            }, {
              "$ref" : "#/components/schemas/UnifiedBitcoinPaymentParams"
            } ]
          },
          "paidTransactionInfo" : {
            "type" : "string",
            "description" : "The transaction info for the payment input (eg. onChain txId)"
          },
          "validUntil" : {
            "type" : "integer",
            "description" : "The unix timestamp in seconds when this swap will be considered expired. After this time the swap will be marked as failed on payment arrival.",
            "format" : "int64"
          },
          "payoutResult" : {
            "$ref" : "#/components/schemas/SendPaymentResult"
          },
          "refundInfo" : {
            "$ref" : "#/components/schemas/SwapRefundInfo"
          }
        },
        "description" : "Details and status of an existing swap"
      },
      "CreateSwapRequest" : {
        "required" : [ "amount", "pair", "parameters" ],
        "type" : "object",
        "properties" : {
          "pair" : {
            "$ref" : "#/components/schemas/SwapPair"
          },
          "amount" : {
            "$ref" : "#/components/schemas/Amount"
          },
          "isPayoutAmount" : {
            "type" : "boolean",
            "description" : "Whether the amount is the desired payout amount otherwise the amount will be the pay amount",
            "default" : false
          },
          "parameters" : {
            "required" : [ "underlying" ],
            "type" : "object",
            "description" : "Additional parameters required for this specific swap",
            "oneOf" : [ {
              "$ref" : "#/components/schemas/LightningPayout"
            }, {
              "$ref" : "#/components/schemas/OnChainPayout"
            } ]
          },
          "webhook" : {
            "$ref" : "#/components/schemas/WebhookNotificationInfo"
          },
          "email" : {
            "required" : [ "domain", "lnurlp", "mailbox", "obfuscated", "value" ],
            "type" : "string",
            "description" : "An optional contact email address to relate support to"
          }
        },
        "description" : "Parameters required to create a swap for the given pair"
      },
      "InvoiceStatusRequest" : {
        "type" : "object",
        "properties" : {
          "invoice" : {
            "type" : "string",
            "description" : "The Bolt11 Lightning invoice to get the status of"
          }
        },
        "description" : "Request to get the status of an invoice paid with a lightning payment"
      },
      "OrganizationUser" : {
        "required" : [ "id", "permissions" ],
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "integer",
            "description" : "The unique id of the user",
            "format" : "int64",
            "example" : 1234
          },
          "permissions" : {
            "uniqueItems" : true,
            "type" : "array",
            "description" : "The set of permissions granted to the user",
            "items" : {
              "type" : "string",
              "description" : "A permission granted to an organization user",
              "example" : "credentials",
              "enum" : [ "credentials", "users", "admin", "read" ]
            }
          },
          "username" : {
            "type" : "string",
            "description" : "The username of the user",
            "example" : "johndoe"
          },
          "email" : {
            "type" : "string",
            "description" : "The email of the user",
            "example" : "johndoe@example.com"
          }
        },
        "description" : "Details of an organization user"
      },
      "FutureSeqUserWithdrawal" : {
        "required" : [ "completed" ],
        "type" : "object",
        "properties" : {
          "completed" : {
            "type" : "boolean"
          }
        }
      },
      "MilliSatoshis" : {
        "type" : "object"
      },
      "CreateInvoiceRequest" : {
        "required" : [ "cardValue", "productId", "quantity", "useSatsBal", "useUsdBal" ],
        "type" : "object",
        "properties" : {
          "productId" : {
            "type" : "string",
            "description" : "The product id of the gift card to purchase",
            "example" : "542345_amazon"
          },
          "cardValue" : {
            "type" : "number"
          },
          "quantity" : {
            "type" : "integer",
            "description" : "The quantity of gift cards to purchase",
            "format" : "int32",
            "example" : 1
          },
          "useUsdBalance" : {
            "type" : "boolean",
            "description" : "Whether to use as much as possible from the user's USD balance to purchase the gift card",
            "writeOnly" : true,
            "example" : true,
            "default" : false
          },
          "useSatsBalance" : {
            "type" : "boolean",
            "description" : "Whether to use as much as possible from the user's sats balance to purchase the gift card",
            "writeOnly" : true,
            "example" : true,
            "default" : false
          },
          "label" : {
            "type" : "string",
            "description" : "Allows the user to specify a label for the gift card purchase",
            "example" : "For holidays"
          },
          "giftPersonalization" : {
            "$ref" : "#/components/schemas/GiftPersonalization"
          }
        },
        "description" : "Request to create an invoice for a gift card purchase"
      },
      "KycProvider" : {
        "required" : [ "name" ],
        "type" : "object",
        "properties" : {
          "name" : {
            "type" : "string"
          }
        }
      },
      "OnChainPayoutOffer" : {
        "required" : [ "priority" ],
        "type" : "object",
        "properties" : {
          "priority" : {
            "type" : "string",
            "description" : "A Bitcoin on-chain transaction priority",
            "enum" : [ "High", "Medium", "Low" ]
          }
        },
        "description" : "Params to receive a swap offer for an OnChain payout"
      },
      "BitcoinRedeemResponse" : {
        "type" : "object",
        "properties" : {
          "transactionId" : {
            "type" : "string",
            "description" : "The transaction id if the withdrawal was executed instantly on chain"
          },
          "balanceAdded" : {
            "required" : [ "toUInt64" ],
            "type" : "integer",
            "description" : "The amount that was added to the user's balance if the withdrawal was executed to balance",
            "format" : "int64"
          },
          "miscActivity" : {
            "$ref" : "#/components/schemas/MiscActivity"
          },
          "batchWithdrawalId" : {
            "type" : "integer",
            "description" : "The id of the queued withdrawal if the withdrawal was queued for batched on chain withdrawal",
            "format" : "int64"
          }
        },
        "description" : "Result of a BTC gift card redemption"
      },
      "OrganizationCredential" : {
        "required" : [ "apiKey", "name" ],
        "type" : "object",
        "properties" : {
          "name" : {
            "type" : "string",
            "description" : "The name of the api credentials",
            "example" : "dev-credentials"
          },
          "apiKey" : {
            "type" : "string",
            "description" : "The api key of the credentials",
            "example" : "asdf1234ASDF"
          }
        },
        "description" : "Organization api credentials"
      },
      "SwapRefundInfo" : {
        "required" : [ "refundStatus" ],
        "type" : "object",
        "properties" : {
          "refundStatus" : {
            "type" : "string",
            "description" : "A status indicator for tracking multi step operations",
            "enum" : [ "created", "pending", "processing", "completed", "failed" ]
          },
          "payoutParams" : {
            "$ref" : "#/components/schemas/PayoutParams"
          },
          "refundAmount" : {
            "$ref" : "#/components/schemas/Amount"
          },
          "feeAmount" : {
            "$ref" : "#/components/schemas/Amount"
          },
          "payoutResult" : {
            "$ref" : "#/components/schemas/SendPaymentResult"
          },
          "refundReason" : {
            "type" : "string",
            "description" : "The reason why there is a refund",
            "enum" : [ "overpaid", "underpaid", "failed", "unknown" ]
          }
        },
        "description" : "The swap refund information"
      },
      "SwapRefundRequest" : {
        "required" : [ "parameters", "swapId" ],
        "type" : "object",
        "properties" : {
          "swapId" : {
            "type" : "string",
            "description" : "The id of the swap to refund"
          },
          "parameters" : {
            "required" : [ "underlying" ],
            "type" : "object",
            "description" : "Payout parameters required to execute the refund (Lightning or OnChain)",
            "oneOf" : [ {
              "$ref" : "#/components/schemas/LightningPayout"
            }, {
              "$ref" : "#/components/schemas/OnChainPayout"
            } ]
          }
        },
        "description" : "Parameters required to refund a failed or overpaid swap"
      },
      "SwapOfferResponse" : {
        "required" : [ "amount", "feeAmount", "fees", "pair" ],
        "type" : "object",
        "properties" : {
          "pair" : {
            "$ref" : "#/components/schemas/SwapPair"
          },
          "amount" : {
            "$ref" : "#/components/schemas/Amount"
          },
          "feeAmount" : {
            "$ref" : "#/components/schemas/Amount"
          },
          "fees" : {
            "$ref" : "#/components/schemas/SwapFees"
          },
          "payoutAmount" : {
            "$ref" : "#/components/schemas/Amount"
          },
          "feeOption" : {
            "type" : "array",
            "description" : "Fee options if the swap requires a user selected option",
            "items" : {
              "$ref" : "#/components/schemas/FeeOption"
            }
          },
          "validFor" : {
            "type" : "integer",
            "description" : "The time in seconds a created swap will be valid for.",
            "format" : "int64"
          }
        },
        "description" : "A swap offer with fee estimates and options"
      },
      "AmountConstraints" : {
        "required" : [ "currency", "max", "min" ],
        "type" : "object",
        "properties" : {
          "currency" : {
            "type" : "string",
            "description" : "The amount currency",
            "example" : "BTC"
          },
          "min" : {
            "type" : "number",
            "description" : "The min amount to be valid",
            "format" : "double",
            "example" : 0.01
          },
          "max" : {
            "type" : "number",
            "description" : "The max amount to be valid",
            "format" : "double",
            "example" : 0.1
          },
          "fixed" : {
            "type" : "array",
            "items" : {
              "type" : "number",
              "format" : "double"
            }
          }
        },
        "description" : "Bounds for a currency amount to be valid"
      },
      "LUD22PayoutOption" : {
        "required" : [ "id", "logourl", "name", "requiredFields" ],
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string"
          },
          "name" : {
            "type" : "string"
          },
          "logourl" : {
            "type" : "string"
          },
          "requiredFields" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/LUD22RequiredField"
            }
          }
        },
        "description" : "An transaction payment option for sending money to a recipient.",
        "example" : {
          "id" : "clabe",
          "name" : "Clabe Number",
          "logourl" : "https://cdn.thebitcoincompany.com/remittance/clabe.png",
          "requiredFields" : [ {
            "name" : "clabe",
            "datatype" : "string"
          } ]
        }
      },
      "OrganizationUserRequest" : {
        "required" : [ "permissions", "userId" ],
        "type" : "object",
        "properties" : {
          "userId" : {
            "type" : "integer",
            "description" : "The unique id of the user",
            "format" : "int64",
            "example" : 1234
          },
          "permissions" : {
            "uniqueItems" : true,
            "type" : "array",
            "description" : "The set of permissions granted to the user",
            "example" : "users",
            "items" : {
              "type" : "string",
              "description" : "A permission granted to an organization user",
              "example" : "credentials",
              "enum" : [ "credentials", "users", "admin", "read" ]
            }
          }
        },
        "description" : "Request to create an organization user. User with id must already exist."
      },
      "LUD22PayoutOptionsResponse" : {
        "required" : [ "callback", "metadata", "tag" ],
        "type" : "object",
        "properties" : {
          "callback" : {
            "type" : "string"
          },
          "tag" : {
            "type" : "string"
          },
          "maxSendable" : {
            "type" : "integer",
            "description" : "The maximum amount that can be sent in MilliSatoshis",
            "format" : "int64"
          },
          "minSendable" : {
            "type" : "integer",
            "description" : "The minimum amount that must be sent in MilliSatoshis",
            "format" : "int64"
          },
          "metadata" : {
            "type" : "string"
          },
          "supportedPayoutOptions" : {
            "type" : "array",
            "description" : "The list of supported payout options for the currency",
            "items" : {
              "$ref" : "#/components/schemas/LUD22PayoutOption"
            }
          }
        },
        "description" : "Returns the list of supported payout options for a given currency.",
        "example" : {
          "callback" : "https://api.thebitcoincompany.com/remittance/invoice",
          "tag" : "sendGloballyRequest",
          "maxSendable" : 100000000,
          "minSendable" : 100000,
          "metadata" : "",
          "supportedPayoutOptions" : [ {
            "id" : "clabe",
            "name" : "Clabe Number",
            "logourl" : "https://cdn.thebitcoincompany.com/remittance/clabe.png",
            "requiredFields" : [ {
              "name" : "clabe",
              "datatype" : "string"
            } ]
          }, {
            "id" : "phoneNumber",
            "name" : "Phone Number",
            "logourl" : "https://cdn.thebitcoincompany.com/remittance/clabe_phone.png",
            "requiredFields" : [ {
              "name" : "phoneNumber",
              "datatype" : "string"
            } ]
          } ]
        }
      },
      "TBCUserActivityType" : {
        "type" : "object"
      },
      "CreateUserRequest" : {
        "required" : [ "email", "password" ],
        "type" : "object",
        "properties" : {
          "email" : {
            "required" : [ "domain", "lnurlp", "mailbox", "obfuscated", "value" ],
            "type" : "string",
            "description" : "The email address of the user"
          },
          "password" : {
            "type" : "string",
            "description" : "The password of the user"
          },
          "referralCode" : {
            "type" : "string",
            "description" : "An optional referral code"
          }
        },
        "description" : "A request to create a new user"
      },
      "NostrIdentity" : {
        "type" : "object",
        "description" : "The Nostr npub of the gift card recipient"
      },
      "Domain" : {
        "required" : [ "value" ],
        "type" : "object",
        "properties" : {
          "value" : {
            "type" : "string"
          }
        }
      },
      "OrganizationSpreadAccountRequest" : {
        "required" : [ "spread", "userId" ],
        "type" : "object",
        "properties" : {
          "userId" : {
            "type" : "integer",
            "description" : "The unique id of the user to set as the spread account",
            "format" : "int64",
            "example" : 1234
          },
          "spread" : {
            "type" : "number",
            "description" : "The spread amount",
            "format" : "double",
            "example" : 0.5
          }
        },
        "description" : "Request to set an organization spread account user"
      },
      "SendAmount" : {
        "type" : "object",
        "properties" : {
          "amount" : {
            "type" : "number"
          },
          "currency" : {
            "type" : "string",
            "example" : "USD"
          }
        },
        "description" : "An amount of money in a specific currency",
        "example" : {
          "amount" : 5.5,
          "currency" : "USD"
        }
      },
      "WebhookSubscribeRequest" : {
        "required" : [ "url" ],
        "type" : "object",
        "properties" : {
          "url" : {
            "type" : "string"
          }
        }
      },
      "CreateSwapResponse" : {
        "required" : [ "amount", "feeAmount", "fees", "id", "pair", "payment", "status" ],
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "The unique id of the swap"
          },
          "pair" : {
            "$ref" : "#/components/schemas/SwapPair"
          },
          "amount" : {
            "$ref" : "#/components/schemas/Amount"
          },
          "feeAmount" : {
            "$ref" : "#/components/schemas/Amount"
          },
          "fees" : {
            "$ref" : "#/components/schemas/SwapFees"
          },
          "status" : {
            "type" : "string",
            "description" : "A status indicator for tracking multi step operations",
            "enum" : [ "created", "pending", "processing", "completed", "failed" ]
          },
          "payment" : {
            "type" : "object",
            "description" : "The payment options required to pay the input of this swap",
            "oneOf" : [ {
              "$ref" : "#/components/schemas/LightningPaymentParams"
            }, {
              "$ref" : "#/components/schemas/OnChainPaymentParams"
            }, {
              "$ref" : "#/components/schemas/UnifiedBitcoinPaymentParams"
            } ]
          },
          "validUntil" : {
            "type" : "integer",
            "description" : "The unix timestamp in seconds when this swap will be considered expired. After this time the swap will be marked as failed on payment arrival.",
            "format" : "int64"
          }
        },
        "description" : "A created swap with id and payment information"
      },
      "WithdrawalFee" : {
        "required" : [ "feeInfo" ],
        "type" : "object",
        "properties" : {
          "feeInfo" : {
            "$ref" : "#/components/schemas/FeeInfo"
          },
          "costEstimate" : {
            "type" : "number",
            "description" : "The total cost estimate for the on chain withdrawal in USD",
            "format" : "double"
          }
        },
        "description" : "Information about the withdrawal fee and cost estimate for a withdrawal"
      },
      "LUD22PayoutRequest" : {
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "The UUID of the remittance transaction to be initialized. Must be globally unique."
          },
          "amount" : {
            "type" : "number",
            "description" : "The amount of money to be sent in given currency.",
            "format" : "double"
          },
          "currency" : {
            "type" : "string",
            "description" : "The currency of the amount to be sent. Either BTC or targetCurrency must be specified."
          },
          "targetCurrency" : {
            "type" : "string",
            "description" : "The currency of the payout option as received by the receiver."
          },
          "price" : {
            "type" : "number",
            "description" : "The price paid to buy the Bitcoin in the source currency.",
            "format" : "double"
          },
          "webhook" : {
            "type" : "string",
            "description" : "The webhook to be called when the transaction status changes."
          },
          "payoutOption" : {
            "$ref" : "#/components/schemas/PayoutParams"
          },
          "memo" : {
            "type" : "string",
            "description" : "An optional transaction memo to be included in the transaction description. The memo transmission is not guaranteed and depends on the receivers account."
          }
        },
        "description" : "A request to create an invoice for sending money to a recipient.",
        "example" : {
          "id" : "1234",
          "amount" : 0.1,
          "currency" : "BTC",
          "targetCurrency" : "MXN",
          "webhook" : "https://example.com/webhook",
          "payoutOption" : {
            "id" : "clabe",
            "requiredFields" : [ {
              "name" : "clabe",
              "value" : "123456789012345678"
            } ]
          }
        }
      },
      "FormElementSchema" : {
        "required" : [ "baseType", "label", "required", "valueType" ],
        "type" : "object",
        "properties" : {
          "label" : {
            "type" : "string",
            "description" : "A translation key for a form label",
            "example" : "bitcoin_address"
          },
          "valueType" : {
            "type" : "string",
            "description" : "An enum type of a form value which can have validation associated",
            "example" : "BitcoinAddress",
            "enum" : [ "String", "Number", "Boolean", "Object", "Array", "BitcoinAddress", "CurrencyAmount", "OnChainPriority", "BitcoinWithdrawalString", "LightningWithdrawalString" ]
          },
          "baseType" : {
            "type" : "string",
            "description" : "An enum type of a form value which can have validation associated",
            "example" : "BitcoinAddress",
            "enum" : [ "String", "Number", "Boolean", "Object", "Array", "BitcoinAddress", "CurrencyAmount", "OnChainPriority", "BitcoinWithdrawalString", "LightningWithdrawalString" ]
          },
          "required" : {
            "type" : "boolean",
            "description" : "Whether this element is required",
            "example" : true
          },
          "defaultValue" : {
            "$ref" : "#/components/schemas/JsValue"
          },
          "options" : {
            "type" : "array",
            "description" : "Optional selectable server side options if options need selection",
            "items" : {
              "$ref" : "#/components/schemas/SelectOption"
            }
          }
        },
        "description" : "A form element schema that describes a single input requirement"
      },
      "FeeInfo" : {
        "type" : "object",
        "properties" : {
          "priority" : {
            "required" : [ "name" ],
            "type" : "string",
            "description" : "The transaction priority"
          },
          "fee" : {
            "required" : [ "toUInt64" ],
            "type" : "integer",
            "description" : "The sats per vByte",
            "format" : "int64"
          }
        },
        "description" : "OnChain fee estimate for priority"
      },
      "RemittanceOffer" : {
        "required" : [ "feePercent", "invoiceAmount", "recipientAmount", "usdExchangeRate" ],
        "type" : "object",
        "properties" : {
          "usdExchangeRate" : {
            "type" : "number"
          },
          "sourceBtcExchangeRate" : {
            "type" : "number"
          },
          "targetBtcExchangeRate" : {
            "type" : "number"
          },
          "recipientAmount" : {
            "$ref" : "#/components/schemas/SendAmount"
          },
          "invoiceAmount" : {
            "$ref" : "#/components/schemas/SendAmount"
          },
          "feePercent" : {
            "type" : "number"
          }
        }
      },
      "LUD22FieldValue" : {
        "required" : [ "name", "value" ],
        "type" : "object",
        "properties" : {
          "name" : {
            "type" : "string"
          },
          "value" : {
            "type" : "string"
          }
        },
        "description" : "A name value pair for a payout option parameter.",
        "example" : {
          "name" : "clabe",
          "value" : "123456789012345678"
        }
      },
      "ChangePasswordRequest" : {
        "type" : "object",
        "properties" : {
          "oldPassword" : {
            "type" : "string",
            "description" : "The old password of the user"
          },
          "newPassword" : {
            "type" : "string",
            "description" : "The new password of the user"
          }
        },
        "description" : "A request to change a user's password"
      },
      "CheckWithdrawalAddressReuseRequest" : {
        "type" : "object",
        "properties" : {
          "address" : {
            "type" : "string",
            "description" : "The address to check"
          }
        },
        "description" : "Check if an address has already been used for a withdrawal"
      },
      "RemittanceSpreadAccount" : {
        "required" : [ "email", "id", "spread", "username" ],
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "integer",
            "description" : "The unique id of the spread user account",
            "format" : "int64",
            "example" : 1234
          },
          "spread" : {
            "type" : "number",
            "description" : "The spread amount",
            "format" : "double",
            "example" : 0.5
          },
          "username" : {
            "type" : "string",
            "description" : "The username of the spread account user",
            "example" : "johndoe"
          },
          "email" : {
            "type" : "string",
            "description" : "The email of the spread account user",
            "example" : "johndoe@example.com"
          }
        },
        "description" : "Remittance spread account"
      },
      "PurchasedProduct" : {
        "required" : [ "amountFiat", "amountSats", "archived", "btcPrice", "cardType", "currency", "date", "donationSats", "expireTime", "id", "paymentType", "product", "quantity", "satsBack", "satsBackPercentage", "satsBalancePaid", "status", "totalCostFiat", "usdBalancePaid", "userId", "uuid" ],
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "integer",
            "description" : "The id of the gift card order",
            "format" : "int64",
            "example" : 123456
          },
          "userId" : {
            "type" : "integer",
            "description" : "The id of the user who purchased the gift card",
            "format" : "int64",
            "example" : 123456
          },
          "product" : {
            "$ref" : "#/components/schemas/Product"
          },
          "date" : {
            "type" : "integer",
            "description" : "The date the gift card was purchased",
            "format" : "int64"
          },
          "quantity" : {
            "type" : "integer",
            "description" : "The quantity of gift cards purchased",
            "format" : "int32"
          },
          "currency" : {
            "type" : "string",
            "description" : "The currency of the gift card"
          },
          "totalCostFiat" : {
            "type" : "number",
            "description" : "The total cost of the gift card in fiat",
            "format" : "double"
          },
          "amountFiat" : {
            "type" : "number",
            "description" : "The amount of fiat paid for the gift card",
            "format" : "double"
          },
          "amountSats" : {
            "required" : [ "toUInt64" ],
            "type" : "integer",
            "description" : "The amount of satoshis paid for the gift card",
            "format" : "int64"
          },
          "satsBack" : {
            "required" : [ "toUInt64" ],
            "type" : "integer",
            "description" : "The amount of satoshis the user earns as reward",
            "format" : "int64"
          },
          "satsBackPercentage" : {
            "type" : "number",
            "description" : "The percentage of the gift card amount the user earns as reward",
            "format" : "double"
          },
          "donationSats" : {
            "required" : [ "toUInt64" ],
            "type" : "integer",
            "description" : "The amount of satoshis the user donates to open sats projects",
            "format" : "int64"
          },
          "usdBalancePaid" : {
            "type" : "number",
            "description" : "The amount of fiat paid from user balance for the gift card",
            "format" : "double"
          },
          "satsBalancePaid" : {
            "required" : [ "toUInt64" ],
            "type" : "integer",
            "description" : "The amount of sats paid from user balance for the gift card",
            "format" : "int64"
          },
          "amountPaid" : {
            "required" : [ "toUInt64" ],
            "type" : "integer",
            "description" : "The amount of sats paid",
            "format" : "int64"
          },
          "usdBalanceGranted" : {
            "type" : "number",
            "description" : "The amount of fiat granted as reward or overpay",
            "format" : "double"
          },
          "exchangeFees" : {
            "type" : "number",
            "description" : "The amount of fiat paid in exchange fees",
            "format" : "double"
          },
          "btcPrice" : {
            "type" : "number",
            "description" : "The price of bitcoin in fiat",
            "format" : "double"
          },
          "archived" : {
            "type" : "boolean",
            "description" : "Whether the gift card is archived"
          },
          "status" : {
            "type" : "string",
            "description" : "The status of the invoice",
            "enum" : [ "Unpaid", "Underpaid", "Confirming", "Expired", "Refunded", "Disputed", "ClawedBack", "Pending", "Completed", "Cancelled", "Sent", "Claimed", "SentToFulfillment", "Shipped" ]
          },
          "sentTo" : {
            "type" : "string",
            "description" : "The address where the gift card was sent to"
          },
          "giftedTo" : {
            "type" : "string",
            "description" : "The email the gift card was gifted to"
          },
          "giftedOn" : {
            "type" : "string",
            "description" : "The name to whom the gift card was gifted to"
          },
          "label" : {
            "type" : "string",
            "description" : "The label of the purchased gift card"
          },
          "paymentType" : {
            "type" : "string",
            "description" : "The payment type used to purchase the gift card"
          },
          "delivery" : {
            "$ref" : "#/components/schemas/DeliveryAddress"
          },
          "phoneNumber" : {
            "type" : "string",
            "description" : "The phone number of the top up if phone top up"
          },
          "claimData" : {
            "$ref" : "#/components/schemas/GiftCardClaimData"
          },
          "cardType" : {
            "type" : "string",
            "description" : "The type of gift card"
          },
          "externalId" : {
            "type" : "string",
            "description" : "The external id of the gift card"
          },
          "terms" : {
            "type" : "string",
            "description" : "The terms of the gift card"
          },
          "redemptionInstructions" : {
            "type" : "string",
            "description" : "The redemption instructions of the gift card"
          },
          "txId" : {
            "required" : [ "bytes", "hex" ],
            "type" : "string",
            "description" : "The transaction id of the gift card if paid in Bitcoin on chain"
          },
          "expireTime" : {
            "type" : "integer",
            "description" : "The expiration time of the gift card",
            "format" : "int64"
          },
          "uuid" : {
            "type" : "string",
            "description" : "The uuid of the gift card order",
            "format" : "uuid"
          },
          "creditCard" : {
            "$ref" : "#/components/schemas/CreditCard"
          }
        },
        "description" : "A product purchased by a user"
      },
      "SelectOption" : {
        "required" : [ "label", "value" ],
        "type" : "object",
        "properties" : {
          "value" : {
            "type" : "string"
          },
          "label" : {
            "type" : "string"
          }
        },
        "description" : "Optional selectable server side options if options need selection"
      },
      "SwapFees" : {
        "required" : [ "swapFee", "totalFee", "transactionFee" ],
        "type" : "object",
        "properties" : {
          "swapFee" : {
            "$ref" : "#/components/schemas/Amount"
          },
          "transactionFee" : {
            "$ref" : "#/components/schemas/Amount"
          },
          "totalFee" : {
            "$ref" : "#/components/schemas/Amount"
          }
        },
        "description" : "A breakdown of the fees for a swap"
      },
      "RemittanceInfo" : {
        "required" : [ "rates", "spreadAccount" ],
        "type" : "object",
        "properties" : {
          "rates" : {
            "type" : "array",
            "description" : "The remittance rate per currency of the organization",
            "items" : {
              "$ref" : "#/components/schemas/RemittanceRate"
            }
          },
          "spreadAccount" : {
            "$ref" : "#/components/schemas/RemittanceSpreadAccount"
          }
        },
        "description" : "Remittance information of an organization"
      },
      "OnChainPaymentParams" : {
        "type" : "object",
        "properties" : {
          "type" : {
            "type" : "string",
            "description" : "A payment type",
            "enum" : [ "Lightning", "Bitcoin", "On-chain", "User Balance", "Credit Card", "ApplePay", "GooglePay", "Liquid", "USDT", "Fiat" ]
          },
          "currency" : {
            "type" : "string",
            "description" : "The currency for the payment amount"
          },
          "amount" : {
            "type" : "number",
            "description" : "The amount to pay"
          },
          "address" : {
            "type" : "string",
            "description" : "The Bitcoin on-chain address to send to"
          },
          "currentBlockHeight" : {
            "type" : "number",
            "description" : "The current block height"
          }
        }
      },
      "ApiCredentialsCreateResult" : {
        "required" : [ "apiKey", "apiSecret", "name" ],
        "type" : "object",
        "properties" : {
          "name" : {
            "type" : "string",
            "description" : "The name of the api credentials",
            "example" : "dev-credentials"
          },
          "apiKey" : {
            "type" : "string",
            "description" : "The api key of the credentials",
            "example" : "asdf1234ASDF"
          },
          "apiSecret" : {
            "type" : "string",
            "description" : "The api secret of the api credentials",
            "example" : "Asdf1234aSDf4123A1b2"
          }
        },
        "description" : "Response of creating organization api credentials"
      },
      "RemittanceRate" : {
        "required" : [ "currency", "rate" ],
        "type" : "object",
        "properties" : {
          "currency" : {
            "$ref" : "#/components/schemas/Currency"
          },
          "rate" : {
            "type" : "number",
            "description" : "The rate of the currency",
            "format" : "double",
            "example" : 0.5
          }
        },
        "description" : "Remittance rate pair"
      },
      "FeeOption" : {
        "type" : "object",
        "properties" : {
          "name" : {
            "type" : "string",
            "description" : "The name of the option"
          },
          "fee" : {
            "$ref" : "#/components/schemas/Fee"
          },
          "selected" : {
            "type" : "boolean",
            "description" : "Whether the option is currently selected",
            "default" : false
          }
        },
        "description" : "A form option for a fee selection"
      },
      "MiscActivity" : {
        "required" : [ "activityType", "date", "id", "miscActivityType" ],
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "integer",
            "format" : "int64"
          },
          "miscActivityType" : {
            "required" : [ "displayString" ],
            "type" : "string",
            "description" : "The type of miscellaneous activity"
          },
          "amount" : {
            "required" : [ "toUInt64" ],
            "type" : "integer",
            "description" : "Amount of Sats involved in the activity",
            "format" : "int64"
          },
          "amountUsd" : {
            "type" : "integer",
            "description" : "Amount of USD involved in the activity",
            "format" : "int64"
          },
          "date" : {
            "type" : "integer",
            "description" : "The date of the activity",
            "format" : "int64"
          },
          "activityType" : {
            "$ref" : "#/components/schemas/TBCUserActivityType"
          }
        },
        "description" : "A miscellaneous activity"
      },
      "ApiCredentialsCreateRequest" : {
        "required" : [ "name", "organizationId" ],
        "type" : "object",
        "properties" : {
          "organizationId" : {
            "type" : "string",
            "description" : "The unique id of the organization",
            "example" : "Tbc"
          },
          "name" : {
            "type" : "string",
            "description" : "The name of the api credentials",
            "example" : "dev-credentials"
          }
        },
        "description" : "Request to create organization api credentials"
      },
      "CreditCard" : {
        "required" : [ "expiryMonth", "expiryYear", "id", "isPrimary", "last4" ],
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "integer",
            "description" : "The id of the credit card.",
            "format" : "int64",
            "example" : 123456
          },
          "isPrimary" : {
            "type" : "boolean",
            "description" : "Whether the credit card is primary.",
            "example" : true
          },
          "last4" : {
            "type" : "string",
            "description" : "The last 4 digits of the credit card.",
            "example" : "1234"
          },
          "expiryMonth" : {
            "type" : "integer",
            "description" : "The expiry month of the credit card.",
            "format" : "int32",
            "example" : 12
          },
          "expiryYear" : {
            "type" : "integer",
            "description" : "The expiry year of the credit card.",
            "format" : "int32",
            "example" : 2021
          },
          "scheme" : {
            "type" : "string",
            "description" : "The scheme of the credit card.",
            "example" : "Visa"
          }
        },
        "description" : "A credit card."
      },
      "BigDecimal" : {
        "type" : "object",
        "properties" : {
          "bigDecimal" : {
            "type" : "number"
          },
          "mc" : {
            "required" : [ "precision", "roundingMode" ],
            "type" : "object",
            "properties" : {
              "precision" : {
                "type" : "integer",
                "format" : "int32"
              },
              "roundingMode" : {
                "type" : "string",
                "enum" : [ "UP", "DOWN", "CEILING", "FLOOR", "HALF_UP", "HALF_DOWN", "HALF_EVEN", "UNNECESSARY" ]
              }
            }
          },
          "computedHashCode" : {
            "type" : "integer",
            "format" : "int32",
            "writeOnly" : true
          },
          "scale" : {
            "type" : "number",
            "writeOnly" : true
          },
          "validLong" : {
            "type" : "boolean"
          },
          "validByte" : {
            "type" : "boolean"
          },
          "validShort" : {
            "type" : "boolean"
          },
          "validChar" : {
            "type" : "boolean"
          },
          "validInt" : {
            "type" : "boolean"
          },
          "whole" : {
            "type" : "boolean"
          },
          "decimalDouble" : {
            "type" : "boolean"
          },
          "decimalFloat" : {
            "type" : "boolean"
          },
          "binaryDouble" : {
            "type" : "boolean"
          },
          "binaryFloat" : {
            "type" : "boolean"
          },
          "exactDouble" : {
            "type" : "boolean"
          },
          "exactFloat" : {
            "type" : "boolean"
          }
        },
        "description" : "The commission that will be charged by the reseller for the gift card in USD"
      },
      "SwapPair" : {
        "required" : [ "source", "target" ],
        "type" : "object",
        "properties" : {
          "source" : {
            "type" : "string",
            "description" : "A swap channel that can either be input or output",
            "example" : "BtcOnChain",
            "enum" : [ "BtcOnChain", "BtcLightning", "Bitcoin" ]
          },
          "target" : {
            "type" : "string",
            "description" : "A swap channel that can either be input or output",
            "example" : "BtcLightning",
            "enum" : [ "BtcOnChain", "BtcLightning", "Bitcoin" ]
          }
        },
        "description" : "A pair of swap input to some swap output"
      },
      "FormSchema" : {
        "required" : [ "elements", "name" ],
        "type" : "object",
        "properties" : {
          "name" : {
            "type" : "string",
            "description" : "Unique name of the form",
            "example" : "OnChainPayout"
          },
          "elements" : {
            "type" : "object",
            "additionalProperties" : {
              "$ref" : "#/components/schemas/FormElementSchema"
            },
            "description" : "Pairs of named elements in this form schema. The name in the map will be the param name in the request."
          }
        },
        "description" : "A form schema defining a set of inputs required for some server action"
      },
      "LUD22DestExchangeData" : {
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "The UUID of the remittance transaction. Will be the same as UUID in incoming payout request."
          },
          "currency" : {
            "type" : "string",
            "description" : "The currency of the payout option as received by the receiver."
          },
          "price" : {
            "type" : "number",
            "description" : "The BTC exchange rate for the currency.",
            "format" : "double"
          },
          "recipientAmount" : {
            "type" : "number"
          },
          "expiry" : {
            "type" : "integer",
            "description" : "The expiry time of the invoice in seconds since epoch.",
            "format" : "int64"
          },
          "pr" : {
            "type" : "string",
            "description" : "The LN (Bolt11) invoice to be paid by the sender."
          }
        },
        "description" : "The details for the target exchange transaction.",
        "example" : {
          "id" : "1234",
          "currency" : "MXN",
          "price" : 100000,
          "expiry" : 123456789,
          "pr" : "lnbc1234567890"
        }
      },
      "USAState" : {
        "required" : [ "stateCode" ],
        "type" : "object",
        "properties" : {
          "stateCode" : {
            "type" : "string"
          }
        }
      },
      "OnChainPayout" : {
        "required" : [ "address", "priority" ],
        "type" : "object",
        "properties" : {
          "address" : {
            "type" : "string",
            "description" : "A valid Bitcoin address to send the payout to",
            "example" : "tb1p8enekh0cl32dgj0fhj5x3lh3efsqj7sfa54pv9d954h4qqj7ltgq7ne94e"
          },
          "priority" : {
            "type" : "string",
            "description" : "A Bitcoin on-chain transaction priority",
            "enum" : [ "High", "Medium", "Low" ]
          }
        },
        "description" : "Parameters required to create a Bitcoin on-chain payout"
      },
      "LUD22PayoutResponse" : {
        "type" : "object",
        "properties" : {
          "callback" : {
            "type" : "string",
            "description" : "Url to update the source exchange data (currently not in use)."
          },
          "destExchangeData" : {
            "$ref" : "#/components/schemas/LUD22DestExchangeData"
          }
        },
        "description" : "An invoice response to a payout request.",
        "example" : {
          "callback" : "https://api.thebitcoincompany.com/remittance/source-exchange",
          "destExchangeData" : {
            "id" : "1234",
            "currency" : "MXN",
            "price" : 100000,
            "expiry" : 123456789,
            "pr" : "lnbc1234567890"
          }
        }
      },
      "CreateUsdBalanceTopUpOrder" : {
        "required" : [ "amount" ],
        "type" : "object",
        "properties" : {
          "amount" : {
            "type" : "number"
          }
        },
        "description" : "A request to create a USD balance top up order."
      },
      "LUD22SelectOption" : {
        "required" : [ "name", "value" ],
        "type" : "object",
        "properties" : {
          "name" : {
            "type" : "string",
            "description" : "The display name of the option"
          },
          "value" : {
            "type" : "string",
            "description" : "The value to send with the request"
          }
        },
        "description" : "A select option for a required field.",
        "example" : {
          "name" : "Display Name",
          "value" : "value_to_send"
        }
      }
    },
    "securitySchemes" : {
      "apiToken" : {
        "type" : "http",
        "description" : "User JWT token valid for most API operations",
        "scheme" : "bearer",
        "bearerFormat" : "JWT"
      },
      "apiKey" : {
        "type" : "apiKey",
        "name" : "x-api-key",
        "in" : "header"
      },
      "apiSecret" : {
        "type" : "apiKey",
        "name" : "x-api-secret",
        "in" : "header"
      }
    }
  }
}