postSourcesSourceVerify
Verify a given source.
Details
- Method:
POST - Path:
/v1/sources/{source}/verify - Operation ID:
PostSourcesSourceVerify
Parameters
{
"source": {
"description": "",
"required": true,
"location": "path",
"type": "string"
}
}Response Schema
{
"description": "`Source` objects allow you to accept a variety of payment methods. They\nrepresent a customer's payment instrument, and can be used with the Stripe API\njust like a `Card` object: once chargeable, they can be charged, or can be\nattached to customers.\n\nStripe doesn't recommend using the deprecated [Sources API](https://docs.stripe.com/api/sources).\nWe recommend that you adopt the [PaymentMethods API](https://docs.stripe.com/api/payment_methods).\nThis newer API provides access to our latest features and payment method types.\n\nRelated guides: [Sources API](https://docs.stripe.com/sources) and [Sources & Customers](https://docs.stripe.com/sources/customers).",
"properties": {
"ach_credit_transfer": {
"properties": {
"account_number": {
"nullable": true,
"type": "string"
},
"bank_name": {
"nullable": true,
"type": "string"
},
"fingerprint": {
"nullable": true,
"type": "string"
},
"refund_account_holder_name": {
"nullable": true,
"type": "string"
},
"refund_account_holder_type": {
"nullable": true,
"type": "string"
},
"refund_routing_number": {
"nullable": true,
"type": "string"
},
"routing_number": {
"nullable": true,
"type": "string"
},
"swift_code": {
"nullable": true,
"type": "string"
}
},
"type": "object"
},
"ach_debit": {
"properties": {
"bank_name": {
"nullable": true,
"type": "string"
},
"country": {
"nullable": true,
"type": "string"
},
"fingerprint": {
"nullable": true,
"type": "string"
},
"last4": {
"nullable": true,
"type": "string"
},
"routing_number": {
"nullable": true,
"type": "string"
},
"type": {
"nullable": true,
"type": "string"
}
},
"type": "object"
},
"acss_debit": {
"properties": {
"bank_address_city": {
"nullable": true,
"type": "string"
},
"bank_address_line_1": {
"nullable": true,
"type": "string"
},
"bank_address_line_2": {
"nullable": true,
"type": "string"
},
"bank_address_postal_code": {
"nullable": true,
"type": "string"
},
"bank_name": {
"nullable": true,
"type": "string"
},
"category": {
"nullable": true,
"type": "string"
},
"country": {
"nullable": true,
"type": "string"
},
"fingerprint": {
"nullable": true,
"type": "string"
},
"last4": {
"nullable": true,
"type": "string"
},
"routing_number": {
"nullable": true,
"type": "string"
}
},
"type": "object"
},
"alipay": {
"properties": {
"data_string": {
"nullable": true,
"type": "string"
},
"native_url": {
"nullable": true,
"type": "string"
},
"statement_descriptor": {
"nullable": true,
"type": "string"
}
},
"type": "object"
},
"allow_redisplay": {
"description": "This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”.",
"enum": [
"always",
"limited",
"unspecified"
],
"nullable": true,
"type": "string"
},
"amount": {
"description": "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 associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources.",
"nullable": true,
"type": "integer"
},
"au_becs_debit": {
"properties": {
"bsb_number": {
"nullable": true,
"type": "string"
},
"fingerprint": {
"nullable": true,
"type": "string"
},
"last4": {
"nullable": true,
"type": "string"
}
},
"type": "object"
},
"bancontact": {
"properties": {
"bank_code": {
"nullable": true,
"type": "string"
},
"bank_name": {
"nullable": true,
"type": "string"
},
"bic": {
"nullable": true,
"type": "string"
},
"iban_last4": {
"nullable": true,
"type": "string"
},
"preferred_language": {
"nullable": true,
"type": "string"
},
"statement_descriptor": {
"nullable": true,
"type": "string"
}
},
"type": "object"
},
"card": {
"properties": {
"address_line1_check": {
"nullable": true,
"type": "string"
},
"address_zip_check": {
"nullable": true,
"type": "string"
},
"brand": {
"nullable": true,
"type": "string"
},
"country": {
"nullable": true,
"type": "string"
},
"cvc_check": {
"nullable": true,
"type": "string"
},
"dynamic_last4": {
"nullable": true,
"type": "string"
},
"exp_month": {
"nullable": true,
"type": "integer"
},
"exp_year": {
"nullable": true,
"type": "integer"
},
"fingerprint": {
"type": "string"
},
"funding": {
"nullable": true,
"type": "string"
},
"last4": {
"nullable": true,
"type": "string"
},
"name": {
"nullable": true,
"type": "string"
},
"three_d_secure": {
"type": "string"
},
"tokenization_method": {
"nullable": true,
"type": "string"
}
},
"type": "object"
},
"card_present": {
"properties": {
"application_cryptogram": {
"type": "string"
},
"application_preferred_name": {
"type": "string"
},
"authorization_code": {
"nullable": true,
"type": "string"
},
"authorization_response_code": {
"type": "string"
},
"brand": {
"nullable": true,
"type": "string"
},
"country": {
"nullable": true,
"type": "string"
},
"cvm_type": {
"type": "string"
},
"data_type": {
"nullable": true,
"type": "string"
},
"dedicated_file_name": {
"type": "string"
},
"emv_auth_data": {
"type": "string"
},
"evidence_customer_signature": {
"nullable": true,
"type": "string"
},
"evidence_transaction_certificate": {
"nullable": true,
"type": "string"
},
"exp_month": {
"nullable": true,
"type": "integer"
},
"exp_year": {
"nullable": true,
"type": "integer"
},
"fingerprint": {
"type": "string"
},
"funding": {
"nullable": true,
"type": "string"
},
"last4": {
"nullable": true,
"type": "string"
},
"pos_device_id": {
"nullable": true,
"type": "string"
},
"pos_entry_mode": {
"type": "string"
},
"read_method": {
"nullable": true,
"type": "string"
},
"reader": {
"nullable": true,
"type": "string"
},
"terminal_verification_results": {
"type": "string"
},
"transaction_status_information": {
"type": "string"
}
},
"type": "object"
},
"client_secret": {
"description": "The client secret of the source. Used for client-side retrieval using a publishable key.",
"maxLength": 5000,
"type": "string"
},
"code_verification": {
"description": "",
"properties": {
"attempts_remaining": {
"description": "The number of attempts remaining to authenticate the source object with a verification code.",
"type": "integer"
},
"status": {
"description": "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).",
"maxLength": 5000,
"type": "string"
}
},
"required": [
"attempts_remaining",
"status"
],
"title": "SourceCodeVerificationFlow",
"type": "object",
"x-expandableFields": []
},
"created": {
"description": "Time at which the object was created. Measured in seconds since the Unix epoch.",
"format": "unix-time",
"type": "integer"
},
"currency": {
"description": "Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. Required for `single_use` sources.",
"format": "currency",
"nullable": true,
"type": "string"
},
"customer": {
"description": "The ID of the customer to which this source is attached. This will not be present when the source has not been attached to a customer.",
"maxLength": 5000,
"type": "string"
},
"eps": {
"properties": {
"reference": {
"nullable": true,
"type": "string"
},
"statement_descriptor": {
"nullable": true,
"type": "string"
}
},
"type": "object"
},
"flow": {
"description": "The authentication `flow` of the source. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`.",
"maxLength": 5000,
"type": "string"
},
"giropay": {
"properties": {
"bank_code": {
"nullable": true,
"type": "string"
},
"bank_name": {
"nullable": true,
"type": "string"
},
"bic": {
"nullable": true,
"type": "string"
},
"statement_descriptor": {
"nullable": true,
"type": "string"
}
},
"type": "object"
},
"id": {
"description": "Unique identifier for the object.",
"maxLength": 5000,
"type": "string"
},
"ideal": {
"properties": {
"bank": {
"nullable": true,
"type": "string"
},
"bic": {
"nullable": true,
"type": "string"
},
"iban_last4": {
"nullable": true,
"type": "string"
},
"statement_descriptor": {
"nullable": true,
"type": "string"
}
},
"type": "object"
},
"klarna": {
"properties": {
"background_image_url": {
"type": "string"
},
"client_token": {
"nullable": true,
"type": "string"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"locale": {
"type": "string"
},
"logo_url": {
"type": "string"
},
"page_title": {
"type": "string"
},
"pay_later_asset_urls_descriptive": {
"type": "string"
},
"pay_later_asset_urls_standard": {
"type": "string"
},
"pay_later_name": {
"type": "string"
},
"pay_later_redirect_url": {
"type": "string"
},
"pay_now_asset_urls_descriptive": {
"type": "string"
},
"pay_now_asset_urls_standard": {
"type": "string"
},
"pay_now_name": {
"type": "string"
},
"pay_now_redirect_url": {
"type": "string"
},
"pay_over_time_asset_urls_descriptive": {
"type": "string"
},
"pay_over_time_asset_urls_standard": {
"type": "string"
},
"pay_over_time_name": {
"type": "string"
},
"pay_over_time_redirect_url": {
"type": "string"
},
"payment_method_categories": {
"type": "string"
},
"purchase_country": {
"type": "string"
},
"purchase_type": {
"type": "string"
},
"redirect_url": {
"type": "string"
},
"shipping_delay": {
"type": "integer"
},
"shipping_first_name": {
"type": "string"
},
"shipping_last_name": {
"type": "string"
}
},
"type": "object"
},
"livemode": {
"description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.",
"type": "boolean"
},
"metadata": {
"additionalProperties": {
"maxLength": 500,
"type": "string"
},
"description": "Set 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.",
"nullable": true,
"type": "object"
},
"multibanco": {
"properties": {
"entity": {
"nullable": true,
"type": "string"
},
"reference": {
"nullable": true,
"type": "string"
},
"refund_account_holder_address_city": {
"nullable": true,
"type": "string"
},
"refund_account_holder_address_country": {
"nullable": true,
"type": "string"
},
"refund_account_holder_address_line1": {
"nullable": true,
"type": "string"
},
"refund_account_holder_address_line2": {
"nullable": true,
"type": "string"
},
"refund_account_holder_address_postal_code": {
"nullable": true,
"type": "string"
},
"refund_account_holder_address_state": {
"nullable": true,
"type": "string"
},
"refund_account_holder_name": {
"nullable": true,
"type": "string"
},
"refund_iban": {
"nullable": true,
"type": "string"
}
},
"type": "object"
},
"object": {
"description": "String representing the object's type. Objects of the same type share the same value.",
"enum": [
"source"
],
"type": "string"
},
"owner": {
"anyOf": [
{
"$ref": "#/components/schemas/source_owner"
}
],
"description": "Information about the owner of the payment instrument that may be used or required by particular source types.",
"nullable": true
},
"p24": {
"properties": {
"reference": {
"nullable": true,
"type": "string"
}
},
"type": "object"
},
"receiver": {
"description": "",
"properties": {
"address": {
"description": "The address of the receiver source. This is the value that should be communicated to the customer to send their funds to.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"amount_charged": {
"description": "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.",
"type": "integer"
},
"amount_received": {
"description": "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.",
"type": "integer"
},
"amount_returned": {
"description": "The total amount that was returned to the customer. The amount returned is expressed in the source's currency.",
"type": "integer"
},
"refund_attributes_method": {
"description": "Type of refund attribute method, one of `email`, `manual`, or `none`.",
"maxLength": 5000,
"type": "string"
},
"refund_attributes_status": {
"description": "Type of refund attribute status, one of `missing`, `requested`, or `available`.",
"maxLength": 5000,
"type": "string"
}
},
"required": [
"amount_charged",
"amount_received",
"amount_returned",
"refund_attributes_method",
"refund_attributes_status"
],
"title": "SourceReceiverFlow",
"type": "object",
"x-expandableFields": []
},
"redirect": {
"description": "",
"properties": {
"failure_reason": {
"description": "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`.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"return_url": {
"description": "The URL you provide to redirect the customer to after they authenticated their payment.",
"maxLength": 5000,
"type": "string"
},
"status": {
"description": "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).",
"maxLength": 5000,
"type": "string"
},
"url": {
"description": "The URL provided to you to redirect a customer to as part of a `redirect` authentication flow.",
"maxLength": 2048,
"type": "string"
}
},
"required": [
"return_url",
"status",
"url"
],
"title": "SourceRedirectFlow",
"type": "object",
"x-expandableFields": []
},
"sepa_debit": {
"properties": {
"bank_code": {
"nullable": true,
"type": "string"
},
"branch_code": {
"nullable": true,
"type": "string"
},
"country": {
"nullable": true,
"type": "string"
},
"fingerprint": {
"nullable": true,
"type": "string"
},
"last4": {
"nullable": true,
"type": "string"
},
"mandate_reference": {
"nullable": true,
"type": "string"
},
"mandate_url": {
"nullable": true,
"type": "string"
}
},
"type": "object"
},
"sofort": {
"properties": {
"bank_code": {
"nullable": true,
"type": "string"
},
"bank_name": {
"nullable": true,
"type": "string"
},
"bic": {
"nullable": true,
"type": "string"
},
"country": {
"nullable": true,
"type": "string"
},
"iban_last4": {
"nullable": true,
"type": "string"
},
"preferred_language": {
"nullable": true,
"type": "string"
},
"statement_descriptor": {
"nullable": true,
"type": "string"
}
},
"type": "object"
},
"source_order": {
"description": "",
"properties": {
"amount": {
"description": "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.",
"type": "integer"
},
"currency": {
"description": "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",
"type": "string"
},
"email": {
"description": "The email address of the customer placing the order.",
"maxLength": 5000,
"type": "string"
},
"items": {
"description": "List of items constituting the order.",
"items": {
"description": "",
"properties": {
"amount": {
"description": "The amount (price) for this order item.",
"nullable": true,
"type": "integer"
},
"currency": {
"description": "This currency of this order item. Required when `amount` is present.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"description": {
"description": "Human-readable description for this order item.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"parent": {
"description": "The ID of the associated object for this line item. Expandable if not null (e.g., expandable to a SKU).",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"quantity": {
"description": "The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered.",
"type": "integer"
},
"type": {
"description": "The type of this order item. Must be `sku`, `tax`, or `shipping`.",
"maxLength": 5000,
"nullable": true,
"type": "string"
}
},
"title": "SourceOrderItem",
"type": "object",
"x-expandableFields": []
},
"nullable": true,
"type": "array"
},
"shipping": {
"description": "",
"properties": {
"address": {
"description": "",
"properties": {
"city": {
"description": "City, district, suburb, town, or village.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"country": {
"description": "Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"line1": {
"description": "Address line 1, such as the street, PO Box, or company name.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"line2": {
"description": "Address line 2, such as the apartment, suite, unit, or building.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"postal_code": {
"description": "ZIP or postal code.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"state": {
"description": "State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).",
"maxLength": 5000,
"nullable": true,
"type": "string"
}
},
"title": "Address",
"type": "object",
"x-expandableFields": []
},
"carrier": {
"description": "The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"name": {
"description": "Recipient name.",
"maxLength": 5000,
"type": "string"
},
"phone": {
"description": "Recipient phone (including extension).",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"tracking_number": {
"description": "The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.",
"maxLength": 5000,
"nullable": true,
"type": "string"
}
},
"title": "Shipping",
"type": "object",
"x-expandableFields": [
"address"
]
}
},
"required": [
"amount",
"currency"
],
"title": "SourceOrder",
"type": "object",
"x-expandableFields": [
"items",
"shipping"
]
},
"statement_descriptor": {
"description": "Extra information about a source. This will appear on your customer's statement every time you charge the source.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"status": {
"description": "The status of the source, one of `canceled`, `chargeable`, `consumed`, `failed`, or `pending`. Only `chargeable` sources can be used to create a charge.",
"maxLength": 5000,
"type": "string"
},
"three_d_secure": {
"properties": {
"address_line1_check": {
"nullable": true,
"type": "string"
},
"address_zip_check": {
"nullable": true,
"type": "string"
},
"authenticated": {
"nullable": true,
"type": "boolean"
},
"brand": {
"nullable": true,
"type": "string"
},
"card": {
"nullable": true,
"type": "string"
},
"country": {
"nullable": true,
"type": "string"
},
"customer": {
"nullable": true,
"type": "string"
},
"cvc_check": {
"nullable": true,
"type": "string"
},
"dynamic_last4": {
"nullable": true,
"type": "string"
},
"exp_month": {
"nullable": true,
"type": "integer"
},
"exp_year": {
"nullable": true,
"type": "integer"
},
"fingerprint": {
"type": "string"
},
"funding": {
"nullable": true,
"type": "string"
},
"last4": {
"nullable": true,
"type": "string"
},
"name": {
"nullable": true,
"type": "string"
},
"three_d_secure": {
"type": "string"
},
"tokenization_method": {
"nullable": true,
"type": "string"
}
},
"type": "object"
},
"type": {
"description": "The `type` of the source. The `type` is a payment method, one of `ach_credit_transfer`, `ach_debit`, `alipay`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `multibanco`, `klarna`, `p24`, `sepa_debit`, `sofort`, `three_d_secure`, or `wechat`. An additional hash is included on the source with a name matching this value. It contains additional information specific to the [payment method](https://docs.stripe.com/sources) used.",
"enum": [
"ach_credit_transfer",
"ach_debit",
"acss_debit",
"alipay",
"au_becs_debit",
"bancontact",
"card",
"card_present",
"eps",
"giropay",
"ideal",
"klarna",
"multibanco",
"p24",
"sepa_debit",
"sofort",
"three_d_secure",
"wechat"
],
"type": "string",
"x-stripeBypassValidation": true
},
"usage": {
"description": "Either `reusable` or `single_use`. Whether this source should be reusable or not. Some source types may or may not be reusable by construction, while others may leave the option at creation. If an incompatible value is passed, an error will be returned.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"wechat": {
"properties": {
"prepay_id": {
"type": "string"
},
"qr_code_url": {
"nullable": true,
"type": "string"
},
"statement_descriptor": {
"type": "string"
}
},
"type": "object"
}
},
"required": [
"client_secret",
"created",
"flow",
"id",
"livemode",
"object",
"status",
"type"
],
"title": "Source",
"type": "object",
"x-expandableFields": [
"code_verification",
"owner",
"receiver",
"redirect",
"source_order"
],
"x-resourceId": "source"
}Usage
from ocp_agent import OCPAgent
agent = OCPAgent()
await agent.register_api('stripe')
# Call this tool
result = await agent.call_tool('postSourcesSourceVerify', {
# Add required parameters here
})