Refund a Charge or a PaymentIntent in-person 

Initiates a refund on a Reader

Parameters

  • amountinteger

    A positive integer in cents representing how much of this charge to refund.

  • chargestring

    ID of the Charge to refund.

  • metadatamap

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

  • payment_intentstring

    ID of the PaymentIntent to refund.

  • refund_application_feebooleanConnect only

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

  • reverse_transferbooleanConnect only

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

More parameters

  • refund_payment_configmap

Returns

Returns an updated Reader resource

POST /v1/terminal/readers/:id/refund_payment
stripe.Key = "sk_test_BQokikJ...2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2"
params := &stripe.TerminalReaderRefundPaymentParams{
PaymentIntent: stripe.String("pi_1NrpbFBHO5VeT9SUiCEDMdc8"),
};
result, err := reader.RefundPayment("tmr_njDFG9Z5k7y7KeQI8RmZYDYT", params);
Response
{
"id": "tmr_njDFG9Z5k7y7KeQI8RmZYDYT",
"object": "terminal.reader",
"action": {
"failure_code": null,
"failure_message": null,
"refund_payment": {
"payment_intent": "pi_1NrpbFBHO5VeT9SUiCEDMdc8",
"amount": 1000
},
"status": "in_progress",
"type": "refund_payment"
},
"device_deploy_group": null,
"device_sw_version": null,
"device_type": "bbpos_wisepos_e",
"ip_address": "192.168.2.2",
"label": "Blue Rabbit",
"livemode": false,
"location": null,
"metadata": {},
"serial_number": "123-456-789",
"software": null,
"status": "online"
}

Set reader display 

Sets reader display to show cart details.

Parameters

  • typeenumRequired

    Type

  • cartmap

    Cart

Returns

Returns an updated Reader resource.

POST /v1/terminal/readers/:id/set_reader_display
stripe.Key = "sk_test_BQokikJ...2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2"
params := &stripe.TerminalReaderSetReaderDisplayParams{
Type: stripe.String("cart"),
Cart: &stripe.TerminalReaderSetReaderDisplayCartParams{
Currency: stripe.String(stripe.CurrencyUSD),
LineItems: []*stripe.TerminalReaderSetReaderDisplayCartLineItemParams{
&stripe.TerminalReaderSetReaderDisplayCartLineItemParams{
Amount: stripe.Int64(5100),
Description: stripe.String("Red t-shirt"),
Quantity: stripe.Int64(1),
},
},
Tax: stripe.Int64(100),
Total: stripe.Int64(5200),
},
};
result, err := reader.SetReaderDisplay("tmr_FDOt2wlRZEdpd7", params);
Response
{
"id": "tmr_FDOt2wlRZEdpd7",
"object": "terminal.reader",
"action": {
"failure_code": null,
"failure_message": null,
"set_reader_display": {
"cart": {
"currency": "usd",
"line_items": [
{
"amount": 5100,
"description": "Red t-shirt",
"quantity": 1
}
],
"tax": 100,
"total": 5200
},
"type": "cart"
},
"status": "in_progress",
"type": "set_reader_display"
},
"device_sw_version": "",
"device_type": "simulated_wisepos_e",
"ip_address": "0.0.0.0",
"label": "Blue Rabbit",
"last_seen_at": 1695166525506,
"livemode": false,
"location": "tml_FDOtHwxAAdIJOh",
"metadata": {},
"serial_number": "259cd19c-b902-4730-96a1-09183be6e7f7",
"status": "online"
}

Simulate presenting a payment method Test helper

Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction.

Parameters

  • card_presentmap

    Simulated data for the card_present payment method.

  • typeenum

    Simulated payment type.

    Possible enum values
    card_present

    Simulate a card_present payment method

    interac_present

    Simulate a interac_present payment method

More parameters

  • amount_tipinteger

  • interac_presentmap

Returns

Returns an updated Reader resource.

POST /v1/test_helpers/terminal/readers/:id/present_payment_method
stripe.Key = "sk_test_BQokikJ...2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2"
params := &stripe.TestHelpersTerminalReaderPresentPaymentMethodParams{};
result, err := reader.PresentPaymentMethod("tmr_gLeqlF03xvlBympS9RfZqdpF", params);
Response
{
"id": "tmr_gLeqlF03xvlBympS9RfZqdpF",
"object": "terminal.reader",
"action": {
"failure_code": null,
"failure_message": null,
"process_payment_intent": {
"payment_intent": "pi_1Gt0582eZvKYlo2CGSidzWqK"
},
"status": "succeeded",
"type": "process_payment_intent"
},
"device_sw_version": null,
"device_type": "bbpos_wisepos_e",
"ip_address": "192.168.2.2",
"label": "Blue Rabbit",
"last_seen_at": null,
"livemode": false,
"location": null,
"metadata": {},
"serial_number": "123-456-789",
"status": "online"
}

Terminal Hardware Product Preview

A TerminalHardwareProduct is a category of hardware devices that are generally similar, but may have variations depending on the country it’s shipped to.

TerminalHardwareSKUs represent variations within the same Product (for example, a country specific device). For example, WisePOS E is a TerminalHardwareProduct and a WisePOS E - US and WisePOS E - UK are TerminalHardwareSKUs.