Skip to main content
Version: v1

Strike API

Introduction

The Strike API provides a way to integrate with Strike. You can use the API to access your own Strike account.

This API reference includes technical documentation developers need for integration.

Authentication

You need to be authenticated to access any endpoint. The Strike API offers authentication via an API key which never expires. Log in to the Dashboard to generate an API key. Never share it with anyone, and keep it guarded and secure. If the key is compromised contact Strike support to revoke it and issue a new one.

Use your API key as a bearer token and attach it to the Authorization header of the request.

Errors

Our API returns standard HTTP response codes to indicate the success or failure of an API request. Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error caused by an invalid request or operation (e.g., a required parameter was omitted, insufficient balance, etc.). Codes in the 5xx range indicate an error with Strike's servers.

See more

Possible HTTP Status Codes

HTTP Status CodeTitleDescription
200OKThe request was successful.
201CreatedThe resource was successfully created.
400Bad RequestA validation error occurred.
401UnauthorizedUnauthenticated request.
403ForbiddenInsufficient permissions to perform the request.
404Not FoundThe resource was not found.
409ConflictThe request failed due to a conflict with the current state of the target resource.
422Unprocessable EntityThe request was unable to be processed.
429Too Many RequestsRate limit has been exceeded.
500Internal Server ErrorA system level error occurred.
503Service UnavailableService is temporarily offline.

For errors (non 2xx responses), we will also include extra information about what went wrong encoded in the response as JSON.

Error Response

Error responses conform to the following schema:

ErrorResponse
  • traceId --> String (Optional) - Unique identifier which represents this request in trace logs.
  • data --> Object - Error details.
    • code --> String - Can contain any error code from the error codes table below.
    • message --> String - Error message. Use only as a reference for the developer. Should not be shown to the user.
    • status --> Number - HTTP status code. Matches the status code of the response.
    • values --> Object (Optional) - Additional map of properties. Contains more details about the error. To see which properties will be available for which error, see "Available Properties" column in the table of error codes below.
    • validationErrors --> Object (Optional) - Contains specific validation errors. Will be present when validation error(s) has occured (code is 'INVALID_DATA'). Key is string and contains name of the field for which validation has failed. Value is an array of Errorobjects for that field. Error object contains specific error details (see the format below).
  • debug --> Object (Optional) - Contains debug info. Will be present only in development mode.
    • full --> String - Contains full debug info with stack trace
    • body --> String (Optional) - Contains additional debug info.
Error
  • code --> String - Can contain any validation error code from the validation error codes table below.
  • message --> String - Error message. Use only as a reference for developer. Should not be shown to the user.
  • values --> Object (Optional) - Additional map of properties. Contains more details about the error. To see which properties will be available for which validation error, see "Available Properties" column in the validation error codes table below.

Example:

{
"traceId": "7cd128d3-e8a9-4685-b852-c8ce0f4dd5e3",
"data": {
"status": 422,
"code": "USER_CURRENCY_UNAVAILABLE",
"message": "User does not support the given currency.",
"values": {
"currency": "USD"
}
}
}

Validation error response example:

{
"traceId": "7cd128d3-e8a9-4685-b852-c8ce0f4dd5e3",
"data": {
"status": 400,
"validationErrors": {
"correlationId": [
{
"code": "INVALID_DATA_MAXLENGTH",
"message": "The field correlationId must be a value with a maximum length of '40'",
"values": {
"field": "correlationId",
"maxLength": 40
}
}
],
"amount": [
{
"code": "INVALID_DATA_REQUIRED",
"message": "The field amount is required",
"values": {
"field": "amount"
}
}
]
},
"code": "INVALID_DATA",
"message": "One or more validation errors occurred."
}
}

Error Codes

CodeHTTP StatusMessageAvailable Properties
NOT_FOUND404Resource not found.
    INTERNAL_SERVER_ERROR500The server has encountered an unexpected problem.
      BAD_GATEWAY502
        MAINTENANCE_MODE503Maintenance mode is active.
          GATEWAY_TIMEOUT504
            RATE_LIMIT_EXCEEDED429Rate limit has been exceeded.
              TOO_MANY_ATTEMPTS429Too many attempts. Try again in a few minutes.
                PROCESSING_CONFLICT409Could not process the request at this time. Try again later.
                  UNAUTHORIZED401Invalid or unspecified identity.
                    FORBIDDEN403Insufficient permissions.
                      INVALID_DATA400One or more validation errors occurred.
                        INVALID_DATA_QUERY400Invalid OData query.
                          UNPROCESSABLE_ENTITY422
                            ACCOUNT_NOT_READY425Account is not yet ready. Please retry later.
                              INVALID_STATE_FOR_INVOICE_PAID422Invoice has already been paid.
                                INVALID_STATE_FOR_INVOICE_REVERSED422Invoice has been reversed.
                                  INVALID_STATE_FOR_INVOICE_CANCELLED422Invoice has been cancelled.
                                    INVALID_RECIPIENT422Recipient is currently unable to receive payments.
                                      PROCESSING_PAYMENT422Invoice payment is currently being processed.
                                        DUPLICATE_INVOICE409Invoice with correlation id '{correlationId}' already exists.
                                        • correlationId (string, example: 5ab4dd94-8a96-4aa1-82a1-8e3c95e71321)
                                        SELF_PAYMENT_NOT_ALLOWED422Self-payments are not allowed.
                                          USER_CURRENCY_UNAVAILABLE422User does not support the given currency.
                                          • currency (string, example: "USD")
                                          LN_UNAVAILABLE503Lightning network is currently unavailable.
                                            EXCHANGE_RATE_NOT_AVAILABLE422Exchange rate is unavailable for the given currency pair.
                                              BALANCE_TOO_LOW422Insufficient funds
                                                INVALID_AMOUNT422Amount must be greater than zero
                                                  AMOUNT_TOO_HIGH422The amount can't be above {limit}
                                                  • limit (object, example: { "amount": "1,000,000.00", "currency": "USD" })
                                                  AMOUNT_TOO_LOW422The amount can't be below {limit}
                                                  • limit (object, example: { "amount": "10.00", "currency": "USD" })
                                                  PAYMENT_METHOD_NOT_READY422Payment method must be in the READY state.
                                                    PAYOUT_ORIGINATOR_NOT_APPROVED422Payout originator must be in the APPROVED state.
                                                      PAYOUT_ALREADY_INITIATED422Payout has already been initiated.
                                                        INVALID_STATE_FOR_INVOICE_EXPIRED422Lightning invoice has expired.
                                                          PAYMENT_PROCESSED422Payment was already processed.
                                                          • paymentId (string, example: 0120fb31-cab0-1000-800b-f0805f9b34fb)
                                                          INVALID_LN_INVOICE422Invalid lightning invoice.
                                                            LN_INVOICE_PROCESSED422Lightning invoice has already been processed.
                                                              INVALID_BITCOIN_ADDRESS422Invalid btc address.
                                                                LN_ROUTE_NOT_FOUND422Unable to find a lightning payment route.
                                                                  PAYMENT_QUOTE_EXPIRED422The payment quote has expired.
                                                                    DUPLICATE_PAYMENT_QUOTE422A payment quote for the specified idempotency key already exists.
                                                                    • paymentQuoteId (string, example: 7d14fc9f-164f-4490-bf4a-1f17f3527a05)
                                                                    DUPLICATE_CURRENCY_EXCHANGE_QUOTE422A currency exchange quote for the specified idempotency key already exists.
                                                                    • currencyExchangeQuoteId (string, example: 5ab4dd94-8a96-4aa1-82a1-8e3c95e71321)
                                                                    CURRENCY_EXCHANGE_QUOTE_PROCESSED422The currency exchange quote has already been processed.
                                                                      CURRENCY_EXCHANGE_QUOTE_EXPIRED422The currency exchange quote has expired.
                                                                        CURRENCY_EXCHANGE_PAIR_NOT_SUPPORTED422The currency exchange pair is invalid.
                                                                          CURRENCY_EXCHANGE_AMOUNT_TOO_LOW422The exchanged amount is too low.

                                                                            Validation Error Codes

                                                                            CodeMessageAvailable Properties
                                                                            INVALID_DATA
                                                                              INVALID_DATA_REQUIREDThe field {field} is required
                                                                              • field (string)
                                                                              INVALID_DATA_LENGTHThe field {field} must be a value with a length of '{length}'
                                                                              • field (string)
                                                                              • length (number)
                                                                              INVALID_DATA_MINLENGTHThe field {field} must be a value with a minimum length of '{minLength}'
                                                                              • field (string)
                                                                              • minLength (number)
                                                                              INVALID_DATA_MAXLENGTHThe field {field} must be a value with a maximum length of '{maxLength}'
                                                                              • field (string)
                                                                              • maxLength (number)
                                                                              INVALID_DATA_VALUEThe field {field} contains invalid value
                                                                              • field (string)
                                                                              INVALID_DATA_CURRENCYThe field {field} contains unsupported currency '{currency}'
                                                                              • field (string)
                                                                              • currency (string, example: "USD")

                                                                              Error codes without the message in the table don't have a fixed message (the message will be different based on the case). Note that messages are only there as a reference for the developers and might be changed at any time without prior notice or version change.

                                                                              Webhooks

                                                                              The Strike API supports webhook notifications about certain events occurring. When an event that you are subscribed to has occurred, a POST request will be made to the webhook URI of the subscription.

                                                                              Supported Events

                                                                              EventDescription
                                                                              invoice.createdNew invoice has been created.
                                                                              invoice.updatedState of the invoice changed.
                                                                              payment-method.bank.createdNew bank payment method has been created.
                                                                              payment-method.bank.updatedState of the bank payment method changed.
                                                                              payout.createdNew payout has been created.
                                                                              payout.updatedState of the payout has changed.
                                                                              payout-originator.createdNew payout originator has been created.
                                                                              payout-originator.updatedState of the payout originator has changed.
                                                                              currency-exchange-quote.updatedState of the currency exchange quote has changed.
                                                                              payment.createdNew payment has been created.
                                                                              payment.updatedState of the payment has changed.

                                                                              Webhook Format

                                                                              The payload of each webhook request contains WebhookEvent. data property of the event contains entityId which identifies the resource for the event that has occured and optionally a changes property which is an array of the property names that have changed for the resource in question. The event does not contain the actual data changes. To get the new values, a corresponding fetch API for the resource should be used.

                                                                              Example:

                                                                              {
                                                                              "id": "245e40d8-f197-411c-8f20-a326d08da402",
                                                                              "eventType": "invoice.updated",
                                                                              "webhookVersion": "v1",
                                                                              "data": {
                                                                              "entityId": "602cc206-6b4a-42dd-bc89-9a534bb04034",
                                                                              "changes": [
                                                                              "state"
                                                                              ]
                                                                              },
                                                                              "created": "2009-01-03T17:15:00+00:00",
                                                                              "deliverySuccess": true
                                                                              }

                                                                              In this case entityId is the Id of the invoice while changes indicates that the state of the invoice has been changed.

                                                                              Versioning

                                                                              Webhook format versions are tied to Strike API versions. Any breaking change to the webhook system will be noted in the Strike API changelog. The version is bound to a webhook subscription.

                                                                              API Versioning

                                                                              Strike API versions are represented by a version number declared in the route path of our endpoints:

                                                                              https://api.strike.me/v1/*

                                                                              A new version will be released when breaking changes are introduced in the API. A breaking change requires developers to change their code to maintain existing functionality in their app. Non-breaking changes will be additive and rolled out to the most recent version when ready, requiring no work on a developer's end unless you would like to take advantage of the new functionality. Each release, breaking or non-breaking, will be documented in the changelog below.

                                                                              Non-breaking changes

                                                                              Following changes are considered non-breaking:

                                                                              • Adding a new endpoint
                                                                              • Adding a new optional request parameter to existing endpoint
                                                                              • Making required request parameter optional
                                                                              • Adding a new property to existing endpoint response
                                                                              • Adding a new value to existing enum
                                                                              • Changing the order of properties in existing responses
                                                                              • Changing a message text in the error response
                                                                              • Changing the length or format of the auto-generated strings such as resource Id's
                                                                              • Adding a new authorization scope
                                                                              • Adding a new webhook event type
                                                                              • Changing a name of request or response schema definition

                                                                              Deprecation

                                                                              As soon as a new version is released, the previous version will be marked as deprecated. Versions will remain in a deprecated state for one year, after which they will be retired. In effect, any version will be available for at least two years overall, including their deprecation period. Any calls made to versions after they are retired will fail.

                                                                              Changelog

                                                                              Feb 19, 2024 - v1

                                                                              • Updated POST payment-methods/bank, GET payment-methods/bank and GET payment-methods/bank/{id} endpoints to include optional referenceCode property in the response.

                                                                              Feb 5, 2024 - v1

                                                                              • Updated GET payment-methods/bank/{id} endpoint to include supportedActions in the response.
                                                                              • Updated GET payment-methods/bank endpoint to return deposit methods too and allowed filtering by supportedAction.

                                                                              Dec 19, 2023 - v1

                                                                              • Updated POST payment-quotes/onchain/tiers to return an optional minimumAmount property for each tier.

                                                                              Nov 22, 2023 - v1

                                                                              • Updated POST payment-quotes/lightning/lnurl, POST payment-quotes/lightning and POST payment-quotes/onchain endpoints to support idempotency-key header.

                                                                              Nov 20, 2023 - v1

                                                                              • Updated POST currency-exchange-quotes endpoint to support idempotency-key header.

                                                                              Nov 3, 2023 - v1

                                                                              • Updated POST currency-exchange-quotes and GET currency-exchange-quotes/{id} endpoints to include fee in the response.

                                                                              Sep 1, 2023 - v1

                                                                              • Added GET payment-quotes/lightning/lnurl/{lnAddressOrUrl} endpoint for fetching LN Address or LNRL details.
                                                                              • Added POST payment-quotes/lightning/lnurl endpoint for creating LN Address or LNURL payment quotes.

                                                                              Aug 25, 2023 - v1

                                                                              • Updated POST payouts, GET payouts/{id} and PATCH payouts/{id}/initiate endpoints to include created, completed and initiated times in the response.

                                                                              Aug 11, 2023 - v1

                                                                              • Updated POST payment-quotes/lightning and POST payment-quotes/onchain endpoints to support BTC for non-business accounts.
                                                                              • Updated POST payment-quotes/lightning endpoint to support zero-amount lightning invoices.

                                                                              June 13, 2023 - v1

                                                                              • Updated PATCH payment-quotes/{id}/execute endpoint response to include the paymentId of the newly created payment.
                                                                              • Added GET payments/{id} endpoint for fetching a single payment.
                                                                              • Added payment.created and payment.updated webhook event types.
                                                                              • Deprecated result and delivered on GET payments/{id} and POST payment-quotes/{id}/execute endpoints in favor of state and completed respectively.

                                                                              May 11, 2023 - v1

                                                                              • Added POST currency-exchange-quotes endpoint for creating currency exchange quotes.
                                                                              • Added GET currency-exchange-quotes/{id} endpoint for fetching a single currency exchange quote.
                                                                              • Added PATCH currency-exchange-quotes/{id}/execute endpoint for executing a currency exchange quote.
                                                                              • Added currency-exchange-quote.updated webhook event type.

                                                                              April 27, 2023 - v1

                                                                              • Updated POST invoices/{id}/quote endpoint to support setting descriptionHash on the lightning invoice.

                                                                              April 25, 2023 - v1

                                                                              • Updated POST payment-quotes/lightning endpoint to support BTC for business accounts.

                                                                              April 4, 2023 - v1

                                                                              • Added POST payment-methods/bank endpoint for creating bank payment methods.
                                                                              • Added GET payment-methods/bank endpoint for fetching bank payment methods.
                                                                              • Added GET payment-methods/bank/{id} endpoint for fetching a single bank payment method.
                                                                              • Added DELETE payment-methods/bank/{id} endpoint for deleting a bank payment method.
                                                                              • Added POST payout-originators endpoint for creating payout originators.
                                                                              • Added GET payout-originators endpoint for fetching payout originators.
                                                                              • Added GET payout-originators/{id} endpoint for fetching a single payout originator.
                                                                              • Added DELETE payout-originators/{id} endpoint for deleting a payout originator.
                                                                              • Added POST payouts endpoint for creating payouts.
                                                                              • Added GET payouts endpoint for fetching payouts.
                                                                              • Added GET payouts/{id} endpoint for fetching a single payout.
                                                                              • Added PATCH payouts/{id}/initiate endpoint for initiating a payout.
                                                                              • Added payment-method.bank.created, payment-method.bank.updated, payout-originator.created, payout-originator.updated, payout.created and payout.updated webhook event types.

                                                                              Mar 7, 2023 - v1

                                                                              • Added GET balances endpoint to enable fetching account balances.

                                                                              Feb 14, 2023 - v1

                                                                              • Updated GET invoices endpoint to include the OData logical operators: GreaterThan, GreaterThanOrEqual, LessThan, LessThanOrEqual.

                                                                              Feb 3, 2023 - v1

                                                                              • Added POST payment-quotes/lightning endpoint to create a payment quote for a lightning invoice and partner.payment-quote.lightning.create scope for it.
                                                                              • Added PATCH payment-quotes/{id}/execute endpoint to execute a payment quote and partner.payment-quote.execute scope for it.

                                                                              Jan 17, 2023 - v1

                                                                              • Updated GET accounts/{id}/profile and GET accounts/handle/{handle}/profile to include account Id.

                                                                              March 23, 2022 - v1

                                                                              • Updated PATCH invoices/{invoiceId}/cancel to allow the receiving user of the invoice to cancel it.

                                                                              March 16, 2022 - v1

                                                                              • Added new isInvoiceable property to the account currency object in GET accounts/{id}/profile and GET accounts/handle/{handle}/profile endpoints. Currencies for which isInvoiceable is set to true can be used to create an invoice.

                                                                              February 23, 2022 - v1

                                                                              • Added PATCH invoices/{invoiceId}/cancel endpoint for cancelling unpaid invoices and partner.invoice.cancel scope for it.

                                                                              September 29, 2021 - v1

                                                                              • Initial release.