Skip to content

Stripe: Refund a Charge or a Payment Intent in-person

Stripe terminal.postTerminalReadersReaderRefundPayment: arguments, response, policy and SDK examples.

← Terminal operations · Get started

Operation stripe.postterminalreadersreaderrefundpayment

Provider route: POST /v1/terminal/readers/{reader}/refund_payment. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/stripe with npm, or alter-sdk-stripe with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { StripeIntegration } from "@alter-ai/stripe";
async function execute(input: Parameters<StripeIntegration["terminal"]["postTerminalReadersReaderRefundPayment"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new StripeIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.terminal.postTerminalReadersReaderRefundPayment(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_stripe import StripeIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = StripeIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.terminal.post_terminal_readers_reader_refund_payment(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.readerstringRequired within parentMaximum length: 5000
headersobjectOptionalAdditional keys: not allowed
headers.Idempotency-KeystringOptionalMinimum length: 1
Maximum length: 255
bodyobjectOptionalAdditional keys: not allowed
body.amountintegerOptionalA positive integer in cents representing how much of this charge to refund.
body.chargestringOptionalID of the Charge to refund.
Maximum length: 5000
body.expandarrayOptionalSpecifies which fields in the response should be expanded.
body.expand[]stringEach itemMaximum length: 5000
body.metadataobjectOptionalSet 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`.
Additional keys: see wildcard field
body.metadata.*stringAdditional keys
body.payment_intentstringOptionalID of the PaymentIntent to refund.
Maximum length: 5000
body.refund_application_feebooleanOptionalBoolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge.
body.refund_payment_configobjectOptionalConfiguration overrides for this refund, such as customer cancellation settings.
body.refund_payment_config.enable_customer_cancellationbooleanOptional
body.reverse_transferbooleanOptionalBoolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount). A transfer can be reversed only by the application that created the charge.

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Create a Reader — response body

Referenced models: Create a Reader — response body

734 more schemas are linked from the tables above, on the schema pages.

Create a Reader — response body
FieldTypePresenceDescription and constraints
$objectRootA Reader represents a physical device for accepting payment details.

Related guide: [Connecting to a reader](https://docs.stripe.com/terminal/payments/connect-reader)
actionJSONOptional
action (anyOf 1)JSONAlternativeThe most recent action performed by the reader.
action (anyOf 1) (anyOf 1)ModelAlternativeExpand Create a Reader — response body — action / The most recent action performed by the reader / status: failed, in progress, succeeded
action (anyOf 2)nullAlternative
device_sw_versionJSONOptional
device_sw_version (anyOf 1)stringAlternativeThe current software version of the reader.
Maximum length: 5000
device_sw_version (anyOf 2)nullAlternative
device_typestringRequired within parentDevice type of the reader.
Known values: bbpos_chipper2x, bbpos_wisepad3, bbpos_wisepos_e, mobile_phone_reader, simulated_stripe_s700, simulated_stripe_s710, simulated_verifone_m425, simulated_verifone_p630, simulated_verifone_ux700, simulated_verifone_v660p, simulated_wisepos_e, stripe_m2, stripe_s700, stripe_s710, verifone_P400, verifone_m425, verifone_p630, verifone_ux700, verifone_v660p
idstringRequired within parentUnique identifier for the object.
Maximum length: 5000
ip_addressJSONOptional
ip_address (anyOf 1)stringAlternativeThe local IP address of the reader.
Maximum length: 5000
ip_address (anyOf 2)nullAlternative
labelstringRequired within parentCustom label given to the reader for easier identification.
Maximum length: 5000
last_seen_atJSONOptional
last_seen_at (anyOf 1)JSONAlternative
last_seen_at (anyOf 1) (anyOf 1)integerAlternativeThe last time this reader reported to Stripe backend. Timestamp is measured in milliseconds since the Unix epoch. Unlike most other Stripe timestamp fields which use seconds, this field uses milliseconds.
Format: unix-time
last_seen_at (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
last_seen_at (anyOf 2)nullAlternative
livemodebooleanRequired within parentIf the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
locationJSONOptional
location (anyOf 1)JSONAlternativeThe location identifier of the reader.
location (anyOf 1) (anyOf 1)stringAlternativeMaximum length: 5000
location (anyOf 1) (anyOf 2)ModelAlternativeExpand Create a Location — response body
location (anyOf 2)nullAlternative
metadataobjectRequired within parentSet 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.
Additional keys: see wildcard field
metadata.*stringAdditional keysMaximum length: 500
objectstringRequired within parentString representing the object's type. Objects of the same type share the same value.
Known values: terminal.reader
serial_numberstringRequired within parentSerial number of the reader.
Maximum length: 5000
statusJSONOptional
status (anyOf 1)stringAlternativeThe networking status of the reader. This value is `null` for mobile readers. We do not recommend using this field in flows that may block taking payments.
Known values: offline, online
status (anyOf 2)nullAlternative

Referenced models: Create a Location — response body, Create a Reader — response body — action / The most recent action performed by the reader / status: failed, in progress, succeeded

Create a Location — response body
FieldTypePresenceDescription and constraints
$objectRootA Location represents a grouping of readers.

Related guide: [Fleet management](https://docs.stripe.com/terminal/fleet/locations)
addressModelRequired within parentExpand Create a Location — response body — address
address_kanaModelOptionalExpand Create a Location — response body — address kana
address_kanjiModelOptionalExpand Create a Location — response body — address kana
configuration_overridesstringOptionalThe ID of a configuration that will be used to customize all readers in this location.
Maximum length: 5000
display_namestringRequired within parentThe display name of the location.
Maximum length: 5000
display_name_kanastringOptionalThe Kana variation of the display name of the location.
Maximum length: 5000
display_name_kanjistringOptionalThe Kanji variation of the display name of the location.
Maximum length: 5000
idstringRequired within parentUnique identifier for the object.
Maximum length: 5000
livemodebooleanRequired within parentIf the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
metadataobjectRequired within parentSet 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.
Additional keys: see wildcard field
metadata.*stringAdditional keysMaximum length: 500
objectstringRequired within parentString representing the object's type. Objects of the same type share the same value.
Known values: terminal.location
phonestringOptionalThe phone number of the location.
Maximum length: 5000

Referenced models: Create a Location — response body — address, Create a Location — response body — address kana

Create a Location — response body — address
FieldTypePresenceDescription and constraints
$objectRoot
cityJSONOptional
city (anyOf 1)stringAlternativeCity, district, suburb, town, or village.
Maximum length: 5000
city (anyOf 2)nullAlternative
countryJSONOptional
country (anyOf 1)stringAlternativeTwo-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
Maximum length: 5000
country (anyOf 2)nullAlternative
line1JSONOptional
line1 (anyOf 1)stringAlternativeAddress line 1, such as the street, PO Box, or company name.
Maximum length: 5000
line1 (anyOf 2)nullAlternative
line2JSONOptional
line2 (anyOf 1)stringAlternativeAddress line 2, such as the apartment, suite, unit, or building.
Maximum length: 5000
line2 (anyOf 2)nullAlternative
postal_codeJSONOptional
postal_code (anyOf 1)stringAlternativeZIP or postal code.
Maximum length: 5000
postal_code (anyOf 2)nullAlternative
stateJSONOptional
state (anyOf 1)stringAlternativeState, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
Maximum length: 5000
state (anyOf 2)nullAlternative
Create a Location — response body — address kana
FieldTypePresenceDescription and constraints
$objectRoot
cityJSONOptional
city (anyOf 1)stringAlternativeCity/Ward.
Maximum length: 5000
city (anyOf 2)nullAlternative
countryJSONOptional
country (anyOf 1)stringAlternativeTwo-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
Maximum length: 5000
country (anyOf 2)nullAlternative
line1JSONOptional
line1 (anyOf 1)stringAlternativeBlock/Building number.
Maximum length: 5000
line1 (anyOf 2)nullAlternative
line2JSONOptional
line2 (anyOf 1)stringAlternativeBuilding details.
Maximum length: 5000
line2 (anyOf 2)nullAlternative
postal_codeJSONOptional
postal_code (anyOf 1)stringAlternativeZIP or postal code.
Maximum length: 5000
postal_code (anyOf 2)nullAlternative
stateJSONOptional
state (anyOf 1)stringAlternativePrefecture.
Maximum length: 5000
state (anyOf 2)nullAlternative
townJSONOptional
town (anyOf 1)stringAlternativeTown/cho-me.
Maximum length: 5000
town (anyOf 2)nullAlternative
Create a Reader — response body — action / The most recent action performed by the reader / status: failed, in progress, succeeded print content
FieldTypePresenceDescription and constraints
$objectRootRepresents a reader action to print content
imageModelOptionalExpand Create a Reader — response body — action / The most recent action performed by the reader / status: failed, in progress, succeeded print content image
typestringRequired within parentThe type of content to print. Currently supports `image`.
Known values: image

Referenced models: Create a Reader — response body — action / The most recent action performed by the reader / status: failed, in progress, succeeded print content image

SDK function policy ID: stripe.postterminalreadersreaderrefundpayment. Catalog operation: PostTerminalReadersReaderRefundPayment. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Pinned headers: {"Stripe-Version": "2026-09-30.endive"}

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.