Stripe: Retrieve a source
Stripe sources.getSourcesSource: arguments, response, policy and SDK examples.
← Sources operations · Get started
Operation stripe.getsourcessource
Provider route: GET /v1/sources/{source}. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”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["sources"]["getSourcesSource"]>[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.sources.getSourcesSource(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom 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.sources.get_sources_source(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
path | object | Required within parent | Additional keys: not allowed |
path.source | string | Required within parent | Maximum length: 5000 |
query | object | Optional | Additional keys: not allowed |
query.client_secret | string | Optional | Maximum length: 5000 |
query.expand | array | Optional | |
query.expand[] | string | Each item | Maximum length: 5000 |
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | Model | Root | Expand Create a source — response body |
Referenced models: Create a source — response body
Schemas
Section titled “Schemas”21 more schemas are linked from the tables above, on the schema pages.
Create a source — response body — code verification
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
attempts_remaining | JSON | Required within parent | |
attempts_remaining (anyOf 1) | integer | Alternative | The number of attempts remaining to authenticate the source object with a verification code. |
attempts_remaining (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
status | string | Required within parent | The status of the code verification, either `pending` (awaiting verification, `attempts_remaining` should be greater than 0), `succeeded` (successful verification) or `failed` (failed verification, cannot be verified anymore as `attempts_remaining` should be 0). Maximum length: 5000 |
Create a source — response body — source order
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
amount | JSON | Required within parent | |
amount (anyOf 1) | integer | Alternative | A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the order. |
amount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
currency | string | Required within parent | Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). Format: currency |
email | string | Optional | The email address of the customer placing the order. Maximum length: 5000 |
items | JSON | Optional | |
items (anyOf 1) | array | Alternative | List of items constituting the order. |
items (anyOf 1)[] | Model | Each item | Expand Create a source — response body — source order items List of items constituting the order item |
items (anyOf 2) | null | Alternative | |
shipping | Model | Optional | Expand Create a source — response body — source order shipping |
Referenced models: Create a source — response body — source order shipping, Create a source — response body — source order items List of items constituting the order item
Create a source — response body — owner value address, email, name, phone, verified address, verified email, verified name, verified phone
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
address | JSON | Optional | |
address (anyOf 1) | JSON | Alternative | Owner's address. |
address (anyOf 1) (anyOf 1) | Model | Alternative | Expand Create a Location — response body — address |
address (anyOf 2) | null | Alternative | |
email | JSON | Optional | |
email (anyOf 1) | string | Alternative | Owner's email address. Maximum length: 5000 |
email (anyOf 2) | null | Alternative | |
name | JSON | Optional | |
name (anyOf 1) | string | Alternative | Owner's full name. Maximum length: 5000 |
name (anyOf 2) | null | Alternative | |
phone | JSON | Optional | |
phone (anyOf 1) | string | Alternative | Owner's phone number (including extension). Maximum length: 5000 |
phone (anyOf 2) | null | Alternative | |
verified_address | JSON | Optional | |
verified_address (anyOf 1) | JSON | Alternative | Verified owner's address. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. |
verified_address (anyOf 1) (anyOf 1) | Model | Alternative | Expand Create a Location — response body — address |
verified_address (anyOf 2) | null | Alternative | |
verified_email | JSON | Optional | |
verified_email (anyOf 1) | string | Alternative | Verified owner's email address. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. Maximum length: 5000 |
verified_email (anyOf 2) | null | Alternative | |
verified_name | JSON | Optional | |
verified_name (anyOf 1) | string | Alternative | Verified owner's full name. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. Maximum length: 5000 |
verified_name (anyOf 2) | null | Alternative | |
verified_phone | JSON | Optional | |
verified_phone (anyOf 1) | string | Alternative | Verified owner's phone number (including extension). Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. Maximum length: 5000 |
verified_phone (anyOf 2) | null | Alternative |
Referenced models: Create a Location — response body — address
Create a source — response body — receiver
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
address | JSON | Optional | |
address (anyOf 1) | string | Alternative | The address of the receiver source. This is the value that should be communicated to the customer to send their funds to. Maximum length: 5000 |
address (anyOf 2) | null | Alternative | |
amount_charged | JSON | Required within parent | |
amount_charged (anyOf 1) | integer | Alternative | The total amount that was moved to your balance. This is almost always equal to the amount charged. In rare cases when customers deposit excess funds and we are unable to refund those, those funds get moved to your balance and show up in amount_charged as well. The amount charged is expressed in the source's currency. |
amount_charged (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
amount_received | JSON | Required within parent | |
amount_received (anyOf 1) | integer | Alternative | The total amount received by the receiver source. `amount_received = amount_returned + amount_charged` should be true for consumed sources unless customers deposit excess funds. The amount received is expressed in the source's currency. |
amount_received (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
amount_returned | JSON | Required within parent | |
amount_returned (anyOf 1) | integer | Alternative | The total amount that was returned to the customer. The amount returned is expressed in the source's currency. |
amount_returned (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
refund_attributes_method | string | Required within parent | Type of refund attribute method, one of `email`, `manual`, or `none`. Maximum length: 5000 |
refund_attributes_status | string | Required within parent | Type of refund attribute status, one of `missing`, `requested`, or `available`. Maximum length: 5000 |
Create a source — response body — redirect
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
failure_reason | JSON | Optional | |
failure_reason (anyOf 1) | string | Alternative | The failure reason for the redirect, either `user_abort` (the customer aborted or dropped out of the redirect flow), `declined` (the authentication failed or the transaction was declined), or `processing_error` (the redirect failed due to a technical error). Present only if the redirect status is `failed`. Maximum length: 5000 |
failure_reason (anyOf 2) | null | Alternative | |
return_url | string | Required within parent | The URL you provide to redirect the customer to after they authenticated their payment. Maximum length: 5000 |
status | string | Required within parent | The status of the redirect, either `pending` (ready to be used by your customer to authenticate the transaction), `succeeded` (successful authentication, cannot be reused) or `not_required` (redirect should not be used) or `failed` (failed authentication, cannot be reused). Maximum length: 5000 |
url | string | Required within parent | The URL provided to you to redirect a customer to as part of a `redirect` authentication flow. Maximum length: 2048 |
Create a source — response body — ach credit transfer
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
account_number | JSON | Optional | |
account_number (anyOf 1) | string | Alternative | |
account_number (anyOf 2) | null | Alternative | |
bank_name | JSON | Optional | |
bank_name (anyOf 1) | string | Alternative | |
bank_name (anyOf 2) | null | Alternative | |
fingerprint | JSON | Optional | |
fingerprint (anyOf 1) | string | Alternative | |
fingerprint (anyOf 2) | null | Alternative | |
refund_account_holder_name | JSON | Optional | |
refund_account_holder_name (anyOf 1) | string | Alternative | |
refund_account_holder_name (anyOf 2) | null | Alternative | |
refund_account_holder_type | JSON | Optional | |
refund_account_holder_type (anyOf 1) | string | Alternative | |
refund_account_holder_type (anyOf 2) | null | Alternative | |
refund_routing_number | JSON | Optional | |
refund_routing_number (anyOf 1) | string | Alternative | |
refund_routing_number (anyOf 2) | null | Alternative | |
routing_number | JSON | Optional | |
routing_number (anyOf 1) | string | Alternative | |
routing_number (anyOf 2) | null | Alternative | |
swift_code | JSON | Optional | |
swift_code (anyOf 1) | string | Alternative | |
swift_code (anyOf 2) | null | Alternative |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: stripe.getsourcessource. Catalog operation: GetSourcesSource. 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"}