Stripe Test Helpers API
Stripe provides a number of resources for testing your integration. Make sure to test the following use cases before launch, and use our Postman collection to make the testing process simpler.
Stripe provides a number of resources for testing your integration. Make sure to test the following use cases before launch, and use our Postman collection to make the testing process simpler.
openapi: 3.0.0
info:
title: Stripe Accounts Account Test Helpers API
description: This is an object representing a Stripe account. You can retrieve it to see properties on the account like its current requirements or if the account is enabled to make live charges or receive payouts.
contact:
email: dev-platform@stripe.com
name: Stripe Dev Platform Team
url: https://stripe.com
termsOfService: https://stripe.com/us/terms/
version: '2023-10-16'
x-stripeSpecFilename: spec3
servers:
- url: https://api.stripe.com/
security:
- basicAuth: []
- bearerAuth: []
tags:
- name: Test Helpers
paths:
/v1/test_helpers/test_clocks:
get:
summary: Stripe List Test Clocks
description: <p>Returns a list of your test clocks.</p>
operationId: GetTestHelpersTestClocks
parameters:
- name: ending_before
in: query
required: false
schema:
type: string
maxLength: 5000
- name: limit
in: query
required: false
schema:
type: integer
- name: starting_after
in: query
required: false
schema:
type: string
maxLength: 5000
responses:
'200':
description: Successful response.
content:
application/json:
schema:
type: object
properties:
object:
type: string
enum:
- list
data:
type: array
items:
$ref: '#/components/schemas/test_helpers.test_clock'
has_more:
type: boolean
url:
type: string
default:
description: Error response.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
tags:
- Test Helpers
post:
summary: Stripe Create Test Clock
description: <p>Creates a new test clock that can be attached to new customers and quotes.</p>
operationId: PostTestHelpersTestClocks
requestBody:
required: true
content:
application/x-www-form-urlencoded:
schema:
type: object
required:
- frozen_time
properties:
frozen_time:
type: integer
description: The initial frozen time for this test clock.
name:
type: string
description: The name for this test clock.
maxLength: 300
responses:
'200':
description: Successful response.
content:
application/json:
schema:
$ref: '#/components/schemas/test_helpers.test_clock'
default:
description: Error response.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
tags:
- Test Helpers
/v1/test_helpers/test_clocks/{test_clock}:
get:
summary: Stripe Retrieve Test Clock
description: <p>Retrieves a test clock.</p>
operationId: GetTestHelpersTestClocksTestClock
parameters:
- name: test_clock
in: path
required: true
schema:
type: string
maxLength: 5000
responses:
'200':
description: Successful response.
content:
application/json:
schema:
$ref: '#/components/schemas/test_helpers.test_clock'
default:
description: Error response.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
tags:
- Test Helpers
delete:
summary: Stripe Delete Test Clock
description: <p>Deletes a test clock.</p>
operationId: DeleteTestHelpersTestClocksTestClock
parameters:
- name: test_clock
in: path
required: true
schema:
type: string
maxLength: 5000
responses:
'200':
description: Successful response.
content:
application/json:
schema:
type: object
properties:
id:
type: string
object:
type: string
deleted:
type: boolean
default:
description: Error response.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
tags:
- Test Helpers
/v1/test_helpers/test_clocks/{test_clock}/advance:
post:
summary: Stripe Advance Test Clock
description: <p>Starts advancing a test clock to a specified time in the future.</p>
operationId: PostTestHelpersTestClocksTestClockAdvance
parameters:
- name: test_clock
in: path
required: true
schema:
type: string
maxLength: 5000
requestBody:
required: true
content:
application/x-www-form-urlencoded:
schema:
type: object
required:
- frozen_time
properties:
frozen_time:
type: integer
description: The time to advance the test clock to.
responses:
'200':
description: Successful response.
content:
application/json:
schema:
$ref: '#/components/schemas/test_helpers.test_clock'
default:
description: Error response.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
tags:
- Test Helpers
/v1/test_helpers/refunds/{refund}/expire:
post:
summary: Stripe Expire Refund
description: <p>Expire a refund with a status of requires_action.</p>
operationId: PostTestHelpersRefundsRefundExpire
parameters:
- name: refund
in: path
required: true
schema:
type: string
responses:
'200':
description: Successful response.
content:
application/json:
schema:
type: object
default:
description: Error response.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
tags:
- Test Helpers
/v1/test_helpers/customers/{customer}/fund_cash_balance:
post:
summary: Stripe Fund Customer Cash Balance
description: <p>Create an incoming testmode bank transfer.</p>
operationId: PostTestHelpersCustomersCustomerFundCashBalance
parameters:
- name: customer
in: path
required: true
schema:
type: string
maxLength: 5000
requestBody:
required: true
content:
application/x-www-form-urlencoded:
schema:
type: object
required:
- amount
- currency
properties:
amount:
type: integer
currency:
type: string
reference:
type: string
responses:
'200':
description: Successful response.
content:
application/json:
schema:
type: object
default:
description: Error response.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
tags:
- Test Helpers
/v1/test_helpers/issuing/authorizations:
post:
description: <p>Create a test-mode authorization.</p>
operationId: PostTestHelpersIssuingAuthorizations
requestBody:
content:
application/x-www-form-urlencoded:
encoding:
amount_details:
explode: true
style: deepObject
expand:
explode: true
style: deepObject
merchant_data:
explode: true
style: deepObject
network_data:
explode: true
style: deepObject
verification_data:
explode: true
style: deepObject
schema:
additionalProperties: false
$ref: '#/components/schemas/PostTestHelpersIssuingAuthorizationsRequest'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/issuing.authorization'
description: Successful response.
default:
content:
application/json:
schema:
$ref: '#/components/schemas/error_2'
description: Error response.
tags:
- Test Helpers
/v1/test_helpers/issuing/authorizations/{authorization}/capture:
post:
description: <p>Capture a test-mode authorization.</p>
operationId: PostTestHelpersIssuingAuthorizationsAuthorizationCapture
parameters:
- in: path
name: authorization
required: true
schema:
maxLength: 5000
type: string
style: simple
requestBody:
content:
application/x-www-form-urlencoded:
encoding:
expand:
explode: true
style: deepObject
purchase_details:
explode: true
style: deepObject
schema:
additionalProperties: false
$ref: '#/components/schemas/PostTestHelpersIssuingAuthorizationsAuthorizationCaptureRequest'
required: false
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/issuing.authorization'
description: Successful response.
default:
content:
application/json:
schema:
$ref: '#/components/schemas/error_2'
description: Error response.
tags:
- Test Helpers
/v1/test_helpers/issuing/authorizations/{authorization}/expire:
post:
description: <p>Expire a test-mode Authorization.</p>
operationId: PostTestHelpersIssuingAuthorizationsAuthorizationExpire
parameters:
- in: path
name: authorization
required: true
schema:
maxLength: 5000
type: string
style: simple
requestBody:
content:
application/x-www-form-urlencoded:
encoding:
expand:
explode: true
style: deepObject
schema:
additionalProperties: false
$ref: '#/components/schemas/PostTestHelpersIssuingAuthorizationsAuthorizationExpireRequest'
required: false
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/issuing.authorization'
description: Successful response.
default:
content:
application/json:
schema:
$ref: '#/components/schemas/error_2'
description: Error response.
tags:
- Test Helpers
/v1/test_helpers/issuing/authorizations/{authorization}/increment:
post:
description: <p>Increment a test-mode Authorization.</p>
operationId: PostTestHelpersIssuingAuthorizationsAuthorizationIncrement
parameters:
- in: path
name: authorization
required: true
schema:
maxLength: 5000
type: string
style: simple
requestBody:
content:
application/x-www-form-urlencoded:
encoding:
expand:
explode: true
style: deepObject
schema:
additionalProperties: false
$ref: '#/components/schemas/PostTestHelpersIssuingAuthorizationsAuthorizationIncrementRequest'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/issuing.authorization'
description: Successful response.
default:
content:
application/json:
schema:
$ref: '#/components/schemas/error_2'
description: Error response.
tags:
- Test Helpers
/v1/test_helpers/issuing/authorizations/{authorization}/reverse:
post:
description: <p>Reverse a test-mode Authorization.</p>
operationId: PostTestHelpersIssuingAuthorizationsAuthorizationReverse
parameters:
- in: path
name: authorization
required: true
schema:
maxLength: 5000
type: string
style: simple
requestBody:
content:
application/x-www-form-urlencoded:
encoding:
expand:
explode: true
style: deepObject
schema:
additionalProperties: false
$ref: '#/components/schemas/PostTestHelpersIssuingAuthorizationsAuthorizationReverseRequest'
required: false
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/issuing.authorization'
description: Successful response.
default:
content:
application/json:
schema:
$ref: '#/components/schemas/error_2'
description: Error response.
tags:
- Test Helpers
/v1/test_helpers/issuing/cards/{card}/shipping/deliver:
post:
description: <p>Updates the shipping status of the specified Issuing <code>Card</code> object to <code>delivered</code>.</p>
operationId: PostTestHelpersIssuingCardsCardShippingDeliver
parameters:
- in: path
name: card
required: true
schema:
maxLength: 5000
type: string
style: simple
requestBody:
content:
application/x-www-form-urlencoded:
encoding:
expand:
explode: true
style: deepObject
schema:
additionalProperties: false
$ref: '#/components/schemas/PostTestHelpersIssuingCardsCardShippingDeliverRequest'
required: false
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/issuing.card'
description: Successful response.
default:
content:
application/json:
schema:
$ref: '#/components/schemas/error_2'
description: Error response.
tags:
- Test Helpers
/v1/test_helpers/issuing/cards/{card}/shipping/fail:
post:
description: <p>Updates the shipping status of the specified Issuing <code>Card</code> object to <code>failure</code>.</p>
operationId: PostTestHelpersIssuingCardsCardShippingFail
parameters:
- in: path
name: card
required: true
schema:
maxLength: 5000
type: string
style: simple
requestBody:
content:
application/x-www-form-urlencoded:
encoding:
expand:
explode: true
style: deepObject
schema:
additionalProperties: false
$ref: '#/components/schemas/PostTestHelpersIssuingCardsCardShippingFailRequest'
required: false
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/issuing.card'
description: Successful response.
default:
content:
application/json:
schema:
$ref: '#/components/schemas/error_2'
description: Error response.
tags:
- Test Helpers
/v1/test_helpers/issuing/cards/{card}/shipping/return:
post:
description: <p>Updates the shipping status of the specified Issuing <code>Card</code> object to <code>returned</code>.</p>
operationId: PostTestHelpersIssuingCardsCardShippingReturn
parameters:
- in: path
name: card
required: true
schema:
maxLength: 5000
type: string
style: simple
requestBody:
content:
application/x-www-form-urlencoded:
encoding:
expand:
explode: true
style: deepObject
schema:
additionalProperties: false
$ref: '#/components/schemas/PostTestHelpersIssuingCardsCardShippingReturnRequest'
required: false
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/issuing.card'
description: Successful response.
default:
content:
application/json:
schema:
$ref: '#/components/schemas/error_2'
description: Error response.
tags:
- Test Helpers
/v1/test_helpers/issuing/cards/{card}/shipping/ship:
post:
description: <p>Updates the shipping status of the specified Issuing <code>Card</code> object to <code>shipped</code>.</p>
operationId: PostTestHelpersIssuingCardsCardShippingShip
parameters:
- in: path
name: card
required: true
schema:
maxLength: 5000
type: string
style: simple
requestBody:
content:
application/x-www-form-urlencoded:
encoding:
expand:
explode: true
style: deepObject
schema:
additionalProperties: false
$ref: '#/components/schemas/PostTestHelpersIssuingCardsCardShippingShipRequest'
required: false
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/issuing.card'
description: Successful response.
default:
content:
application/json:
schema:
$ref: '#/components/schemas/error_2'
description: Error response.
tags:
- Test Helpers
/v1/test_helpers/issuing/transactions/create_force_capture:
post:
description: <p>Allows the user to capture an arbitrary amount, also known as a forced capture.</p>
operationId: PostTestHelpersIssuingTransactionsCreateForceCapture
requestBody:
content:
application/x-www-form-urlencoded:
encoding:
expand:
explode: true
style: deepObject
merchant_data:
explode: true
style: deepObject
purchase_details:
explode: true
style: deepObject
schema:
additionalProperties: false
$ref: '#/components/schemas/PostTestHelpersIssuingTransactionsCreateForceCaptureRequest'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/issuing.transaction'
description: Successful response.
default:
content:
application/json:
schema:
$ref: '#/components/schemas/error_2'
description: Error response.
tags:
- Test Helpers
/v1/test_helpers/issuing/transactions/create_unlinked_refund:
post:
description: <p>Allows the user to refund an arbitrary amount, also known as a unlinked refund.</p>
operationId: PostTestHelpersIssuingTransactionsCreateUnlinkedRefund
requestBody:
content:
application/x-www-form-urlencoded:
encoding:
expand:
explode: true
style: deepObject
merchant_data:
explode: true
style: deepObject
purchase_details:
explode: true
style: deepObject
schema:
additionalProperties: false
$ref: '#/components/schemas/PostTestHelpersIssuingTransactionsCreateUnlinkedRefundRequest'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/issuing.transaction'
description: Successful response.
default:
content:
application/json:
schema:
$ref: '#/components/schemas/error_2'
description: Error response.
tags:
- Test Helpers
/v1/test_helpers/issuing/transactions/{transaction}/refund:
post:
description: <p>Refund a test-mode Transaction.</p>
operationId: PostTestHelpersIssuingTransactionsTransactionRefund
parameters:
- in: path
name: transaction
required: true
schema:
maxLength: 5000
type: string
style: simple
requestBody:
content:
application/x-www-form-urlencoded:
encoding:
expand:
explode: true
style: deepObject
schema:
additionalProperties: false
$ref: '#/components/schemas/PostTestHelpersIssuingTransactionsTransactionRefundRequest'
required: false
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/issuing.transaction'
description: Successful response.
default:
content:
application/json:
schema:
$ref: '#/components/schemas/error_2'
description: Error response.
tags:
- Test Helpers
/v1/test_helpers/terminal/readers/{reader}/present_payment_method:
post:
description: <p>Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction.</p>
operationId: PostTestHelpersTerminalReadersReaderPresentPaymentMethod
parameters:
- in: path
name: reader
required: true
schema:
maxLength: 5000
type: string
style: simple
requestBody:
content:
application/x-www-form-urlencoded:
encoding:
card_present:
explode: true
style: deepObject
expand:
explode: true
style: deepObject
interac_present:
explode: true
style: deepObject
schema:
additionalProperties: false
$ref: '#/components/schemas/PostTestHelpersTerminalReadersReaderPresentPaymentMethodRequest'
required: false
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/terminal.reader'
description: Successful response.
default:
content:
application/json:
schema:
$ref: '#/components/schemas/error_2'
description: Error response.
tags:
- Test Helpers
/v1/test_helpers/treasury/inbound_transfers/{id}/fail:
post:
description: <p>Transitions a test mode created InboundTransfer to the <code>failed</code> status. The InboundTransfer must already be in the <code>processing</code> state.</p>
operationId: PostTestHelpersTreasuryInboundTransfersIdFail
parameters:
- in: path
name: id
required: true
schema:
maxLength: 5000
type: string
style: simple
requestBody:
content:
application/x-www-form-urlencoded:
encoding:
expand:
explode: true
style: deepObject
failure_details:
explode: true
style: deepObject
schema:
additionalProperties: false
$ref: '#/components/schemas/PostTestHelpersTreasuryInboundTransfersIdFailRequest'
required: false
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/treasury.inbound_transfer'
description: Successful response.
default:
content:
application/json:
schema:
$ref: '#/components/schemas/error_2'
description: Error response.
tags:
- Test Helpers
/v1/test_helpers/treasury/inbound_transfers/{id}/return:
post:
description: <p>Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the <code>succeeded</code> state.</p>
operationId: PostTestHelpersTreasuryInboundTransfersIdReturn
parameters:
- in: path
name: id
required: true
schema:
maxLength: 5000
type: string
style: simple
requestBody:
content:
application/x-www-form-urlencoded:
encoding:
expand:
explode: true
style: deepObject
schema:
additionalProperties: false
$ref: '#/components/schemas/PostTestHelpersTreasuryInboundTransfersIdReturnRequest'
required: false
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/treasury.inbound_transfer'
description: Successful response.
default:
content:
application/json:
schema:
$ref: '#/components/schemas/error_2'
description: Error response.
tags:
- Test Helpers
/v1/test_helpers/treasury/inbound_transfers/{id}/succeed:
post:
description: <p>Transitions a test mode created InboundTransfer to the <code>succeeded</code> status. The InboundTransfer must already be in the <code>processing</code> state.</p>
operationId: PostTestHelpersTreasuryInboundTransfersIdSucceed
parameters:
- in: path
name: id
required: true
schema:
maxLength: 5000
type: string
style: simple
requestBody:
content:
application/x-www-form-urlencoded:
encoding:
expand:
explode: true
style: deepObject
schema:
additionalProperties: false
$ref: '#/components/schemas/PostTestHelpersTreasuryInboundTransfersIdSucceedRequest'
required: false
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/treasury.inbound_transfer'
description: Successful response.
default:
content:
application/json:
schema:
$ref: '#/components/schemas/error_2'
description: Error response.
tags:
- Test Helpers
/v1/test_helpers/treasury/outbound_payments/{id}/fail:
post:
description: <p>Transitions a test mode created OutboundPayment to the <code>failed</code> status. The OutboundPayment must already be in the <code>processing</code> state.</p>
operationId: PostTestHelpersTreasuryOutboundPaymentsIdFail
parameters:
- in: path
name: id
required: true
schema:
maxLength: 5000
type: string
style: simple
requestBody:
content:
application/x-www-form-urlencoded:
encoding:
expand:
explode: true
style: deepObject
schema:
additionalProperties: false
$ref: '#/components/schemas/PostTestHelpersTreasuryOutboundPaymentsIdFailRequest'
required: false
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/treasury.outbound_payment'
description: Successful response.
default:
content:
application/json:
schema:
$ref: '#/components/schemas/error_2'
description: Error response.
tags:
- Test Helpers
/v1/test_helpers/treasury/outbound_payments/{id}/post:
post:
description: <p>Transitions a test mode created OutboundPayment to the <code>posted</code> status. The OutboundPayment must already be in the <code>processing</code> state.</p>
operationId: PostTestHelpersTreasuryOutboundPaymentsIdPost
parameters:
- in: path
name: id
required: true
schema:
maxLength: 5000
type: string
style: simple
requestBody:
content:
application/x-www-form-urlencoded:
encoding:
expand:
explode: true
style: deepObject
schema:
additionalProperties: false
$ref: '#/components/schemas/PostTestHelpersTreasuryOutboundPaymentsIdPostRequest'
required: false
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/treasury.outbound_payment'
description: Successful response.
default:
content:
application/json:
schema:
$ref: '#/components/schemas/error_2'
description: Error response.
tags:
- Test Helpers
/v1/test_helpers/treasury/outbound_payments/{id}/return:
post:
description: <p>Transitions a test mode created OutboundPayment to the <code>returned</code> status. The OutboundPayment must already be in the <code>processing</code> state.</p>
operationId: PostTestHelpersTreasuryOutboundPaymentsIdReturn
parameters:
- in: path
name: id
required: true
schema:
maxLength: 5000
type: string
style: simple
requestBody:
content:
application/x-www-form-urlencoded:
encoding:
expand:
explode: true
style: deepObject
returned_details:
explode: true
style: deepObject
schema:
additionalProperties: false
$ref: '#/components/schemas/PostTestHelpersTreasuryOutboundPaymentsIdReturnRequest'
required: false
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/treasury.outbound_payment'
description: Successful response.
default:
content:
application/json:
schema:
$ref: '#/components/schemas/error_2'
description: Error response.
tags:
- Test Helpers
/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/fail:
post:
description: <p>Transitions a test mode created OutboundTransfer to the <code>failed</code> status. The OutboundTransfer must already be in the <code>processing</code> state.</p>
operationId: PostTestHelpersTreasuryOutboundTransfersOutboundTransferFail
parameters:
- in: path
name: outbound_transfer
required: true
schema:
maxLength: 5000
type: string
style: simple
requestBody:
content:
application/x-www-form-urlencoded:
encoding:
expand:
explode: true
style: deepObject
schema:
# --- truncated at 32 KB (154 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/stripe/refs/heads/main/openapi/stripe-test-helpers-api-openapi.yml