API reference
Test mode. Use your secret key on your server; live processing is currently disabled.
https://api.knoxapi.comSend form-encoded requests with Authorization: Bearer sk_test_....
Complete OpenAPI specification · Integration guide
Operations and schemas are based on the pinned Stripe OpenAPI specification (MIT). Nested object definitions and enums are available in the complete specification.
List all top-ups
Returns a list of top-ups.
Request parameters
| Parameter | Location | Type | Description |
|---|---|---|---|
amount | query | one of multiple schemas | A positive integer representing how much to transfer. |
created | query | one of multiple schemas | A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. |
ending_before | query | string | A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. |
expand | query | array of string | Specifies which fields in the response should be expanded. |
limit | query | integer | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. |
starting_after | query | string | A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. |
status | query | string | Only return top-ups that have the given status. One of `canceled`, `failed`, `pending` or `succeeded`. |
object. See the OpenAPI specification for the complete schema.
Responses
HTTP 200: Successful response.
| Field | Type | Description |
|---|---|---|
data required | array of topup | |
has_more required | boolean | True if this list has another page of items after this one that can be fetched. |
object required | string | String representing the object's type. Objects of the same type share the same value. Always has the value `list`. |
url required | string | The URL where this list can be accessed. |
HTTP default: Error response.
| Field | Type | Description |
|---|---|---|
error required | api_errors |
Create a top-up
Top up the balance of an account
Request parameters
| Field | Type | Description |
|---|---|---|
amount required | integer | A positive integer representing how much to transfer. |
currency required | string | Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). |
description | string | An arbitrary string attached to the object. Often useful for displaying to users. |
expand | array of string | Specifies which fields in the response should be expanded. |
metadata | one of multiple schemas | Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. |
payment_method | string | The ID of a PaymentMethod representing the payment method to be used for the top-up. A PaymentMethod of type `us_bank_account` can be used. |
payment_method_options | object | Payment method-specific configuration for this top-up. |
source | string | The ID of a source to transfer funds from. For most users, this should be left unspecified which will use the bank account that was set up in the dashboard for the specified currency. In test mode, this can be a test bank token (see [Testing Top-ups](https://docs.stripe.com/connect/testing#testing-top-ups)). |
statement_descriptor | string | Extra information about a top-up for the source's bank statement. Limited to 15 ASCII characters. |
transfer_group | string | A string that identifies this top-up as part of a group. |
Responses
HTTP 200: Successful response.
| Field | Type | Description |
|---|---|---|
amount required | integer | Amount transferred. |
balance_transaction | one of multiple schemas | ID of the balance transaction that describes the impact of this top-up on your account balance. May not be specified depending on status of top-up. |
created required | integer | Time at which the object was created. Measured in seconds since the Unix epoch. |
currency required | string | Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). |
description | string | An arbitrary string attached to the object. Often useful for displaying to users. |
expected_availability_date | integer | Date the funds are expected to arrive in your Stripe account for payouts. This factors in delays like weekends or bank holidays. May not be specified depending on status of top-up. |
failure_code | string | Error code explaining reason for top-up failure if available (see [the errors section](/api/errors) for a list of codes). |
failure_message | string | Message to user further explaining reason for top-up failure if available. |
id required | string | Unique identifier for the object. |
initiated_by | string | Indicates whether the top-up was initiated by Stripe or by the user. |
livemode required | boolean | If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. |
metadata required | object | Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. |
object required | string | String representing the object's type. Objects of the same type share the same value. |
payment_method | one of multiple schemas | The ID of a PaymentMethod representing the payment method used for the top-up. A PaymentMethod of type `us_bank_account` can be used. |
payment_method_options | one of multiple schemas | Payment-method-specific configuration for this top-up. |
source | one of multiple schemas | The source field is deprecated. It might not always be present in the API response. |
statement_descriptor | string | Extra information about a top-up. This will appear on your source's bank statement. It must contain at least one letter. |
status required | string | The status of the top-up is either `canceled`, `failed`, `pending`, `reversed`, or `succeeded`. |
transfer_group | string | A string that identifies this top-up as part of a group. |
HTTP default: Error response.
| Field | Type | Description |
|---|---|---|
error required | api_errors |
Retrieve a top-up
Retrieves the details of a top-up that has previously been created. Supply the unique top-up ID that was returned from your previous request, and Stripe will return the corresponding top-up information.
Request parameters
| Parameter | Location | Type | Description |
|---|---|---|---|
expand | query | array of string | Specifies which fields in the response should be expanded. |
topup | path | string |
object. See the OpenAPI specification for the complete schema.
Responses
HTTP 200: Successful response.
| Field | Type | Description |
|---|---|---|
amount required | integer | Amount transferred. |
balance_transaction | one of multiple schemas | ID of the balance transaction that describes the impact of this top-up on your account balance. May not be specified depending on status of top-up. |
created required | integer | Time at which the object was created. Measured in seconds since the Unix epoch. |
currency required | string | Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). |
description | string | An arbitrary string attached to the object. Often useful for displaying to users. |
expected_availability_date | integer | Date the funds are expected to arrive in your Stripe account for payouts. This factors in delays like weekends or bank holidays. May not be specified depending on status of top-up. |
failure_code | string | Error code explaining reason for top-up failure if available (see [the errors section](/api/errors) for a list of codes). |
failure_message | string | Message to user further explaining reason for top-up failure if available. |
id required | string | Unique identifier for the object. |
initiated_by | string | Indicates whether the top-up was initiated by Stripe or by the user. |
livemode required | boolean | If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. |
metadata required | object | Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. |
object required | string | String representing the object's type. Objects of the same type share the same value. |
payment_method | one of multiple schemas | The ID of a PaymentMethod representing the payment method used for the top-up. A PaymentMethod of type `us_bank_account` can be used. |
payment_method_options | one of multiple schemas | Payment-method-specific configuration for this top-up. |
source | one of multiple schemas | The source field is deprecated. It might not always be present in the API response. |
statement_descriptor | string | Extra information about a top-up. This will appear on your source's bank statement. It must contain at least one letter. |
status required | string | The status of the top-up is either `canceled`, `failed`, `pending`, `reversed`, or `succeeded`. |
transfer_group | string | A string that identifies this top-up as part of a group. |
HTTP default: Error response.
| Field | Type | Description |
|---|---|---|
error required | api_errors |
Update a top-up
Updates the metadata of a top-up. Other top-up details are not editable by design.
Request parameters
| Parameter | Location | Type | Description |
|---|---|---|---|
topup | path | string |
| Field | Type | Description |
|---|---|---|
description | string | An arbitrary string attached to the object. Often useful for displaying to users. |
expand | array of string | Specifies which fields in the response should be expanded. |
metadata | one of multiple schemas | Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. |
Responses
HTTP 200: Successful response.
| Field | Type | Description |
|---|---|---|
amount required | integer | Amount transferred. |
balance_transaction | one of multiple schemas | ID of the balance transaction that describes the impact of this top-up on your account balance. May not be specified depending on status of top-up. |
created required | integer | Time at which the object was created. Measured in seconds since the Unix epoch. |
currency required | string | Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). |
description | string | An arbitrary string attached to the object. Often useful for displaying to users. |
expected_availability_date | integer | Date the funds are expected to arrive in your Stripe account for payouts. This factors in delays like weekends or bank holidays. May not be specified depending on status of top-up. |
failure_code | string | Error code explaining reason for top-up failure if available (see [the errors section](/api/errors) for a list of codes). |
failure_message | string | Message to user further explaining reason for top-up failure if available. |
id required | string | Unique identifier for the object. |
initiated_by | string | Indicates whether the top-up was initiated by Stripe or by the user. |
livemode required | boolean | If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. |
metadata required | object | Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. |
object required | string | String representing the object's type. Objects of the same type share the same value. |
payment_method | one of multiple schemas | The ID of a PaymentMethod representing the payment method used for the top-up. A PaymentMethod of type `us_bank_account` can be used. |
payment_method_options | one of multiple schemas | Payment-method-specific configuration for this top-up. |
source | one of multiple schemas | The source field is deprecated. It might not always be present in the API response. |
statement_descriptor | string | Extra information about a top-up. This will appear on your source's bank statement. It must contain at least one letter. |
status required | string | The status of the top-up is either `canceled`, `failed`, `pending`, `reversed`, or `succeeded`. |
transfer_group | string | A string that identifies this top-up as part of a group. |
HTTP default: Error response.
| Field | Type | Description |
|---|---|---|
error required | api_errors |
Cancel a top-up
Cancels a top-up. Only pending top-ups can be canceled.
Request parameters
| Parameter | Location | Type | Description |
|---|---|---|---|
topup | path | string |
| Field | Type | Description |
|---|---|---|
expand | array of string | Specifies which fields in the response should be expanded. |
Responses
HTTP 200: Successful response.
| Field | Type | Description |
|---|---|---|
amount required | integer | Amount transferred. |
balance_transaction | one of multiple schemas | ID of the balance transaction that describes the impact of this top-up on your account balance. May not be specified depending on status of top-up. |
created required | integer | Time at which the object was created. Measured in seconds since the Unix epoch. |
currency required | string | Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). |
description | string | An arbitrary string attached to the object. Often useful for displaying to users. |
expected_availability_date | integer | Date the funds are expected to arrive in your Stripe account for payouts. This factors in delays like weekends or bank holidays. May not be specified depending on status of top-up. |
failure_code | string | Error code explaining reason for top-up failure if available (see [the errors section](/api/errors) for a list of codes). |
failure_message | string | Message to user further explaining reason for top-up failure if available. |
id required | string | Unique identifier for the object. |
initiated_by | string | Indicates whether the top-up was initiated by Stripe or by the user. |
livemode required | boolean | If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. |
metadata required | object | Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. |
object required | string | String representing the object's type. Objects of the same type share the same value. |
payment_method | one of multiple schemas | The ID of a PaymentMethod representing the payment method used for the top-up. A PaymentMethod of type `us_bank_account` can be used. |
payment_method_options | one of multiple schemas | Payment-method-specific configuration for this top-up. |
source | one of multiple schemas | The source field is deprecated. It might not always be present in the API response. |
statement_descriptor | string | Extra information about a top-up. This will appear on your source's bank statement. It must contain at least one letter. |
status required | string | The status of the top-up is either `canceled`, `failed`, `pending`, `reversed`, or `succeeded`. |
transfer_group | string | A string that identifies this top-up as part of a group. |
HTTP default: Error response.
| Field | Type | Description |
|---|---|---|
error required | api_errors |