https://api.knoxapi.com- GET/
v1/ payment_records - POST/
v1/ payment_records/ report_payment - GET/
v1/ payment_records/ {id} - POST/
v1/ payment_records/ {id}/ report_payment_attempt - POST/
v1/ payment_records/ {id}/ report_payment_attempt_canceled - POST/
v1/ payment_records/ {id}/ report_payment_attempt_failed - POST/
v1/ payment_records/ {id}/ report_payment_attempt_guaranteed - POST/
v1/ payment_records/ {id}/ report_payment_attempt_informational - POST/
v1/ payment_records/ {id}/ report_refund
List Payment Records
GET/v1/payment_records
List all the Payment Records for a given merchant.
Query parameters
created_afterintegerOnly return Payment Records that were created after this unix timestamp.
created_beforeintegerOnly return Payment Records that were created before this unix timestamp.
ending_beforestringA cursor for use in pagination.
ending_beforeis an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting withobj_bar, your subsequent call can includeending_before=obj_barin order to fetch the previous page of the list.expandarray of stringsSpecifies which fields in the response should be expanded.
limitintegerA limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
starting_afterstringA cursor for use in pagination.
starting_afteris an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending withobj_foo, your subsequent call can includestarting_after=obj_fooin order to fetch the next page of the list.
Returns
A list of payment_record objects.
curl -G https://api.knoxapi.com/v1/payment_records \
-H "Authorization: Bearer $KNOX_SECRET_KEY" \
--data-urlencode limit=3const Stripe = require('stripe');
const stripe = new Stripe(process.env.KNOX_SECRET_KEY, {host: 'api.knoxapi.com'});
const response = await stripe.rawRequest('GET', '/v1/payment_records', {
limit: 3,
});import os
import stripe
client = stripe.StripeClient(
os.environ["KNOX_SECRET_KEY"],
base_addresses={"api": "https://api.knoxapi.com"},
)
response = client.raw_request("get", "/v1/payment_records", limit=3)require 'stripe'
Stripe.api_key = ENV['KNOX_SECRET_KEY']
Stripe.api_base = 'https://api.knoxapi.com'
response = Stripe.raw_request(:get, '/v1/payment_records', {
limit: 3,
}){
"object": "list",
"url": "/v1/payment_records",
"has_more": false,
"data": [
{
"amount": {
"currency": "usd",
"value": 111972721
},
"amount_authorized": {
"currency": "usd",
"value": 111972721
},
"amount_canceled": {
"currency": "usd",
"value": 111972721
},
"amount_failed": {
"currency": "usd",
"value": 111972721
},
"amount_guaranteed": {
"currency": "usd",
"value": 111972721
},
"amount_refunded": {
"currency": "usd",
"value": 111972721
},
"amount_requested": {
"currency": "usd",
"value": 111972721
},
"application": null,
"created": 1028554472,
"customer_details": {
"customer": null,
"email": null,
"name": null,
"phone": null
},
"customer_presence": null,
"description": null,
"id": "obj_123",
"latest_payment_attempt_record": null,
"livemode": true,
"metadata": {
"key": "metadata"
},
"object": "payment_record",
"payment_method_details": {
"billing_details": {
"address": {
"city": null,
"country": null,
"line1": null,
"line2": null,
"postal_code": null,
"state": null
},
"email": null,
"name": null,
"phone": null
},
"payment_method": null,
"type": "type"
},
"processor_details": {
"type": "custom"
},
"shipping_details": {
"address": {
"city": null,
"country": null,
"line1": null,
"line2": null,
"postal_code": null,
"state": null
},
"name": null,
"phone": null
},
"reported_by": "stripe"
}
]
}Report a payment
POST/v1/payment_records/report_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.
Body parameters
amount_requestedobjectRequiredThe amount you initially requested for this payment.
Show 2 child parameters
currencystringRequiredvalueintegerRequired
initiated_atintegerRequiredWhen the reported payment was initiated. Measured in seconds since the Unix epoch.
payment_method_detailsobjectRequiredInformation about the Payment Method debited for this payment.
Show 4 child parameters
billing_detailsobjectShow 4 child parameters
addressobjectChild parameters are listed in the OpenAPI document.
emailstringnamestringphonestring
customobjectShow 2 child parameters
display_namestringtypestring
payment_methodstringtypestringPossible valuescustom
customer_detailsobjectCustomer information for this payment.
Show 4 child parameters
customerstringemailstringnamestringphonestring
customer_presencestringIndicates whether the customer was present in your checkout flow during this payment.
Possible valuesoff_sessionon_session
descriptionstringAn arbitrary string attached to the object. Often useful for displaying to users.
expandarray of stringsSpecifies which fields in the response should be expanded.
failedobjectInformation about the payment attempt failure.
Show 1 child parameter
failed_atintegerRequired
guaranteedobjectInformation about the payment attempt guarantee.
Show 1 child parameter
guaranteed_atintegerRequired
metadataobjectSet of key-value pairs 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.
Possible valuesfailedguaranteed
processor_detailsobjectProcessor information for this payment.
Show 2 child parameters
typestringRequiredPossible valuescustom
customobjectShow 1 child parameter
payment_referencestringRequired
shipping_detailsobjectShipping information for this payment.
Show 3 child parameters
addressobjectShow 6 child parameters
citystringcountrystringline1stringline2stringpostal_codestringstatestring
namestringphonestring
Returns
The payment_record object.
curl https://api.knoxapi.com/v1/payment_records/report_payment \
-H "Authorization: Bearer $KNOX_SECRET_KEY" \
-d "amount_requested[currency]=usd" \
-d "amount_requested[value]=111972721" \
-d initiated_at=1 \
-d payment_method_details=const Stripe = require('stripe');
const stripe = new Stripe(process.env.KNOX_SECRET_KEY, {host: 'api.knoxapi.com'});
const response = await stripe.rawRequest('POST', '/v1/payment_records/report_payment', {
amount_requested: {
currency: 'usd',
value: 111972721,
},
initiated_at: 1,
payment_method_details: {},
});import os
import stripe
client = stripe.StripeClient(
os.environ["KNOX_SECRET_KEY"],
base_addresses={"api": "https://api.knoxapi.com"},
)
response = client.raw_request("post", "/v1/payment_records/report_payment", amount_requested={
"currency": "usd",
"value": 111972721,
}, initiated_at=1, payment_method_details={})require 'stripe'
Stripe.api_key = ENV['KNOX_SECRET_KEY']
Stripe.api_base = 'https://api.knoxapi.com'
response = Stripe.raw_request(:post, '/v1/payment_records/report_payment', {
amount_requested: {
currency: 'usd',
value: 111972721,
},
initiated_at: 1,
payment_method_details: {},
}){
"amount": {
"currency": "usd",
"value": 111972721
},
"amount_authorized": {
"currency": "usd",
"value": 111972721
},
"amount_canceled": {
"currency": "usd",
"value": 111972721
},
"amount_failed": {
"currency": "usd",
"value": 111972721
},
"amount_guaranteed": {
"currency": "usd",
"value": 111972721
},
"amount_refunded": {
"currency": "usd",
"value": 111972721
},
"amount_requested": {
"currency": "usd",
"value": 111972721
},
"application": null,
"created": 1028554472,
"customer_details": {
"customer": null,
"email": null,
"name": null,
"phone": null
},
"customer_presence": null,
"description": null,
"id": "obj_123",
"latest_payment_attempt_record": null,
"livemode": true,
"metadata": {
"key": "metadata"
},
"object": "payment_record",
"payment_method_details": {
"billing_details": {
"address": {
"city": null,
"country": null,
"line1": null,
"line2": null,
"postal_code": null,
"state": null
},
"email": null,
"name": null,
"phone": null
},
"payment_method": null,
"type": "type"
},
"processor_details": {
"type": "custom"
},
"shipping_details": {
"address": {
"city": null,
"country": null,
"line1": null,
"line2": null,
"postal_code": null,
"state": null
},
"name": null,
"phone": null
},
"reported_by": "stripe"
}Retrieve a Payment Record
GET/v1/payment_records/{id}
Retrieves a Payment Record with the given ID
Path parameters
idstringRequiredThe ID of the Payment Record.
Query parameters
expandarray of stringsSpecifies which fields in the response should be expanded.
Returns
The payment_record object.
curl https://api.knoxapi.com/v1/payment_records/obj_123 \
-H "Authorization: Bearer $KNOX_SECRET_KEY"const Stripe = require('stripe');
const stripe = new Stripe(process.env.KNOX_SECRET_KEY, {host: 'api.knoxapi.com'});
const response = await stripe.rawRequest('GET', '/v1/payment_records/obj_123');import os
import stripe
client = stripe.StripeClient(
os.environ["KNOX_SECRET_KEY"],
base_addresses={"api": "https://api.knoxapi.com"},
)
response = client.raw_request("get", "/v1/payment_records/obj_123")require 'stripe'
Stripe.api_key = ENV['KNOX_SECRET_KEY']
Stripe.api_base = 'https://api.knoxapi.com'
response = Stripe.raw_request(:get, '/v1/payment_records/obj_123'){
"amount": {
"currency": "usd",
"value": 111972721
},
"amount_authorized": {
"currency": "usd",
"value": 111972721
},
"amount_canceled": {
"currency": "usd",
"value": 111972721
},
"amount_failed": {
"currency": "usd",
"value": 111972721
},
"amount_guaranteed": {
"currency": "usd",
"value": 111972721
},
"amount_refunded": {
"currency": "usd",
"value": 111972721
},
"amount_requested": {
"currency": "usd",
"value": 111972721
},
"application": null,
"created": 1028554472,
"customer_details": {
"customer": null,
"email": null,
"name": null,
"phone": null
},
"customer_presence": null,
"description": null,
"id": "obj_123",
"latest_payment_attempt_record": null,
"livemode": true,
"metadata": {
"key": "metadata"
},
"object": "payment_record",
"payment_method_details": {
"billing_details": {
"address": {
"city": null,
"country": null,
"line1": null,
"line2": null,
"postal_code": null,
"state": null
},
"email": null,
"name": null,
"phone": null
},
"payment_method": null,
"type": "type"
},
"processor_details": {
"type": "custom"
},
"shipping_details": {
"address": {
"city": null,
"country": null,
"line1": null,
"line2": null,
"postal_code": null,
"state": null
},
"name": null,
"phone": null
},
"reported_by": "stripe"
}Report a payment attempt
POST/v1/payment_records/{id}/report_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.
Path parameters
idstringRequiredThe ID of the Payment Record.
Body parameters
initiated_atintegerRequiredWhen the reported payment was initiated. Measured in seconds since the Unix epoch.
descriptionstringAn arbitrary string attached to the object. Often useful for displaying to users.
expandarray of stringsSpecifies which fields in the response should be expanded.
failedobjectInformation about the payment attempt failure.
Show 1 child parameter
failed_atintegerRequired
guaranteedobjectInformation about the payment attempt guarantee.
Show 1 child parameter
guaranteed_atintegerRequired
metadataobjectSet of key-value pairs 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.
Possible valuesfailedguaranteed
payment_method_detailsobjectInformation about the Payment Method debited for this payment.
Show 4 child parameters
billing_detailsobjectShow 4 child parameters
addressobjectChild parameters are listed in the OpenAPI document.
emailstringnamestringphonestring
customobjectShow 2 child parameters
display_namestringtypestring
payment_methodstringtypestringPossible valuescustom
shipping_detailsobjectShipping information for this payment.
Show 3 child parameters
addressobjectShow 6 child parameters
citystringcountrystringline1stringline2stringpostal_codestringstatestring
namestringphonestring
Returns
The payment_record object.
curl https://api.knoxapi.com/v1/payment_records/obj_123/report_payment_attempt \
-H "Authorization: Bearer $KNOX_SECRET_KEY" \
-d initiated_at=1const Stripe = require('stripe');
const stripe = new Stripe(process.env.KNOX_SECRET_KEY, {host: 'api.knoxapi.com'});
const response = await stripe.rawRequest('POST', '/v1/payment_records/obj_123/report_payment_attempt', {
initiated_at: 1,
});import os
import stripe
client = stripe.StripeClient(
os.environ["KNOX_SECRET_KEY"],
base_addresses={"api": "https://api.knoxapi.com"},
)
response = client.raw_request("post", "/v1/payment_records/obj_123/report_payment_attempt", initiated_at=1)require 'stripe'
Stripe.api_key = ENV['KNOX_SECRET_KEY']
Stripe.api_base = 'https://api.knoxapi.com'
response = Stripe.raw_request(:post, '/v1/payment_records/obj_123/report_payment_attempt', {
initiated_at: 1,
}){
"amount": {
"currency": "usd",
"value": 111972721
},
"amount_authorized": {
"currency": "usd",
"value": 111972721
},
"amount_canceled": {
"currency": "usd",
"value": 111972721
},
"amount_failed": {
"currency": "usd",
"value": 111972721
},
"amount_guaranteed": {
"currency": "usd",
"value": 111972721
},
"amount_refunded": {
"currency": "usd",
"value": 111972721
},
"amount_requested": {
"currency": "usd",
"value": 111972721
},
"application": null,
"created": 1028554472,
"customer_details": {
"customer": null,
"email": null,
"name": null,
"phone": null
},
"customer_presence": null,
"description": null,
"id": "obj_123",
"latest_payment_attempt_record": null,
"livemode": true,
"metadata": {
"key": "metadata"
},
"object": "payment_record",
"payment_method_details": {
"billing_details": {
"address": {
"city": null,
"country": null,
"line1": null,
"line2": null,
"postal_code": null,
"state": null
},
"email": null,
"name": null,
"phone": null
},
"payment_method": null,
"type": "type"
},
"processor_details": {
"type": "custom"
},
"shipping_details": {
"address": {
"city": null,
"country": null,
"line1": null,
"line2": null,
"postal_code": null,
"state": null
},
"name": null,
"phone": null
},
"reported_by": "stripe"
}Report payment attempt canceled
POST/v1/payment_records/{id}/report_payment_attempt_canceled
Report that the most recent payment attempt on the specified Payment Record was canceled.
Path parameters
idstringRequiredThe ID of the Payment Record.
Body parameters
canceled_atintegerRequiredWhen the reported payment was canceled. Measured in seconds since the Unix epoch.
expandarray of stringsSpecifies which fields in the response should be expanded.
metadataobjectSet of key-value pairs 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.
Returns
The payment_record object.
curl https://api.knoxapi.com/v1/payment_records/obj_123/report_payment_attempt_canceled \
-H "Authorization: Bearer $KNOX_SECRET_KEY" \
-d canceled_at=1const Stripe = require('stripe');
const stripe = new Stripe(process.env.KNOX_SECRET_KEY, {host: 'api.knoxapi.com'});
const response = await stripe.rawRequest('POST', '/v1/payment_records/obj_123/report_payment_attempt_canceled', {
canceled_at: 1,
});import os
import stripe
client = stripe.StripeClient(
os.environ["KNOX_SECRET_KEY"],
base_addresses={"api": "https://api.knoxapi.com"},
)
response = client.raw_request("post", "/v1/payment_records/obj_123/report_payment_attempt_canceled", canceled_at=1)require 'stripe'
Stripe.api_key = ENV['KNOX_SECRET_KEY']
Stripe.api_base = 'https://api.knoxapi.com'
response = Stripe.raw_request(:post, '/v1/payment_records/obj_123/report_payment_attempt_canceled', {
canceled_at: 1,
}){
"amount": {
"currency": "usd",
"value": 111972721
},
"amount_authorized": {
"currency": "usd",
"value": 111972721
},
"amount_canceled": {
"currency": "usd",
"value": 111972721
},
"amount_failed": {
"currency": "usd",
"value": 111972721
},
"amount_guaranteed": {
"currency": "usd",
"value": 111972721
},
"amount_refunded": {
"currency": "usd",
"value": 111972721
},
"amount_requested": {
"currency": "usd",
"value": 111972721
},
"application": null,
"created": 1028554472,
"customer_details": {
"customer": null,
"email": null,
"name": null,
"phone": null
},
"customer_presence": null,
"description": null,
"id": "obj_123",
"latest_payment_attempt_record": null,
"livemode": true,
"metadata": {
"key": "metadata"
},
"object": "payment_record",
"payment_method_details": {
"billing_details": {
"address": {
"city": null,
"country": null,
"line1": null,
"line2": null,
"postal_code": null,
"state": null
},
"email": null,
"name": null,
"phone": null
},
"payment_method": null,
"type": "type"
},
"processor_details": {
"type": "custom"
},
"shipping_details": {
"address": {
"city": null,
"country": null,
"line1": null,
"line2": null,
"postal_code": null,
"state": null
},
"name": null,
"phone": null
},
"reported_by": "stripe"
}Report payment attempt failed
POST/v1/payment_records/{id}/report_payment_attempt_failed
Report that the most recent payment attempt on the specified Payment Record failed or errored.
Path parameters
idstringRequiredThe ID of the Payment Record.
Body parameters
failed_atintegerRequiredWhen the reported payment failed. Measured in seconds since the Unix epoch.
expandarray of stringsSpecifies which fields in the response should be expanded.
metadataobjectSet of key-value pairs 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.
Returns
The payment_record object.
curl https://api.knoxapi.com/v1/payment_records/obj_123/report_payment_attempt_failed \
-H "Authorization: Bearer $KNOX_SECRET_KEY" \
-d failed_at=1const Stripe = require('stripe');
const stripe = new Stripe(process.env.KNOX_SECRET_KEY, {host: 'api.knoxapi.com'});
const response = await stripe.rawRequest('POST', '/v1/payment_records/obj_123/report_payment_attempt_failed', {
failed_at: 1,
});import os
import stripe
client = stripe.StripeClient(
os.environ["KNOX_SECRET_KEY"],
base_addresses={"api": "https://api.knoxapi.com"},
)
response = client.raw_request("post", "/v1/payment_records/obj_123/report_payment_attempt_failed", failed_at=1)require 'stripe'
Stripe.api_key = ENV['KNOX_SECRET_KEY']
Stripe.api_base = 'https://api.knoxapi.com'
response = Stripe.raw_request(:post, '/v1/payment_records/obj_123/report_payment_attempt_failed', {
failed_at: 1,
}){
"amount": {
"currency": "usd",
"value": 111972721
},
"amount_authorized": {
"currency": "usd",
"value": 111972721
},
"amount_canceled": {
"currency": "usd",
"value": 111972721
},
"amount_failed": {
"currency": "usd",
"value": 111972721
},
"amount_guaranteed": {
"currency": "usd",
"value": 111972721
},
"amount_refunded": {
"currency": "usd",
"value": 111972721
},
"amount_requested": {
"currency": "usd",
"value": 111972721
},
"application": null,
"created": 1028554472,
"customer_details": {
"customer": null,
"email": null,
"name": null,
"phone": null
},
"customer_presence": null,
"description": null,
"id": "obj_123",
"latest_payment_attempt_record": null,
"livemode": true,
"metadata": {
"key": "metadata"
},
"object": "payment_record",
"payment_method_details": {
"billing_details": {
"address": {
"city": null,
"country": null,
"line1": null,
"line2": null,
"postal_code": null,
"state": null
},
"email": null,
"name": null,
"phone": null
},
"payment_method": null,
"type": "type"
},
"processor_details": {
"type": "custom"
},
"shipping_details": {
"address": {
"city": null,
"country": null,
"line1": null,
"line2": null,
"postal_code": null,
"state": null
},
"name": null,
"phone": null
},
"reported_by": "stripe"
}Report payment attempt guaranteed
POST/v1/payment_records/{id}/report_payment_attempt_guaranteed
Report that the most recent payment attempt on the specified Payment Record was guaranteed.
Path parameters
idstringRequiredThe ID of the Payment Record.
Body parameters
guaranteed_atintegerRequiredWhen the reported payment was guaranteed. Measured in seconds since the Unix epoch.
expandarray of stringsSpecifies which fields in the response should be expanded.
metadataobjectSet of key-value pairs 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.
Returns
The payment_record object.
curl https://api.knoxapi.com/v1/payment_records/obj_123/report_payment_attempt_guaranteed \
-H "Authorization: Bearer $KNOX_SECRET_KEY" \
-d guaranteed_at=1const Stripe = require('stripe');
const stripe = new Stripe(process.env.KNOX_SECRET_KEY, {host: 'api.knoxapi.com'});
const response = await stripe.rawRequest('POST', '/v1/payment_records/obj_123/report_payment_attempt_guaranteed', {
guaranteed_at: 1,
});import os
import stripe
client = stripe.StripeClient(
os.environ["KNOX_SECRET_KEY"],
base_addresses={"api": "https://api.knoxapi.com"},
)
response = client.raw_request("post", "/v1/payment_records/obj_123/report_payment_attempt_guaranteed", guaranteed_at=1)require 'stripe'
Stripe.api_key = ENV['KNOX_SECRET_KEY']
Stripe.api_base = 'https://api.knoxapi.com'
response = Stripe.raw_request(:post, '/v1/payment_records/obj_123/report_payment_attempt_guaranteed', {
guaranteed_at: 1,
}){
"amount": {
"currency": "usd",
"value": 111972721
},
"amount_authorized": {
"currency": "usd",
"value": 111972721
},
"amount_canceled": {
"currency": "usd",
"value": 111972721
},
"amount_failed": {
"currency": "usd",
"value": 111972721
},
"amount_guaranteed": {
"currency": "usd",
"value": 111972721
},
"amount_refunded": {
"currency": "usd",
"value": 111972721
},
"amount_requested": {
"currency": "usd",
"value": 111972721
},
"application": null,
"created": 1028554472,
"customer_details": {
"customer": null,
"email": null,
"name": null,
"phone": null
},
"customer_presence": null,
"description": null,
"id": "obj_123",
"latest_payment_attempt_record": null,
"livemode": true,
"metadata": {
"key": "metadata"
},
"object": "payment_record",
"payment_method_details": {
"billing_details": {
"address": {
"city": null,
"country": null,
"line1": null,
"line2": null,
"postal_code": null,
"state": null
},
"email": null,
"name": null,
"phone": null
},
"payment_method": null,
"type": "type"
},
"processor_details": {
"type": "custom"
},
"shipping_details": {
"address": {
"city": null,
"country": null,
"line1": null,
"line2": null,
"postal_code": null,
"state": null
},
"name": null,
"phone": null
},
"reported_by": "stripe"
}Report payment attempt informational
POST/v1/payment_records/{id}/report_payment_attempt_informational
Report informational updates on the specified Payment Record.
Path parameters
idstringRequiredThe ID of the Payment Record.
Body parameters
customer_detailsobjectCustomer information for this payment.
Show 4 child parameters
customerstringemailstringnamestringphonestring
descriptionstringAn arbitrary string attached to the object. Often useful for displaying to users.
expandarray of stringsSpecifies which fields in the response should be expanded.
metadataobjectSet of key-value pairs 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_detailsobjectShipping information for this payment.
Show 3 child parameters
addressobjectShow 6 child parameters
citystringcountrystringline1stringline2stringpostal_codestringstatestring
namestringphonestring
Returns
The payment_record object.
curl -X POST https://api.knoxapi.com/v1/payment_records/obj_123/report_payment_attempt_informational \
-H "Authorization: Bearer $KNOX_SECRET_KEY"const Stripe = require('stripe');
const stripe = new Stripe(process.env.KNOX_SECRET_KEY, {host: 'api.knoxapi.com'});
const response = await stripe.rawRequest('POST', '/v1/payment_records/obj_123/report_payment_attempt_informational');import os
import stripe
client = stripe.StripeClient(
os.environ["KNOX_SECRET_KEY"],
base_addresses={"api": "https://api.knoxapi.com"},
)
response = client.raw_request("post", "/v1/payment_records/obj_123/report_payment_attempt_informational")require 'stripe'
Stripe.api_key = ENV['KNOX_SECRET_KEY']
Stripe.api_base = 'https://api.knoxapi.com'
response = Stripe.raw_request(:post, '/v1/payment_records/obj_123/report_payment_attempt_informational'){
"amount": {
"currency": "usd",
"value": 111972721
},
"amount_authorized": {
"currency": "usd",
"value": 111972721
},
"amount_canceled": {
"currency": "usd",
"value": 111972721
},
"amount_failed": {
"currency": "usd",
"value": 111972721
},
"amount_guaranteed": {
"currency": "usd",
"value": 111972721
},
"amount_refunded": {
"currency": "usd",
"value": 111972721
},
"amount_requested": {
"currency": "usd",
"value": 111972721
},
"application": null,
"created": 1028554472,
"customer_details": {
"customer": null,
"email": null,
"name": null,
"phone": null
},
"customer_presence": null,
"description": null,
"id": "obj_123",
"latest_payment_attempt_record": null,
"livemode": true,
"metadata": {
"key": "metadata"
},
"object": "payment_record",
"payment_method_details": {
"billing_details": {
"address": {
"city": null,
"country": null,
"line1": null,
"line2": null,
"postal_code": null,
"state": null
},
"email": null,
"name": null,
"phone": null
},
"payment_method": null,
"type": "type"
},
"processor_details": {
"type": "custom"
},
"shipping_details": {
"address": {
"city": null,
"country": null,
"line1": null,
"line2": null,
"postal_code": null,
"state": null
},
"name": null,
"phone": null
},
"reported_by": "stripe"
}Report a refund
POST/v1/payment_records/{id}/report_refund
Report that the most recent payment attempt on the specified Payment Record was refunded.
Path parameters
idstringRequiredThe ID of the Payment Record.
Body parameters
outcomestringRequiredThe outcome of the reported refund.
Possible valuesrefunded
processor_detailsobjectRequiredProcessor information for this refund.
Show 2 child parameters
typestringRequiredPossible valuescustom
customobjectShow 1 child parameter
refund_referencestringRequired
amountobjectA positive integer in the smallest currency unit representing how much of this payment to refund. Can refund only up to the remaining, unrefunded amount of the payment.
Show 2 child parameters
currencystringRequiredvalueintegerRequired
expandarray of stringsSpecifies which fields in the response should be expanded.
initiated_atintegerWhen the reported refund was initiated. Measured in seconds since the Unix epoch.
metadataobjectSet of key-value pairs 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.refundedobjectInformation about the payment attempt refund.
Show 1 child parameter
refunded_atintegerRequired
Returns
The payment_record object.
curl https://api.knoxapi.com/v1/payment_records/obj_123/report_refund \
-H "Authorization: Bearer $KNOX_SECRET_KEY" \
-d outcome=refunded \
-d "processor_details[type]=custom"const Stripe = require('stripe');
const stripe = new Stripe(process.env.KNOX_SECRET_KEY, {host: 'api.knoxapi.com'});
const response = await stripe.rawRequest('POST', '/v1/payment_records/obj_123/report_refund', {
outcome: 'refunded',
processor_details: {
type: 'custom',
},
});import os
import stripe
client = stripe.StripeClient(
os.environ["KNOX_SECRET_KEY"],
base_addresses={"api": "https://api.knoxapi.com"},
)
response = client.raw_request("post", "/v1/payment_records/obj_123/report_refund", outcome="refunded", processor_details={
"type": "custom",
})require 'stripe'
Stripe.api_key = ENV['KNOX_SECRET_KEY']
Stripe.api_base = 'https://api.knoxapi.com'
response = Stripe.raw_request(:post, '/v1/payment_records/obj_123/report_refund', {
outcome: 'refunded',
processor_details: {
type: 'custom',
},
}){
"amount": {
"currency": "usd",
"value": 111972721
},
"amount_authorized": {
"currency": "usd",
"value": 111972721
},
"amount_canceled": {
"currency": "usd",
"value": 111972721
},
"amount_failed": {
"currency": "usd",
"value": 111972721
},
"amount_guaranteed": {
"currency": "usd",
"value": 111972721
},
"amount_refunded": {
"currency": "usd",
"value": 111972721
},
"amount_requested": {
"currency": "usd",
"value": 111972721
},
"application": null,
"created": 1028554472,
"customer_details": {
"customer": null,
"email": null,
"name": null,
"phone": null
},
"customer_presence": null,
"description": null,
"id": "obj_123",
"latest_payment_attempt_record": null,
"livemode": true,
"metadata": {
"key": "metadata"
},
"object": "payment_record",
"payment_method_details": {
"billing_details": {
"address": {
"city": null,
"country": null,
"line1": null,
"line2": null,
"postal_code": null,
"state": null
},
"email": null,
"name": null,
"phone": null
},
"payment_method": null,
"type": "type"
},
"processor_details": {
"type": "custom"
},
"shipping_details": {
"address": {
"city": null,
"country": null,
"line1": null,
"line2": null,
"postal_code": null,
"state": null
},
"name": null,
"phone": null
},
"reported_by": "stripe"
}Operations and schemas come from the pinned Stripe OpenAPI specification (MIT); response examples from its fixtures. Nested object definitions and enums are in the complete specification.