Stripe | Financial Infrastructure to Grow Your Revenue

Stripe | Financial Infrastructure to Grow Your Revenue

4466 articles

Create a test-mode unlinked refund


Create a test-mode unlinked refund Test helper

POST / v1 / test_helpers / issuing / transactions / create_unlinked_refund

Allows the user to refund an arbitrary amount, also known as a unlinked refund.

Parameters

  • amount integer Required The total amount to attempt to refund. This amount is in the provided currency, or defaults to the cards currency, and in the smallest currency unit.
  • card string Required Card associated with this unlinked refund transaction.
  • currency enum The currency of the unlinked refund. If not provided, defaults to the currency of the card. Three-letter ISO currency code, in lowercase. Must be a supported currency.

More parameters

  • merchant _ data object
  • purchase _ details object

Returns

A Transaction object

Response

{ "id": "ipi_1GswaK2eZvKYlo2Co7wmNJhD", "object": "issuing.transaction", "amount": -1000, "amount_details": { "atm_fee": null, "cashback_amount": null }, "authorization": "iauth_1GswaJ2eZvKYlo2Ct9mFMJ4S", "balance_transaction": "txn_1GswaK2eZvKYlo2CJAFFIuHg", "card": "ic_1Gswa82eZvKYlo2CP2jveFil", "cardholder": "ich_1Gswa82eZvKYlo2CvobneLSo", "created": 1591905672, "currency": "usd", "dispute": null, "livemode": false, "merchant_amount": -1000, "merchant_currency": "usd", "merchant_data": { "category": "computer_software_stores", "category_code": "5734", "city": "SAN FRANCISCO", "country": "US", "name": "STRIPE.COM", "network_id": "1234567890", "postal_code": "94103", "state": "CA", "terminal_id": null }, "metadata": { "order_id": "6735" }, "redaction": null, "type": "capture", "wallet": null}

Refund a test-mode transaction Test helper

POST / v1 / test_helpers / issuing / transactions /:id / refund

Refund a test-mode Transaction.

Parameters

  • refund _ amount integer The total amount to attempt to refund. This amount is in the provided currency, or defaults to the cards currency, and in the smallest currency unit.

Returns

A Transaction object. This will be the Transaction object of type capture referenced in the request’s URL, not the new Transaction object of type refund that will be created as a side-effect of this API call. To find the newly created Transaction object, you can use the Retrieve an authorization API, whose response will contain a list of related Transaction IDs, including the newly created Transaction of type refund. You can also use the List all transactions API, or listen for the issuing_transaction.created webhook event to retrieve the newly created Transaction of type refund.

Response

{ "id": "ipi_1GswaK2eZvKYlo2Co7wmNJhD", "object": "issuing.transaction", "amount": -1000, "amount_details": { "atm_fee": null, "cashback_amount": null }, "authorization": "iauth_1GswaJ2eZvKYlo2Ct9mFMJ4S", "balance_transaction": "txn_1GswaK2eZvKYlo2CJAFFIuHg", "card": "ic_1Gswa82eZvKYlo2CP2jveFil", "cardholder": "ich_1Gswa82eZvKYlo2CvobneLSo", "created": 1591905672, "currency": "usd", "dispute": null, "livemode": false, "merchant_amount": -1000, "merchant_currency": "usd", "merchant_data": { "category": "computer_software_stores", "category_code": "5734", "city": "SAN FRANCISCO", "country": "US", "name": "STRIPE.COM", "network_id": "1234567890", "postal_code": "94103", "state": "CA", "terminal_id": null }, "metadata": { "order_id": "6735" }, "redaction": null, "type": "capture", "wallet": null}
Last verified 2026-09-24

Is this helpful?