Knox Docs Sign in

API reference

Test mode. Use your secret key on your server; live processing is currently disabled.

https://api.knoxapi.com

Send 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.

GET /v1/payment_records

List Payment Records

List all the Payment Records for a given merchant.

Request parameters

ParameterLocationTypeDescription
created_afterqueryintegerOnly return Payment Records that were created after this unix timestamp.
created_beforequeryintegerOnly return Payment Records that were created before this unix timestamp.
ending_beforequerystringA 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.
expandqueryarray of stringSpecifies which fields in the response should be expanded.
limitqueryintegerA limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
starting_afterquerystringA 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.

object. See the OpenAPI specification for the complete schema.

Responses

HTTP 200: Successful response.
FieldTypeDescription
data requiredarray of payment_record
has_more requiredbooleanTrue if this list has another page of items after this one that can be fetched.
object requiredstringString representing the object's type. Objects of the same type share the same value. Always has the value `list`.
url requiredstringThe URL where this list can be accessed.
HTTP default: Error response.
FieldTypeDescription
error requiredapi_errors
POST /v1/payment_records/report_payment

Report a payment

Report a new Payment Record. You may report a Payment Record as it is initialized and later report updates through the other report_* methods, or report Payment Records in a terminal state directly, through this method.

Request parameters

FieldTypeDescription
amount_requested requiredobjectThe amount you initially requested for this payment.
customer_detailsobjectCustomer information for this payment.
customer_presencestringIndicates whether the customer was present in your checkout flow during this payment.
descriptionstringAn arbitrary string attached to the object. Often useful for displaying to users.
expandarray of stringSpecifies which fields in the response should be expanded.
failedobjectInformation about the payment attempt failure.
guaranteedobjectInformation about the payment attempt guarantee.
initiated_at requiredintegerWhen the reported payment was initiated. Measured in seconds since the Unix epoch.
metadataone of multiple schemasSet 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`.
outcomestringThe outcome of the reported payment.
payment_method_details requiredobjectInformation about the Payment Method debited for this payment.
processor_detailsobjectProcessor information for this payment.
shipping_detailsobjectShipping information for this payment.

Responses

HTTP 200: Successful response.
FieldTypeDescription
amount requiredpayments_primitives_payment_records_resource_amount
amount_authorized requiredpayments_primitives_payment_records_resource_amount
amount_canceled requiredpayments_primitives_payment_records_resource_amount
amount_failed requiredpayments_primitives_payment_records_resource_amount
amount_guaranteed requiredpayments_primitives_payment_records_resource_amount
amount_refunded requiredpayments_primitives_payment_records_resource_amount
amount_requested requiredpayments_primitives_payment_records_resource_amount
applicationstringID of the Connect application that created the PaymentRecord.
created requiredintegerTime at which the object was created. Measured in seconds since the Unix epoch.
customer_detailsone of multiple schemasCustomer information for this payment.
customer_presencestringIndicates whether the customer was present in your checkout flow during this payment.
descriptionstringAn arbitrary string attached to the object. Often useful for displaying to users.
id requiredstringUnique identifier for the object.
latest_payment_attempt_recordstringID of the latest Payment Attempt Record attached to this Payment Record.
livemode requiredbooleanIf the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
metadata requiredobjectSet 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 requiredstringString representing the object's type. Objects of the same type share the same value.
payment_method_detailsone of multiple schemasInformation about the Payment Method debited for this payment.
processor_details requiredpayments_primitives_payment_records_resource_processor_details
reported_by requiredstringIndicates who reported the payment.
shipping_detailsone of multiple schemasShipping information for this payment.
HTTP default: Error response.
FieldTypeDescription
error requiredapi_errors
GET /v1/payment_records/{id}

Retrieve a Payment Record

Retrieves a Payment Record with the given ID

Request parameters

ParameterLocationTypeDescription
expandqueryarray of stringSpecifies which fields in the response should be expanded.
idpathstringThe ID of the Payment Record.

object. See the OpenAPI specification for the complete schema.

Responses

HTTP 200: Successful response.
FieldTypeDescription
amount requiredpayments_primitives_payment_records_resource_amount
amount_authorized requiredpayments_primitives_payment_records_resource_amount
amount_canceled requiredpayments_primitives_payment_records_resource_amount
amount_failed requiredpayments_primitives_payment_records_resource_amount
amount_guaranteed requiredpayments_primitives_payment_records_resource_amount
amount_refunded requiredpayments_primitives_payment_records_resource_amount
amount_requested requiredpayments_primitives_payment_records_resource_amount
applicationstringID of the Connect application that created the PaymentRecord.
created requiredintegerTime at which the object was created. Measured in seconds since the Unix epoch.
customer_detailsone of multiple schemasCustomer information for this payment.
customer_presencestringIndicates whether the customer was present in your checkout flow during this payment.
descriptionstringAn arbitrary string attached to the object. Often useful for displaying to users.
id requiredstringUnique identifier for the object.
latest_payment_attempt_recordstringID of the latest Payment Attempt Record attached to this Payment Record.
livemode requiredbooleanIf the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
metadata requiredobjectSet 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 requiredstringString representing the object's type. Objects of the same type share the same value.
payment_method_detailsone of multiple schemasInformation about the Payment Method debited for this payment.
processor_details requiredpayments_primitives_payment_records_resource_processor_details
reported_by requiredstringIndicates who reported the payment.
shipping_detailsone of multiple schemasShipping information for this payment.
HTTP default: Error response.
FieldTypeDescription
error requiredapi_errors
POST /v1/payment_records/{id}/report_payment_attempt

Report a payment attempt

Report a new payment attempt on the specified Payment Record. A new payment attempt can only be specified if all other payment attempts are canceled or failed.

Request parameters

ParameterLocationTypeDescription
idpathstringThe ID of the Payment Record.
FieldTypeDescription
descriptionstringAn arbitrary string attached to the object. Often useful for displaying to users.
expandarray of stringSpecifies which fields in the response should be expanded.
failedobjectInformation about the payment attempt failure.
guaranteedobjectInformation about the payment attempt guarantee.
initiated_at requiredintegerWhen the reported payment was initiated. Measured in seconds since the Unix epoch.
metadataone of multiple schemasSet 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`.
outcomestringThe outcome of the reported payment.
payment_method_detailsobjectInformation about the Payment Method debited for this payment.
shipping_detailsobjectShipping information for this payment.

Responses

HTTP 200: Successful response.
FieldTypeDescription
amount requiredpayments_primitives_payment_records_resource_amount
amount_authorized requiredpayments_primitives_payment_records_resource_amount
amount_canceled requiredpayments_primitives_payment_records_resource_amount
amount_failed requiredpayments_primitives_payment_records_resource_amount
amount_guaranteed requiredpayments_primitives_payment_records_resource_amount
amount_refunded requiredpayments_primitives_payment_records_resource_amount
amount_requested requiredpayments_primitives_payment_records_resource_amount
applicationstringID of the Connect application that created the PaymentRecord.
created requiredintegerTime at which the object was created. Measured in seconds since the Unix epoch.
customer_detailsone of multiple schemasCustomer information for this payment.
customer_presencestringIndicates whether the customer was present in your checkout flow during this payment.
descriptionstringAn arbitrary string attached to the object. Often useful for displaying to users.
id requiredstringUnique identifier for the object.
latest_payment_attempt_recordstringID of the latest Payment Attempt Record attached to this Payment Record.
livemode requiredbooleanIf the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
metadata requiredobjectSet 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 requiredstringString representing the object's type. Objects of the same type share the same value.
payment_method_detailsone of multiple schemasInformation about the Payment Method debited for this payment.
processor_details requiredpayments_primitives_payment_records_resource_processor_details
reported_by requiredstringIndicates who reported the payment.
shipping_detailsone of multiple schemasShipping information for this payment.
HTTP default: Error response.
FieldTypeDescription
error requiredapi_errors
POST /v1/payment_records/{id}/report_payment_attempt_canceled

Report payment attempt canceled

Report that the most recent payment attempt on the specified Payment Record was canceled.

Request parameters

ParameterLocationTypeDescription
idpathstringThe ID of the Payment Record.
FieldTypeDescription
canceled_at requiredintegerWhen the reported payment was canceled. Measured in seconds since the Unix epoch.
expandarray of stringSpecifies which fields in the response should be expanded.
metadataone of multiple schemasSet 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.
FieldTypeDescription
amount requiredpayments_primitives_payment_records_resource_amount
amount_authorized requiredpayments_primitives_payment_records_resource_amount
amount_canceled requiredpayments_primitives_payment_records_resource_amount
amount_failed requiredpayments_primitives_payment_records_resource_amount
amount_guaranteed requiredpayments_primitives_payment_records_resource_amount
amount_refunded requiredpayments_primitives_payment_records_resource_amount
amount_requested requiredpayments_primitives_payment_records_resource_amount
applicationstringID of the Connect application that created the PaymentRecord.
created requiredintegerTime at which the object was created. Measured in seconds since the Unix epoch.
customer_detailsone of multiple schemasCustomer information for this payment.
customer_presencestringIndicates whether the customer was present in your checkout flow during this payment.
descriptionstringAn arbitrary string attached to the object. Often useful for displaying to users.
id requiredstringUnique identifier for the object.
latest_payment_attempt_recordstringID of the latest Payment Attempt Record attached to this Payment Record.
livemode requiredbooleanIf the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
metadata requiredobjectSet 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 requiredstringString representing the object's type. Objects of the same type share the same value.
payment_method_detailsone of multiple schemasInformation about the Payment Method debited for this payment.
processor_details requiredpayments_primitives_payment_records_resource_processor_details
reported_by requiredstringIndicates who reported the payment.
shipping_detailsone of multiple schemasShipping information for this payment.
HTTP default: Error response.
FieldTypeDescription
error requiredapi_errors
POST /v1/payment_records/{id}/report_payment_attempt_failed

Report payment attempt failed

Report that the most recent payment attempt on the specified Payment Record failed or errored.

Request parameters

ParameterLocationTypeDescription
idpathstringThe ID of the Payment Record.
FieldTypeDescription
expandarray of stringSpecifies which fields in the response should be expanded.
failed_at requiredintegerWhen the reported payment failed. Measured in seconds since the Unix epoch.
metadataone of multiple schemasSet 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.
FieldTypeDescription
amount requiredpayments_primitives_payment_records_resource_amount
amount_authorized requiredpayments_primitives_payment_records_resource_amount
amount_canceled requiredpayments_primitives_payment_records_resource_amount
amount_failed requiredpayments_primitives_payment_records_resource_amount
amount_guaranteed requiredpayments_primitives_payment_records_resource_amount
amount_refunded requiredpayments_primitives_payment_records_resource_amount
amount_requested requiredpayments_primitives_payment_records_resource_amount
applicationstringID of the Connect application that created the PaymentRecord.
created requiredintegerTime at which the object was created. Measured in seconds since the Unix epoch.
customer_detailsone of multiple schemasCustomer information for this payment.
customer_presencestringIndicates whether the customer was present in your checkout flow during this payment.
descriptionstringAn arbitrary string attached to the object. Often useful for displaying to users.
id requiredstringUnique identifier for the object.
latest_payment_attempt_recordstringID of the latest Payment Attempt Record attached to this Payment Record.
livemode requiredbooleanIf the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
metadata requiredobjectSet 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 requiredstringString representing the object's type. Objects of the same type share the same value.
payment_method_detailsone of multiple schemasInformation about the Payment Method debited for this payment.
processor_details requiredpayments_primitives_payment_records_resource_processor_details
reported_by requiredstringIndicates who reported the payment.
shipping_detailsone of multiple schemasShipping information for this payment.
HTTP default: Error response.
FieldTypeDescription
error requiredapi_errors
POST /v1/payment_records/{id}/report_payment_attempt_guaranteed

Report payment attempt guaranteed

Report that the most recent payment attempt on the specified Payment Record was guaranteed.

Request parameters

ParameterLocationTypeDescription
idpathstringThe ID of the Payment Record.
FieldTypeDescription
expandarray of stringSpecifies which fields in the response should be expanded.
guaranteed_at requiredintegerWhen the reported payment was guaranteed. Measured in seconds since the Unix epoch.
metadataone of multiple schemasSet 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.
FieldTypeDescription
amount requiredpayments_primitives_payment_records_resource_amount
amount_authorized requiredpayments_primitives_payment_records_resource_amount
amount_canceled requiredpayments_primitives_payment_records_resource_amount
amount_failed requiredpayments_primitives_payment_records_resource_amount
amount_guaranteed requiredpayments_primitives_payment_records_resource_amount
amount_refunded requiredpayments_primitives_payment_records_resource_amount
amount_requested requiredpayments_primitives_payment_records_resource_amount
applicationstringID of the Connect application that created the PaymentRecord.
created requiredintegerTime at which the object was created. Measured in seconds since the Unix epoch.
customer_detailsone of multiple schemasCustomer information for this payment.
customer_presencestringIndicates whether the customer was present in your checkout flow during this payment.
descriptionstringAn arbitrary string attached to the object. Often useful for displaying to users.
id requiredstringUnique identifier for the object.
latest_payment_attempt_recordstringID of the latest Payment Attempt Record attached to this Payment Record.
livemode requiredbooleanIf the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
metadata requiredobjectSet 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 requiredstringString representing the object's type. Objects of the same type share the same value.
payment_method_detailsone of multiple schemasInformation about the Payment Method debited for this payment.
processor_details requiredpayments_primitives_payment_records_resource_processor_details
reported_by requiredstringIndicates who reported the payment.
shipping_detailsone of multiple schemasShipping information for this payment.
HTTP default: Error response.
FieldTypeDescription
error requiredapi_errors
POST /v1/payment_records/{id}/report_payment_attempt_informational

Report payment attempt informational

Report informational updates on the specified Payment Record.

Request parameters

ParameterLocationTypeDescription
idpathstringThe ID of the Payment Record.
FieldTypeDescription
customer_detailsobjectCustomer information for this payment.
descriptionone of multiple schemasAn arbitrary string attached to the object. Often useful for displaying to users.
expandarray of stringSpecifies which fields in the response should be expanded.
metadataone of multiple schemasSet 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`.
shipping_detailsone of multiple schemasShipping information for this payment.

Responses

HTTP 200: Successful response.
FieldTypeDescription
amount requiredpayments_primitives_payment_records_resource_amount
amount_authorized requiredpayments_primitives_payment_records_resource_amount
amount_canceled requiredpayments_primitives_payment_records_resource_amount
amount_failed requiredpayments_primitives_payment_records_resource_amount
amount_guaranteed requiredpayments_primitives_payment_records_resource_amount
amount_refunded requiredpayments_primitives_payment_records_resource_amount
amount_requested requiredpayments_primitives_payment_records_resource_amount
applicationstringID of the Connect application that created the PaymentRecord.
created requiredintegerTime at which the object was created. Measured in seconds since the Unix epoch.
customer_detailsone of multiple schemasCustomer information for this payment.
customer_presencestringIndicates whether the customer was present in your checkout flow during this payment.
descriptionstringAn arbitrary string attached to the object. Often useful for displaying to users.
id requiredstringUnique identifier for the object.
latest_payment_attempt_recordstringID of the latest Payment Attempt Record attached to this Payment Record.
livemode requiredbooleanIf the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
metadata requiredobjectSet 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 requiredstringString representing the object's type. Objects of the same type share the same value.
payment_method_detailsone of multiple schemasInformation about the Payment Method debited for this payment.
processor_details requiredpayments_primitives_payment_records_resource_processor_details
reported_by requiredstringIndicates who reported the payment.
shipping_detailsone of multiple schemasShipping information for this payment.
HTTP default: Error response.
FieldTypeDescription
error requiredapi_errors
POST /v1/payment_records/{id}/report_refund

Report a refund

Report that the most recent payment attempt on the specified Payment Record was refunded.

Request parameters

ParameterLocationTypeDescription
idpathstringThe ID of the Payment Record.
FieldTypeDescription
amountobjectA positive integer in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal) representing how much of this payment to refund. Can refund only up to the remaining, unrefunded amount of the payment.
expandarray of stringSpecifies which fields in the response should be expanded.
initiated_atintegerWhen the reported refund was initiated. Measured in seconds since the Unix epoch.
metadataone of multiple schemasSet 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`.
outcome requiredstringThe outcome of the reported refund.
processor_details requiredobjectProcessor information for this refund.
refundedobjectInformation about the payment attempt refund.

Responses

HTTP 200: Successful response.
FieldTypeDescription
amount requiredpayments_primitives_payment_records_resource_amount
amount_authorized requiredpayments_primitives_payment_records_resource_amount
amount_canceled requiredpayments_primitives_payment_records_resource_amount
amount_failed requiredpayments_primitives_payment_records_resource_amount
amount_guaranteed requiredpayments_primitives_payment_records_resource_amount
amount_refunded requiredpayments_primitives_payment_records_resource_amount
amount_requested requiredpayments_primitives_payment_records_resource_amount
applicationstringID of the Connect application that created the PaymentRecord.
created requiredintegerTime at which the object was created. Measured in seconds since the Unix epoch.
customer_detailsone of multiple schemasCustomer information for this payment.
customer_presencestringIndicates whether the customer was present in your checkout flow during this payment.
descriptionstringAn arbitrary string attached to the object. Often useful for displaying to users.
id requiredstringUnique identifier for the object.
latest_payment_attempt_recordstringID of the latest Payment Attempt Record attached to this Payment Record.
livemode requiredbooleanIf the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
metadata requiredobjectSet 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 requiredstringString representing the object's type. Objects of the same type share the same value.
payment_method_detailsone of multiple schemasInformation about the Payment Method debited for this payment.
processor_details requiredpayments_primitives_payment_records_resource_processor_details
reported_by requiredstringIndicates who reported the payment.
shipping_detailsone of multiple schemasShipping information for this payment.
HTTP default: Error response.
FieldTypeDescription
error requiredapi_errors