{"components":{"schemas":{"CardCategory":{"enum":["advertising","saas_software","shipping","cloud_computing","professional_services","airlines","books_and_newspapers","car_rental","car_services","charitable_donations","clothing","clubs_and_memberships","education","electronics","fees_and_financial_institutions","freight_moving_and_delivery_services","fuel_and_gas","general_merchandise","general_expenses","government_services","insurance","internet_and_phone","legal","lodging","medical","office_supplies_and_cleaning","other","parking","pet","restaurants","supermarkets_and_grocery_stores","taxes_and_tax_preparation","taxi_and_rideshare","travel_misc","utilities","entertainment"],"type":"string","x-enum-varnames":["CardCategoryAdvertising","CardCategorySaaSSoftware","CardCategoryShipping","CardCategoryCloudComputing","CardCategoryProfessionalServices","CardCategoryAirlines","CardCategoryBooksAndNewspapers","CardCategoryCarRental","CardCategoryCarServices","CardCategoryCharitableDonations","CardCategoryClothing","CardCategoryClubsAndMemberships","CardCategoryEducation","CardCategoryElectronics","CardCategoryFeesAndFinancialInstitutions","CardCategoryFreightMovingAndDeliveryServices","CardCategoryFuelAndGas","CardCategoryGeneralMerchandiseCard","CardCategoryGeneralExpensesCard","CardCategoryGovernmentServices","CardCategoryInsurance","CardCategoryInternetAndPhone","CardCategoryLegal","CardCategoryLodging","CardCategoryMedical","CardCategoryOfficeSuppliesAndCleaning","CardCategoryOther","CardCategoryParking","CardCategoryPet","CardCategoryRestaurants","CardCategorySupermarketsAndGroceryStores","CardCategoryTaxesAndTaxPreparation","CardCategoryTaxiAndRideshare","CardCategoryTravelMisc","CardCategoryUtilities","CardCategoryEntertainment"]},"CardFinancialEvent":{"properties":{"amount":{"description":"Amount. Always positive as amountDirection determines the sign","example":"100.00","type":"string","x-order":"0005"},"amountDirection":{"allOf":[{"$ref":"#/components/schemas/iso.AmountDirection"}],"description":"Amount direction","x-order":"0004"},"cardId":{"description":"Card id","example":"550e8400-e29b-41d4-a716-446655440000","format":"uuid","type":"string","x-order":"0003"},"category":{"allOf":[{"$ref":"#/components/schemas/dto.FinancialEventCategory"}],"description":"Category of the financial event","x-order":"0007"},"createdAt":{"description":"UTC time when the event was created","example":"2025-01-01T00:00:00Z","format":"date-time","type":"string","x-order":"0019"},"currency":{"description":"Currency code","example":"USD","type":"string","x-order":"0006"},"id":{"description":"Event identifier","example":"550e8400-e29b-41d4-a716-446655440000","format":"uuid","type":"string","x-order":"0001"},"isReversal":{"description":"Flag determining whether the event is a reversal","type":"boolean","x-order":"0009"},"isSuccess":{"description":"Flag determining whether the event is successful","type":"boolean","x-order":"0008"},"issues":{"description":"Issues related to the event. Error indicate transaction failure where as other types are more informational.","items":{"$ref":"#/components/schemas/dto.TransactionIssue"},"type":"array","x-order":"0010"},"mcc":{"description":"Merchant category code","example":"5411","type":"string","x-order":"0011"},"merchantCity":{"description":"Merchant city","example":"New York","type":"string","x-order":"0014"},"merchantCountry":{"description":"Merchant country","example":"US","type":"string","x-order":"0017"},"merchantName":{"description":"Merchant name","example":"Store Name","type":"string","x-order":"0012"},"merchantPostalCode":{"description":"Merchant postal code","example":"12345","type":"string","x-order":"0016"},"merchantState":{"description":"Merchant state","example":"CA","type":"string","x-order":"0015"},"merchantStreetAddress":{"description":"Merchant street address","example":"12 Main st","type":"string","x-order":"0013"},"merchantTaxId":{"description":"Merchant tax id","example":"201665019","type":"string","x-order":"0018"},"transactionId":{"description":"Transaction id. Used to group events for the same transaction.","example":"550e8400-e29b-41d4-a716-446655440000","format":"uuid","type":"string","x-order":"0002"}},"required":["amount","amountDirection","cardId","category","currency","id","isReversal","isSuccess","transactionId"],"type":"object"},"CardLimitType":{"enum":["daily","monthly","lifetime"],"type":"string","x-enum-varnames":["CardLimitTypeDaily","CardLimitTypeMonthly","CardLimitTypeLifetime"]},"CardStatus":{"enum":["active","frozen","archived"],"type":"string","x-enum-varnames":["CardStatusActive","CardStatusFrozen","CardStatusArchived"]},"CardType":{"enum":["single-use","recurring"],"type":"string","x-enum-varnames":["CardTypeSingleUse","CardTypeRecurring"]},"CreateCardRequest":{"properties":{"categories":{"description":"Card categories. Categories have specific MCC restrictions.","example":["ad-card"],"items":{"$ref":"#/components/schemas/CardCategory"},"type":"array","x-order":"0003"},"expiry":{"description":"Card expiry in YYYYMM format. Cannot be in the past. Earliest possible is current month. Generates random expiration if not provided.","example":"202512","type":"string","x-order":"0004"},"limit":{"allOf":[{"$ref":"#/components/schemas/card.CardLimit"}],"description":"Limit to set on card.","x-order":"0005"},"name":{"description":"Card name. Card name must be unique for cards created unless the previous card with the same name has been archived.","example":"adspend card meta","type":"string","x-order":"0001"},"type":{"allOf":[{"$ref":"#/components/schemas/CardType"}],"description":"Card type. Single-use can be used for a single transaction (exluding auths up to 5$). Recurring can be used for multiple transactions.","x-order":"0002"}},"required":["categories","limit","name","type"],"type":"object"},"CreateCardResponse":{"properties":{"id":{"description":"Card ID.","example":"550e8400-e29b-41d4-a716-446655440000","format":"uuid","type":"string","x-order":"0001"}},"required":["id"],"type":"object"},"ForbiddenErrorResponse":{"properties":{"code":{"example":"forbidden","type":"string","x-order":"0001"},"message":{"example":"access to this resource is not provided","type":"string","x-order":"0002"}},"required":["code"],"type":"object"},"GetCardEventsResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/CardFinancialEvent"},"type":"array","x-order":"0001"}},"required":["data"],"type":"object"},"GetCardResponse":{"properties":{"balance":{"description":"Current available balance on card.","example":"100.00","type":"string","x-order":"0009"},"categories":{"description":"Card categories. Categories have specific MCC restrictions.","example":["[advertising"," shipping]"],"items":{"$ref":"#/components/schemas/CardCategory"},"type":"array","x-order":"0005"},"category":{"description":"Deprecated category field, use 'categories' instead. If this field is returned, please use the UI to update the card category.","example":"advertising","type":"string","x-order":"0004"},"createdAt":{"description":"Card creation time.","example":"2025-01-01T00:00:00Z","format":"date-time","type":"string","x-order":"0010"},"id":{"description":"Card ID.","example":"550e8400-e29b-41d4-a716-446655440000","format":"uuid","type":"string","x-order":"0001"},"lastFour":{"description":"Last 4 digits of the card number.","example":"1214","type":"string","x-order":"0007"},"limit":{"allOf":[{"$ref":"#/components/schemas/card.CardLimit"}],"description":"Card limit.","x-order":"0008"},"name":{"description":"Card name. Card name must be unique for cards created unless the previous card with the same name has been archived.","example":"adspend card meta","type":"string","x-order":"0002"},"status":{"allOf":[{"$ref":"#/components/schemas/CardStatus"}],"description":"Card status.","x-order":"0006"},"type":{"allOf":[{"$ref":"#/components/schemas/CardType"}],"description":"Card type. Single-use can be used for a single transaction (exluding auths up to 5$). Recurring can be used for multiple transactions.","x-order":"0003"}},"required":["balance","categories","category","createdAt","id","lastFour","limit","name","status","type"],"type":"object"},"GetCardsResponseItem":{"properties":{"createdAt":{"description":"Card creation time.","example":"2025-01-01T00:00:00Z","format":"date-time","type":"string","x-order":"0006"},"id":{"description":"Card ID.","example":"550e8400-e29b-41d4-a716-446655440000","format":"uuid","type":"string","x-order":"0001"},"lastFour":{"description":"Last 4 digits of the card number.","example":"1214","type":"string","x-order":"0005"},"name":{"description":"Card name. Card name must be unique for cards created unless the previous card with the same name has been archived.","example":"adspend card meta","type":"string","x-order":"0002"},"status":{"allOf":[{"$ref":"#/components/schemas/CardStatus"}],"description":"Card status.","x-order":"0004"},"type":{"allOf":[{"$ref":"#/components/schemas/CardType"}],"description":"Card type. Single-use can be used for a single transaction (exluding auths up to 5$). Recurring can be used for multiple transactions.","x-order":"0003"}},"required":["createdAt","id","lastFour","name","status","type"],"type":"object"},"GetPaymentsResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Payment"},"type":"array","x-order":"0001"}},"required":["data"],"type":"object"},"GetSensitiveDetailsResponse":{"properties":{"details":{"oneOf":[{"$ref":"#/components/schemas/SensitiveDetailsAPI"}],"x-order":"0002"},"method":{"allOf":[{"$ref":"#/components/schemas/core_packages_public_api_lambda_card.SensitiveDetailsMethod"}],"x-order":"0001"}},"required":["details","method"],"type":"object"},"GetSettlementsResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Settlement"},"type":"array","x-order":"0001"}},"required":["data"],"type":"object"},"InternalServerErrorResponse":{"properties":{"code":{"example":"internal-server-error","type":"string","x-order":"0001"},"message":{"type":"string","x-order":"0002"}},"required":["code"],"type":"object"},"NotFoundErrorResponse":{"properties":{"code":{"example":"not-found","type":"string","x-order":"0001"},"message":{"example":"resource was not found","type":"string","x-order":"0002"}},"required":["code"],"type":"object"},"Payment":{"properties":{"amount":{"description":"The monetary amount of the payment.","example":"100.00","type":"string","x-order":"0002"},"descriptor":{"description":"Optional descriptor that may appear on statements.","example":"Serious Media Group","type":"string","x-order":"0006"},"dueDate":{"description":"The date when the payment is due, represented as YYYY-MM-DD in UTC timezone.","example":"2025-01-01","format":"date","type":"string","x-order":"0005"},"id":{"description":"The unique identifier for the payment.","example":"550e8400-e29b-41d4-a716-446655440000","format":"uuid","type":"string","x-order":"0001"},"status":{"allOf":[{"$ref":"#/components/schemas/payments.DisplayPaymentStatus"}],"description":"The current status of the payment. See array of constants for possible values.","x-order":"0004"},"type":{"allOf":[{"$ref":"#/components/schemas/payments.PaymentType"}],"description":"The type category of the payment. See array of constants for possible values.","x-order":"0003"}},"required":["amount","dueDate","id","status","type"],"type":"object"},"SensitiveDetailsAPI":{"properties":{"bodyJson":{"type":"object","x-order":"0003"},"method":{"example":"POST","type":"string","x-order":"0002"},"url":{"example":"https://e6-token-endpoint.com","type":"string","x-order":"0001"}},"required":["bodyJson","method","url"],"type":"object"},"Settlement":{"properties":{"cardName":{"description":"Card name.","example":"Test Card","type":"string","x-order":"0005"},"createdAt":{"description":"Settlement creation timestamp.","example":"2025-01-01T00:00:00Z","format":"date-time","type":"string","x-order":"0006"},"id":{"description":"Unique identifier for the settlement.","example":"550e8400-e29b-41d4-a716-446655440000","format":"uuid","type":"string","x-order":"0001"},"merchantName":{"description":"Card acceptor / merchant name. Omitted when the settlement carries none.","example":"TARGET.COM","type":"string","x-order":"0004"},"paymentId":{"description":"Identifier of the payment that cleared this settlement, if any.","example":"550e8400-e29b-41d4-a716-446655440000","format":"uuid","type":"string","x-order":"0007"},"settledAmount":{"description":"Settled amount.","example":"100.00","type":"string","x-order":"0002"},"settlementDate":{"description":"Date the settlement cleared (UTC), formatted YYYY-MM-DD.","example":"2025-01-01","format":"date","type":"string","x-order":"0003"}},"required":["cardName","createdAt","id","settledAmount","settlementDate"],"type":"object"},"Transaction":{"properties":{"amount":{"description":"Transaction amount. Reflects the pending authorization amount while the transaction is pending or declined, and the settled amount once settled. Zero for released authorizations.","example":"100.00","type":"string","x-order":"0005"},"amountDirection":{"allOf":[{"$ref":"#/components/schemas/iso.AmountDirection"}],"description":"Amount direction. `debit` reduces the card balance, `credit` is a refund.","x-order":"0004"},"cardId":{"description":"Card the transaction was placed on.","example":"550e8400-e29b-41d4-a716-446655440000","format":"uuid","type":"string","x-order":"0003"},"createdAt":{"description":"External network creation time — the field the list is sorted and date-filtered by, and the same value the card financial event webhook emits as `createdAt`.","example":"2025-01-01T00:00:00Z","format":"date-time","type":"string","x-order":"0008"},"currency":{"description":"ISO 4217 currency code of the amount.","example":"USD","type":"string","x-order":"0006"},"id":{"description":"Unique identifier. Matches the `transactionId` field on card financial event webhooks, allowing reconciliation between this endpoint and webhook deliveries.","example":"550e8400-e29b-41d4-a716-446655440000","format":"uuid","type":"string","x-order":"0001"},"merchantName":{"description":"Merchant name as reported by the card network. Omitted when the network did not supply one.","example":"FACEBK *RN4NULM232","type":"string","x-order":"0007"},"status":{"allOf":[{"$ref":"#/components/schemas/domaintype.TransactionStatus"}],"description":"Lifecycle stage of the transaction.","x-order":"0002"}},"required":["amount","amountDirection","cardId","createdAt","currency","id","status"],"type":"object"},"UnauthorizedErrorResponse":{"properties":{"code":{"example":"unauthorized","type":"string","x-order":"0001"},"message":{"example":"authorization header not provided","type":"string","x-order":"0002"}},"required":["code"],"type":"object"},"UpdateCardRequest":{"properties":{"categories":{"description":"Card categories. Categories have specific MCC restrictions. If provided, replaces existing categories.","items":{"$ref":"#/components/schemas/CardCategory"},"type":"array","x-order":"0002"},"limit":{"allOf":[{"$ref":"#/components/schemas/card.CardLimit"}],"description":"Card limit.","x-order":"0001"}},"type":"object"},"ValidationErrorResponse":{"properties":{"code":{"type":"string","x-order":"0001"},"message":{"type":"string","x-order":"0002"}},"required":["code"],"type":"object"},"balance.GetBalanceResponse":{"properties":{"availableCreditLimit":{"description":"AvailableCreditLimit is the remaining credit limit.","example":"100.00","type":"string","x-order":"0002"},"last24HoursSpend":{"description":"Last24HoursSpend is a rolling 24 hour spend amount.","example":"100.00","type":"string","x-order":"0003"},"last30DaysSpend":{"description":"Last30DaysSpend is a rolling 30 day spend amount.","example":"100.00","type":"string","x-order":"0004"},"overallCreditLimit":{"description":"OverallCreditLimit is the credit limit configured for the account.","example":"100.00","type":"string","x-order":"0001"}},"required":["availableCreditLimit","overallCreditLimit"],"type":"object"},"card.CardLimit":{"properties":{"amount":{"description":"Limit amount to set on card. Must be above zero.","example":"100.00","type":"string","x-order":"0002"},"type":{"allOf":[{"$ref":"#/components/schemas/CardLimitType"}],"description":"Card limit type. Can be used to add a rolling limit to a card.","x-order":"0001"}},"required":["amount","type"],"type":"object"},"core_packages_public_api_lambda_card.SensitiveDetailsMethod":{"enum":["api"],"type":"string","x-enum-varnames":["SensitiveDetailsMethodAPI"]},"domaintype.TransactionStatus":{"enum":["pending","declined","settled","released"],"type":"string","x-enum-varnames":["PendingTransaction","DeclinedTransaction","SettledTransaction","ReleasedTransaction"]},"dto.FinancialEventCategory":{"enum":["reservation","financial"],"type":"string","x-enum-varnames":["FinancialEventCategoryReservation","FinancialEventCategoryFinancial"]},"dto.TransactionIssue":{"properties":{"origin":{"example":"CARD","type":"string","x-order":"0002"},"reason":{"example":"ALLOWED_MCC","type":"string","x-order":"0003"},"severity":{"example":"ERROR","type":"string","x-order":"0001"}},"type":"object"},"iso.AmountDirection":{"enum":["debit","credit"],"type":"string","x-enum-varnames":["DebitAmount","CreditAmount"]},"pagination.Page-GetCardsResponseItem":{"properties":{"data":{"description":"Array of items on the current page.","items":{"$ref":"#/components/schemas/GetCardsResponseItem"},"type":"array","x-order":"0003"},"page":{"description":"Current page.","example":10,"type":"integer","x-order":"0001"},"pageSize":{"description":"Number of items per page.","example":1,"type":"integer","x-order":"0002"},"totalItemCount":{"description":"Total number of items.","example":50,"minimum":0,"type":"integer","x-order":"0005"},"totalPages":{"description":"Total number of pages.","example":5,"minimum":1,"type":"integer","x-order":"0004"}},"required":["data"],"type":"object"},"pagination.Page-Transaction":{"properties":{"data":{"description":"Array of items on the current page.","items":{"$ref":"#/components/schemas/Transaction"},"type":"array","x-order":"0003"},"page":{"description":"Current page.","example":10,"type":"integer","x-order":"0001"},"pageSize":{"description":"Number of items per page.","example":1,"type":"integer","x-order":"0002"},"totalItemCount":{"description":"Total number of items.","example":50,"minimum":0,"type":"integer","x-order":"0005"},"totalPages":{"description":"Total number of pages.","example":5,"minimum":1,"type":"integer","x-order":"0004"}},"required":["data"],"type":"object"},"payments.DisplayPaymentStatus":{"enum":["Completed","Scheduled","Failed","Cancelled","Informational"],"type":"string","x-enum-varnames":["DisplayPaymentStatusCompleted","DisplayPaymentStatusScheduled","DisplayPaymentStatusFailed","DisplayPaymentStatusCanceled","DisplayPaymentStatusInformational"]},"payments.PaymentType":{"enum":["net-1-repayment","net-3-repayment","net-7-repayment","net-15-repayment","net-20-repayment","net-30-repayment","net-45-repayment","net-60-repayment","net-90-repayment","account-fee","dispute-fee","late-payment-fee","failed-payment-fee","net-3-term-fee","net-7-term-fee","net-15-term-fee","net-20-term-fee","net-30-term-fee","net-45-term-fee","net-60-term-fee","net-90-term-fee","dispute-customer-event","net-1-ca-payment","net-30-ca-fee","net-60-ca-fee","net-90-ca-fee","net-30-ca-repayment","net-60-ca-repayment","net-90-ca-repayment"],"type":"string","x-enum-varnames":["PaymentTypeNet1Repayment","PaymentTypeNet3Repayment","PaymentTypeNet7Repayment","PaymentTypeNet15Repayment","PaymentTypeNet20Repayment","PaymentTypeNet30Repayment","PaymentTypeNet45Repayment","PaymentTypeNet60Repayment","PaymentTypeNet90Repayment","PaymentTypeAccountFee","PaymentTypeDisputeFee","PaymentTypeLatePaymentFee","PaymentTypeFailedPaymentFee","PaymentTypeNet3TermFee","PaymentTypeNet7TermFee","PaymentTypeNet15TermFee","PaymentTypeNet20TermFee","PaymentTypeNet30TermFee","PaymentTypeNet45TermFee","PaymentTypeNet60TermFee","PaymentTypeNet90TermFee","PaymentTypeDisputeCustomerEvent","PaymentTypeNet1CashAdvancePayment","PaymentTypeNet30CashAdvanceFee","PaymentTypeNet60CashAdvanceFee","PaymentTypeNet90CashAdvanceFee","PaymentTypeNet30CashAdvanceRepayment","PaymentTypeNet60CashAdvanceRepayment","PaymentTypeNet90CashAdvanceRepayment"]},"sql.OrderDirection":{"enum":["asc","desc"],"type":"string","x-enum-varnames":["OrderDirectionAsc","OrderDirectionDesc"]}},"securitySchemes":{"BearerAuth":{"description":"Type \"Bearer\" followed by a space and your API token. Obtain your key from the Dash.fi dashboard. Example: \"Bearer YOUR_API_KEY\"","in":"header","name":"Authorization","type":"apiKey"}}},"externalDocs":{"description":"OpenAPI JSON Specification","url":"/v1/public/swagger/doc.json"},"info":{"contact":{"email":"support@dash.fi","name":"Dash.fi Support"},"description":"Service allows to fetch or operate on the data from the Dash.fi API. Requires API key authentication via Bearer token.\nProvide your API key as a Bearer token in the `Authorization` header. Example: `Authorization: Bearer YOUR_API_KEY`","title":"Public Dash.fi API","version":"1.0"},"openapi":"3.1.0","paths":{"/balance":{"get":{"description":"Returns credit limit and spend information for the authenticated account.","operationId":"GetBalance","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/balance.GetBalanceResponse"}}},"description":"Account balance"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}},"description":"Unauthorized access"},"429":{"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}},"description":"Internal server error"}},"summary":"Get account balance","tags":["Financial"]}},"/cards":{"get":{"description":"Retrieves a paginated list of cards. Supports filtering by name and status.\n\nIf both pagination parameters are not provided, a default of page 1 with size 100 is used. Max page size is 100.","operationId":"GetCards","parameters":[{"in":"query","name":"createdAtFrom","schema":{"example":"2025-01-01T00:00:00Z","format":"date-time","type":"string","x-order":"0003"}},{"in":"query","name":"createdAtTo","schema":{"example":"2025-01-01T00:00:00Z","format":"date-time","type":"string","x-order":"0004"}},{"in":"query","name":"orderDirection","schema":{"default":"desc","enum":["asc","desc"],"example":"asc","type":"string","x-enum-varnames":["OrderDirectionAsc","OrderDirectionDesc"]}},{"description":"Current page.","in":"query","name":"page","schema":{"description":"Current page.","example":10,"type":"integer","x-order":"0001"}},{"description":"Number of items per page.","in":"query","name":"pageSize","schema":{"description":"Number of items per page.","example":1,"type":"integer","x-order":"0002"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/pagination.Page-GetCardsResponseItem"}}},"description":"Paginated list of cards"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}},"description":"Response containing error code and message"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}},"description":"Unauthorized error response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}},"description":"Forbidden error response"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}},"description":"Internal server error response"}},"security":[{"BearerAuth":[]}],"summary":"Get cards","tags":["Card"]},"post":{"description":"Allows creating a card of different types with different limit configurations.\nAccess to this endpoint must be requested via support team.","operationId":"CreateCard","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCardRequest","description":"Card creation request"}}},"description":"Card creation request","required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCardResponse"}}},"description":"Created card response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}},"description":"Response containing error code and message"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}},"description":"Unauthorized error response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}},"description":"Forbidden error response"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}},"description":"Internal server error response"}},"security":[{"BearerAuth":[]}],"summary":"Create a card","tags":["Card"]}},"/cards/{card-id}":{"get":{"description":"Allows getting card details including current limits and\navailable balance.","operationId":"GetCard","parameters":[{"description":"Card id","in":"path","name":"card-id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetCardResponse"}}},"description":"Card response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}},"description":"Response containing error code and message"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}},"description":"Unauthorized error response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}},"description":"Forbidden error response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}},"description":"Not found error response"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}},"description":"Internal server error response"}},"security":[{"BearerAuth":[]}],"summary":"Get a card","tags":["Card"]},"patch":{"description":"Allows updating a card. Supports updating the limit and categories.","operationId":"UpdateCard","parameters":[{"description":"Card id","in":"path","name":"card-id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCardRequest","description":"Card update request"}}},"description":"Card update request","required":true},"responses":{"204":{"description":"No Content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}},"description":"Response containing error code and message"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}},"description":"Unauthorized error response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}},"description":"Forbidden error response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}},"description":"Not found error response"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}},"description":"Internal server error response"}},"security":[{"BearerAuth":[]}],"summary":"Update a card","tags":["Card"]}},"/cards/{card-id}/archive":{"post":{"description":"Archive an existing card. Once a card is archived, it cannot be used for new transactions. Settlements for pending authorizations will still be processed.\n\nArchival is a terminal action - once a card is archived, it cannot move back to active status.\n\nThe endpoint returns 204 upon successful archival or if the card is already archived.","operationId":"ArchiveCard","parameters":[{"description":"Card ID","in":"path","name":"card-id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}},"description":"Response containing error code and message"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}},"description":"Unauthorized error response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}},"description":"Forbidden error response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}},"description":"Not found error response"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}},"description":"Internal server error response"}},"security":[{"BearerAuth":[]}],"summary":"Archive a card","tags":["Card"]}},"/cards/{card-id}/financial-events":{"get":{"description":"Get card financial events by card ID. Returned in reverse chronological order. TransactionID can be used to group different events for the same transaction.","operationId":"GetCardFinancialEvents","parameters":[{"description":"Card ID","in":"path","name":"card-id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetCardEventsResponse"}}},"description":"Card financial events"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}},"description":"Unauthorized response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}},"description":"Not found response"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}},"description":"Internal server error response"}},"security":[{"BearerAuth":[]}],"summary":"Get card financial events","tags":["Card"]}},"/cards/{card-id}/freeze":{"post":{"description":"Freeze a card. Once a card is frozen, it cannot be used for new transactions. Settlements for pending authorizations will still be processed.\n\nTo unfreeze a card, use the '/cards/{id}/unfreeze' endpoint. Once a card is unfrozen, it can be used for new transactions.\n\nThe endpoint returns 204 upon successful freezing or if the card is already frozen. 400 is returned if the card is archived.","operationId":"FreezeCard","parameters":[{"description":"Card ID","in":"path","name":"card-id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}},"description":"Response containing error code and message"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}},"description":"Unauthorized error response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}},"description":"Forbidden error response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}},"description":"Not found error response"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}},"description":"Internal server error response"}},"security":[{"BearerAuth":[]}],"summary":"Freeze a card","tags":["Card"]}},"/cards/{card-id}/sensitive-details":{"get":{"description":"Get sensitive details of the card. Returns 200 with a retrieval type and details on how to perform the lookup.","operationId":"GetSensitiveDetails","parameters":[{"description":"Card ID","in":"path","name":"card-id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSensitiveDetailsResponse"}}},"description":"Sensitive details retrieval information"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}},"description":"Unauthorized response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}},"description":"Not found response"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}},"description":"Internal server error response"}},"security":[{"BearerAuth":[]}],"summary":"Get sensitive details","tags":["Card"]}},"/cards/{card-id}/unfreeze":{"post":{"description":"Unfreeze a card. Once a card is unfrozen, it can be used for new transactions.\n\nThe endpoint returns 204 upon successful unfreezing or if the card is already unfrozen. 400 is returned if the card is archived.","operationId":"UnfreezeCard","parameters":[{"description":"Card ID","in":"path","name":"card-id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}},"description":"Response containing error code and message"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}},"description":"Unauthorized error response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}},"description":"Forbidden error response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}},"description":"Not found error response"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}},"description":"Internal server error response"}},"security":[{"BearerAuth":[]}],"summary":"Unfreeze a card","tags":["Card"]}},"/health":{"get":{"operationId":"Status","responses":{"200":{"content":{"application/json":{"schema":{"type":"string"}}},"description":"OK"}},"summary":"Health status of the service.","tags":["health"]}},"/payments":{"get":{"description":"Retrieves a list of payments within a specified date range (max 1 year). Requires 'from' and 'to' query parameters in YYYY-MM-DD format.","operationId":"GetPayments","parameters":[{"in":"query","name":"from","schema":{"type":"string","x-order":"0001"}},{"in":"query","name":"to","schema":{"type":"string","x-order":"0002"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetPaymentsResponse"}}},"description":"A list of payments matching the criteria"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}},"description":"Validation error for query parameters (format, range, etc.)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}},"description":"Unauthorized access"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}},"description":"Internal server error"}},"summary":"Get payments","tags":["Financial"]}},"/settlements":{"get":{"description":"Retrieves card settlements within a specified date range (max 1 year). Requires `from` and `to` query parameters in YYYY-MM-DD format.\n\nEach entry represents a single settlement (presentment or chargeback) and carries `paymentId` linking it to the payment that cleared it. For the full transaction lifecycle (pending / declined / settled / released) or to reconcile against webhook `transactionId`, use `/transactions`.","operationId":"GetSettlements","parameters":[{"in":"query","name":"from","schema":{"type":"string","x-order":"0001"}},{"in":"query","name":"to","schema":{"type":"string","x-order":"0002"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSettlementsResponse"}}},"description":"A list of settlements matching the criteria"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}},"description":"Validation error for query parameters (format, range, etc.)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}},"description":"Unauthorized access"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}},"description":"Internal server error"}},"summary":"List card settlements","tags":["Financial"]}},"/transactions":{"get":{"description":"Retrieves a paginated list of card transactions for the authenticated account. Each entry's `id` matches the `transactionId` field emitted on card financial event webhooks, so webhook deliveries and API rows can be reconciled directly. Returned in reverse chronological order by `createdAt`.\n\nIf both pagination parameters are not provided, a default of page 1 with size 100 is used. Max page size is 100. For post-settlement reconciliation against payment cycles, see `/settlements`.","operationId":"GetTransactions","parameters":[{"in":"query","name":"from","schema":{"example":"2025-01-01","format":"date","type":"string","x-order":"0003"}},{"description":"Current page.","in":"query","name":"page","schema":{"description":"Current page.","example":10,"type":"integer","x-order":"0001"}},{"description":"Number of items per page.","in":"query","name":"pageSize","schema":{"description":"Number of items per page.","example":1,"type":"integer","x-order":"0002"}},{"in":"query","name":"to","schema":{"example":"2025-01-01","format":"date","type":"string","x-order":"0004"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/pagination.Page-Transaction"}}},"description":"Paginated list of card transactions"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}},"description":"Internal server error"}},"security":[{"BearerAuth":[]}],"summary":"List card transactions","tags":["Financial"]}},"/transactions/{transaction-id}":{"get":{"description":"Retrieves a single card transaction by its `id`. The `id` matches the `transactionId` field emitted on card financial event webhooks.","operationId":"GetTransaction","parameters":[{"description":"Transaction ID (matches `transactionId` on webhook events)","in":"path","name":"transaction-id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transaction"}}},"description":"Card transaction"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}},"description":"Validation error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}},"description":"Not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}},"description":"Internal server error"}},"security":[{"BearerAuth":[]}],"summary":"Get a card transaction by ID","tags":["Financial"]}}},"security":[{"BearerAuth":[]}],"servers":[{"url":"https://api.dash.fi/v1/public"}],"tags":[{"description":"Subscribe URLs to receive POSTed events as they happen in your account. Each endpoint subscribes to one or more **topics**; when a topic fires, Dash.fi delivers the event to your URL with a JSON body matching the topic's payload schema. There is no envelope — the body is the event payload directly. Event metadata (id, topic, timestamp, signature) is carried in headers.\n\n### Topic → payload schema\n\nTopics are versioned: the format is `\u003cdomain\u003e.\u003cevent\u003e.v\u003cmajor\u003e`. Breaking\nchanges ship as a **new** topic (`.v2`) — the old version keeps delivering its\nexisting schema until it's retired, so subscriptions are pinned and never\nshift schema underneath you.\n\n| Topic | Body schema |\n|---|---|\n| `card.financial_event.v1` | `CardFinancialEvent` — see `GET /cards/{id}/financial-events` in the **Card** section for the authoritative field list. |\n\n### Delivery shape\n\n```\nPOST \u003cyour URL\u003e HTTP/1.1\nContent-Type: application/json\nX-Outpost-Event-Id: evt_abc123\nX-Outpost-Topic: card.financial_event.v1\nX-Outpost-Timestamp: 2026-05-05T10:00:00Z\nX-Outpost-Signature: v0=\u003chex hmac-sha256\u003e\n\n{ ...payload matching the topic's schema... }\n```\n\n| Header | Meaning |\n|---|---|\n| `X-Outpost-Event-Id` | Stable event identifier — the same id is sent on retries. Use it to deduplicate; delivery is **at-least-once**. |\n| `X-Outpost-Topic` | The topic that fired this delivery. |\n| `X-Outpost-Timestamp` | RFC 3339 time the event was emitted. Reject deliveries where this drifts too far from your clock to mitigate replay. |\n| `X-Outpost-Signature` | `v0=\u003chex\u003e` HMAC-SHA256 of the raw request body, keyed with your endpoint's signing secret. |\n\n### Verifying the signature\n\nThe signature is computed over the **raw request body**:\n\n```\nHMAC-SHA256(signing_secret, raw_body)\n```\n\nEncoded as hex, prefixed with `v0=`. **Use a constant-time comparison** to avoid timing attacks.\n\n`rawBody` is the unparsed request body — the exact `Buffer` or string you received over the wire, not a re-serialised JSON object.\n\n```js\nimport { createHmac, timingSafeEqual } from 'node:crypto';\n\nfunction verify(rawBody, signatureHeader, secret) {\n  if (!signatureHeader) return false;\n  const expected =\n    'v0=' + createHmac('sha256', secret).update(rawBody).digest('hex');\n  // Header may carry multiple comma-separated signatures during a rotation window.\n  return signatureHeader.split(',').some((sig) =\u003e {\n    const got = Buffer.from(sig.trim());\n    const want = Buffer.from(expected);\n    return got.length === want.length \u0026\u0026 timingSafeEqual(got, want);\n  });\n}\n```\n\n### Secret rotation\n\nRotating a signing secret keeps the previous secret valid for 24 hours so you can roll the new one out without dropped deliveries. During that window, the `X-Outpost-Signature` header carries comma-separated signatures (`v0=\u003cnew\u003e,v0=\u003cprevious\u003e`); accept either.\n\nThe new secret is shown **once** at rotation and is never retrievable later.\n","name":"Webhooks"}]}