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. Strike API offers two forms of authentication:
API Key:
Access token:
- Used for delegated access to Strike account (Strike user delegates account access to the third party application).
- Can be obtained via OAuth flow.
- Has expiry but can be refreshed using the refresh token. Once refresh token has expired OAuth login needs to be repeated.
- OAuth configuration details can be seen here.
- Contact Strike support to get your client ID.
Use API key or access token as 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 Code | Title | Description |
---|---|---|
200 | OK | The request was successful. |
201 | Created | The resource was successfully created. |
400 | Bad Request | A validation error occurred. |
401 | Unauthorized | Unauthenticated request. |
403 | Forbidden | Insufficient permissions to perform the request. |
404 | Not Found | The resource was not found. |
409 | Conflict | The request failed due to a conflict with the current state of the target resource. |
422 | Unprocessable Entity | The request was unable to be processed. |
429 | Too Many Requests | Rate limit has been exceeded. |
500 | Internal Server Error | A system level error occurred. |
503 | Service Unavailable | Service 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 Error objects 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.
- 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
Code | HTTP Status | Message | Available Properties |
---|---|---|---|
NOT_FOUND | 404 | Resource not found. | |
NOT_FOUND | 404 | Resource {id} not found. |
|
INTERNAL_SERVER_ERROR | 500 | The server has encountered an unexpected problem. | |
BAD_GATEWAY | 502 | ||
MAINTENANCE_MODE | 503 | Maintenance mode is active. | |
SERVICE_UNAVAILABLE | 503 | Service is temporarily unavailable. | |
GATEWAY_TIMEOUT | 504 | ||
RATE_LIMIT_EXCEEDED | 429 | Rate limit has been exceeded. | |
TOO_MANY_ATTEMPTS | 429 | Too many attempts. Try again in a few minutes. | |
PROCESSING_CONFLICT | 409 | Could not process the request at this time. Try again later. | |
UNAUTHORIZED | 401 | Invalid or unspecified identity. | |
FORBIDDEN | 403 | Insufficient permissions. | |
INVALID_DATA | 400 | One or more validation errors occurred. | |
INVALID_DATA_QUERY | 400 | Invalid OData query. | |
UNPROCESSABLE_ENTITY | 422 | ||
ACCOUNT_NOT_READY | 425 | Account is not yet ready. Please retry later. | |
INVALID_STATE_FOR_INVOICE_PAID | 422 | Invoice has already been paid. | |
INVALID_STATE_FOR_INVOICE_REVERSED | 422 | Invoice has been reversed. | |
INVALID_STATE_FOR_INVOICE_CANCELLED | 422 | Invoice has been cancelled. | |
INVALID_RECIPIENT | 422 | Recipient is currently unable to receive payments. | |
PROCESSING_PAYMENT | 422 | Invoice payment is currently being processed. | |
DUPLICATE_INVOICE | 409 | Invoice with correlation id '{correlationId}' already exists. |
|
SELF_PAYMENT_NOT_ALLOWED | 422 | Self-payments are not allowed. | |
USER_CURRENCY_UNAVAILABLE | 422 | User does not support the given currency. |
|
LN_UNAVAILABLE | 503 | Lightning network is currently unavailable. | |
EXCHANGE_RATE_NOT_AVAILABLE | 422 | Exchange rate is unavailable for the given currency pair. | |
BALANCE_TOO_LOW | 422 | Insufficient funds | |
INVALID_AMOUNT | 422 | Amount must be greater than zero | |
AMOUNT_TOO_HIGH | 422 | The amount can't be above {limit} |
|
AMOUNT_TOO_LOW | 422 | The amount can't be below {limit} |
|
UNSUPPORTED_PAYMENT_METHOD | 422 | The payment method is not supported | |
INVALID_PAYMENT_METHOD | 422 | Invalid payment method | |
CURRENCY_UNSUPPORTED | 422 | The requested currency {requestedCurrency} is not supported. |
|
PLAID_LINKING_FAILED | 422 | Account verification failed. | |
PAYMENT_METHOD_NOT_READY | 422 | Payment method must be in the READY state. | |
PAYOUT_ORIGINATOR_NOT_APPROVED | 422 | Payout originator must be in the APPROVED state. | |
PAYOUT_ALREADY_INITIATED | 422 | Payout has already been initiated. | |
INVALID_STATE_FOR_INVOICE_EXPIRED | 422 | Lightning invoice has expired. | |
PAYMENT_PROCESSED | 422 | Payment was already processed. |
|
INVALID_LN_INVOICE | 422 | Invalid lightning invoice. |
|
LN_INVOICE_PROCESSED | 422 | Lightning invoice has already been processed. | |
INVALID_BITCOIN_ADDRESS | 422 | Invalid btc address. | |
LN_ROUTE_NOT_FOUND | 422 | Unable to find a lightning payment route. | |
PAYMENT_QUOTE_EXPIRED | 422 | The payment quote has expired. | |
DUPLICATE_PAYMENT_QUOTE | 422 | A payment quote for the specified idempotency key already exists. |
|
TOO_MANY_TRANSACTIONS | 422 | Number of transactions limit exceeded. | |
DUPLICATE_CURRENCY_EXCHANGE_QUOTE | 422 | A currency exchange quote for the specified idempotency key already exists. |
|
CURRENCY_EXCHANGE_QUOTE_PROCESSED | 422 | The currency exchange quote has already been processed. | |
CURRENCY_EXCHANGE_QUOTE_EXPIRED | 422 | The currency exchange quote has expired. | |
CURRENCY_EXCHANGE_PAIR_NOT_SUPPORTED | 422 | The currency exchange pair is invalid. | |
CURRENCY_EXCHANGE_AMOUNT_TOO_LOW | 422 | The exchanged amount is too low. | |
DEPOSIT_LIMIT_EXCEEDED | 422 | The number of allowed deposits has been exceeded. | |
DUPLICATE_DEPOSIT | 422 | A deposit for the specified idempotency key already exists. |
|
Validation Error Codes
Code | Message | Available Properties |
---|---|---|
INVALID_DATA | ||
INVALID_DATA_REQUIRED | The field {field} is required |
|
INVALID_DATA_LENGTH | The field {field} must be a value with a length of '{length}' |
|
INVALID_DATA_MINLENGTH | The field {field} must be a value with a minimum length of '{minLength}' |
|
INVALID_DATA_MAXLENGTH | The field {field} must be a value with a maximum length of '{maxLength}' |
|
INVALID_DATA_VALUE | The field {field} contains invalid value |
|
INVALID_DATA_CURRENCY | The field {field} contains unsupported currency '{currency}' |
|
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
Event | Description |
---|---|
invoice.created | New invoice has been created. |
invoice.updated | State of the invoice changed. |
payment-method.bank.created | New bank payment method has been created. |
payment-method.bank.updated | State of the bank payment method changed. |
payout.created | New payout has been created. |
payout.updated | State of the payout has changed. |
payout-originator.created | New payout originator has been created. |
payout-originator.updated | State of the payout originator has changed. |
currency-exchange-quote.updated | State of the currency exchange quote has changed. |
payment.created | New payment has been created. |
payment.updated | State of the payment has changed. |
deposit.updated | State of the deposit has changed. |
receive-request.receive-pending | Receive for the receive request has been detected. |
receive-request.receive-completed | Receive for the receive request has been completed. |
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
Oct 25, 2024 - v1
- Updated
POST deposits/fee
to includesettledAt
timestamp, and madesettlementPeriodInDay
obsolete.
Oct 14, 2024 - v1
- Updated
POST payment-quotes/lightning
andPOST payment-quotes/lightning/lnurl
endpoints to support BTCsourceCurrency
and a fiatamount.currency
property combination.
Oct 1, 2024 - v1
- Updated
GET receive-requests/{id}/receives
andGET receive-requests/receives
endpoints to includereceiveRequestId
property in the response. Added support for filtering byreceiveId
andreceiveRequestId
.
Sep 20, 2024 - v1
- Added
POST receive-request
endpoint to create a receive request. - Added
GET receive-requests
endpoint to fetch receive requests. Supports filtering by $onchainAddress, $bolt11Invoice and $paymentHash. - Added
GET receive-requests/{id}
endpoint to fetch a single receive request. - Added
GET receive-requests/{id}/receives
endpoint to fetch receives for the receive request. Supports filtering by $receiveId, $onchainAddress, $bolt11Invoice and $paymentHash . - Added
GET receive-requests/receives
endpoint to fetch a all receives for any receive request. Supports filtering by $onchainAddress, $bolt11Invoice and $paymentHash.
Sep 2, 2024 - v1
- Added
GET deposits
endpoint to fetch deposits.
Aug 26, 2024 - v1
- Updated
GET payments/{id}
andPATCH payment-quotes/{id}/execute
endpoints to includelightning
andonchain
properties in the response.lightning
object includesnetworkFee
.onchain
object includestxnId
. Also, this deprecateslightningNetworkFee
property.
Aug 21, 2024 - v1
- Added
POST deposits
to initiate a deposit. - Added
GET deposits/{id}
to fetch a single deposit. - Added
POST deposits/fee
to estimate the fee for a deposit. - Added
GET accounts/limits
to fetch account limits breakdown.
Jul 19, 2024 - v1
- Updated
GET balances
endpoint to support pending deposits and reservations other than withdrawals. This change deprecatesoutgoing
andtotal
properties and addscurrent
,pending
andreserved
properties.
Jun 24, 2024 - v1
- Updated
POST payouts
endpoint to support setting custom reference. - Updated
GET payouts
,GET payouts/{id}
,POST payouts
andPATCH payouts/{id}/initiate
endpoints to includereference
in the response.
Jun 12, 2024 - v1
- Updated
POST currency-exchange-quotes
andGET currency-exchange-quotes/{id}
endpoints to support GBPcurrency
. - Updated
POST payment-quotes/lightning
,POST payment-quotes/onchain
andGET payments/{id}
endpoints to support GBPcurrency
. - Updated
POST invoices
,GET invoices
andGET invoices/{id}
endpoints to support GBPcurrency
. - Updated
POST payment-methods/bank
,GET payment-methods/bank
andGET payment-methods/bank/{id}
endpoints to support FPStransferType
. - Updated
GET rates/ticker
endpoint to includeGBP
currency combinations.
Apr 11, 2024 - v1
- Updated
POST currency-exchange-quotes
andGET currency-exchange-quotes/{id}
endpoints to support GBPcurrency
. - Updated
POST payment-quotes/lightning
,POST payment-quotes/onchain
andGET payments/{id}
endpoints to support GBPcurrency
. - Updated
POST invoices
,GET invoices
andGET invoices/{id}
endpoints to support GBPcurrency
. - Updated
POST payment-methods/bank
,GET payment-methods/bank
andGET payment-methods/bank/{id}
endpoints to support FPStransferType
. - Updated
GET rates/ticker
endpoint to includeGBP
currency combinations.
Feb 19, 2024 - v1
- Updated
POST payment-methods/bank
,GET payment-methods/bank
andGET payment-methods/bank/{id}
endpoints to include optionalreferenceCode
property in the response.
Feb 5, 2024 - v1
- Updated
GET payment-methods/bank/{id}
endpoint to includesupportedActions
in the response. - Updated
GET payment-methods/bank
endpoint to return deposit methods too and allowed filtering bysupportedAction
.
Dec 19, 2023 - v1
- Updated
POST payment-quotes/onchain/tiers
to return an optionalminimumAmount
property for each tier.
Nov 22, 2023 - v1
- Updated
POST payment-quotes/lightning/lnurl
,POST payment-quotes/lightning
andPOST payment-quotes/onchain
endpoints to supportidempotency-key
header.
Nov 20, 2023 - v1
- Updated
POST currency-exchange-quotes
endpoint to supportidempotency-key
header.
Nov 3, 2023 - v1
- Updated
POST currency-exchange-quotes
andGET currency-exchange-quotes/{id}
endpoints to includefee
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}
andPATCH payouts/{id}/initiate
endpoints to includecreated
,completed
andinitiated
times in the response.
Aug 11, 2023 - v1
- Updated
POST payment-quotes/lightning
andPOST 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 thepaymentId
of the newly created payment. - Added
GET payments/{id}
endpoint for fetching a single payment. - Added
payment.created
andpayment.updated
webhook event types. - Deprecated
result
anddelivered
onGET payments/{id}
andPOST payment-quotes/{id}/execute
endpoints in favor ofstate
andcompleted
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 settingdescriptionHash
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
andpayout.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 andpartner.payment-quote.lightning.create
scope for it. - Added
PATCH payment-quotes/{id}/execute
endpoint to execute a payment quote andpartner.payment-quote.execute
scope for it.
Jan 17, 2023 - v1
- Updated
GET accounts/{id}/profile
andGET 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 inGET accounts/{id}/profile
andGET accounts/handle/{handle}/profile
endpoints. Currencies for whichisInvoiceable
is set totrue
can be used to create an invoice.
February 23, 2022 - v1
- Added
PATCH invoices/{invoiceId}/cancel
endpoint for cancelling unpaid invoices andpartner.invoice.cancel
scope for it.
September 29, 2021 - v1
- Initial release.