Charges
Create, update, and query the available Charges in Stripe.
Table Specific Information
In this table only select, insert, and update operations are allowed.Select
Server-Side Query Support
The driver uses the Stripe API to filter the results by the following columns and operators while the rest of the filter is executed client-side within the driver.
- Id supports the = operator.
- Amount supports the <, >, >=, <=, =, != operators.
- Currency supports the =, != operators.
- CustomerId supports the =, != operators.
- BillingDetailsAddressPostalCode supports the =, != operators.
- Created supports the <, >, >=, <=, =, != operators.
- Disputed supports the =,!= operator.
- MetadataAggregate supports the = operator.
- PaymentIntent supports the = operator.
- Refunded supports the =, != operators.
- Status supports the =, != operators.
- TransferGroup supports the = operator.
- AccountId supports the = operator.
You can select:
A Charge by specifying its Id:
SELECT * FROM Charges WHERE Id = 'ch_12345678'
Charges that belong to a customer:
SELECT * FROM Charges WHERE CustomerId = 'cus_12345678'
Charges created after a specific date (Created may be used with the >, >=, <, <=, or = conditions and may be used twice to specify a range):
SELECT * FROM Charges WHERE Created > '2016-01-03'
Insert
Amount, Currency and Customer or Source columns are required to charge a credit card:
INSERT INTO Charges (Amount, Currency, CustomerId) VALUES (2000, 'usd', 'cus_12345678')
Update
To modify a charge, provide an Id:
UPDATE Charges SET Description = 'updated charge' WHERE Id = 'ch_17rPMOATXQzBWNrliIRnfI5B'
Delete
Delete is not supported.
Columns
Name | Type | ReadOnly | References | Description |
Id [KEY] | String | True |
The Id of the charge. | |
Amount | Integer | False |
The amount of the charge. | |
Currency | String | False |
The currency of the charge. | |
CustomerId | String | False |
The customer Id of the charge. | |
AmountRefunded | Integer | True |
The amount in cents refunded. | |
ApplicationFee | String | True |
The application fee (if any) for the charge. | |
ApplicationFeeAmount | Integer | False |
The amount of the application fee (if any) for the charge. | |
BalanceTransaction | String | True |
The Id of the balance transaction that describes the impact of this charge on your account balance . | |
BillingDetailsAddressCity | String | True |
Billing information associated with the payment method at the time of the transaction. | |
BillingDetailsAddressCountry | String | True |
Billing information associated with the payment method at the time of the transaction. | |
BillingDetailsAddressLine1 | String | True |
Billing information associated with the payment method at the time of the transaction. | |
BillingDetailsAddressLine2 | String | True |
Billing information associated with the payment method at the time of the transaction. | |
BillingDetailsAddressPostalCode | String | True |
Billing information associated with the payment method at the time of the transaction. | |
BillingDetailsAddressState | String | True |
Billing information associated with the payment method at the time of the transaction. | |
BillingDetailsEmail | String | True |
Billing information associated with the payment method at the time of the transaction. | |
BillingDetailsName | String | True |
Billing information associated with the payment method at the time of the transaction. | |
BillingDetailsPhone | String | True |
Billing information associated with the payment method at the time of the transaction. | |
Captured | Boolean | False |
Whether the charge was created without capturing. | |
CalculatedStatementDescriptor | String | True |
The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements. Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined. | |
Created | Datetime | True |
The datetime the charge was created. | |
Description | String | False |
The description of the charge. | |
Disputed | Boolean | True |
Whether the charge has been disputed. | |
DisputeId | String | True |
The Id of the associated dispute. | |
FailureCode | String | True |
The error code explaining the reason for the charge failure if available. | |
FailureMessage | String | True |
The message to the user further explaining the reason for the charge failure if available. | |
FraudDetailsStripeReport | String | True |
Information on fraud assessments for the charge. | |
FraudDetailsUserReport | String | False |
Information on fraud assessments for the charge. | |
Invoice | String | True |
The Id of the invoice this charge is for if one exists. | |
Livemode | Boolean | True |
Whether the charge is in live mode. | |
MetadataAggregate | String | False |
The charge metadata object. | |
Order | String | True |
The Id of the order this charge is for if one exists. | |
OutcomeAggregate | String | True |
Details about whether the payment was accepted, and why. See understanding declines for details. | |
Paid | Boolean | True |
If the charge succeeded or was successfully authorized for later capture. | |
PaymentIntent | String | True |
ID of the PaymentIntent associated with this charge, if one exists. | |
PaymentMethod | String | True |
ID of the payment method used in this charge. | |
PaymentMethodDetailsAggregate | String | True |
Details about the payment method at the time of the transaction. | |
ReceiptEmail | String | False |
The email address that the receipt for this charge was sent to. | |
ReceiptNumber | String | True |
The transaction number that appears on email receipts sent for this charge. | |
ReceiptURL | String | True |
This is the URL to view the receipt for this charge. The receipt is kept up-to-date to the latest state of the charge, including any refunds. If the charge is for an Invoice, the receipt is stylized as an Invoice receipt. | |
Refunded | Boolean | True |
Whether the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false. | |
RefundsAggregate | String | True |
The list of refunds that have been applied to the charge. | |
Review | String | True |
ID of the review associated with this charge if one exists. | |
ShippingAddressCity | String | False |
Shipping information for the charge. Shipping address. City, district, suburb, town, or village. | |
ShippingAddressCountry | String | False |
Shipping information for the charge. Shipping address. Two-letter country code (ISO 3166-1 alpha-2) | |
ShippingAddressLine1 | String | False |
Shipping information for the charge. Shipping address. Address line 1 (e.g., street, PO Box, or company name). | |
ShippingAddressLine2 | String | False |
Shipping information for the charge. Shipping address. Address line 2 (e.g., apartment, suite, unit, or building). | |
ShippingAddressPostalCode | String | False |
Shipping information for the charge. Shipping address. ZIP or postal code. | |
ShippingAddressState | String | False |
Shipping information for the charge. Shipping address. State, county, province, or region. | |
ShippingCarrier | String | False |
Shipping information for the charge. The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. | |
ShippingName | String | False |
Shipping information for the charge. Recipient name. | |
ShippingPhone | String | False |
Shipping information for the charge. Recipient phone (including extension). | |
ShippingTrackingNumber | String | False |
Shipping information for the charge. 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. | |
SourceId | String | False |
Source Id. The source of every charge is a credit or debit card. | |
SourceAddressCity | String | False |
Source address city. | |
SourceAddressCountry | String | False |
Source address country. | |
SourceAddressLine1 | String | False |
Source address line1. | |
SourceAddressLine2 | String | False |
Source address line2. | |
SourceAddressState | String | False |
Source address state. | |
SourceAddressZip | String | False |
Source address zip. | |
SourceAddressZipCheck | String | False |
Source address zip check. | |
SourceBrand | String | False |
Source brand. | |
SourceCountry | String | False |
Source country. | |
SourceCustomer | String | False |
Source customer. | |
SourceCvcCheck | String | False |
Source cvc check. | |
SourceDynamicLast4 | String | False |
Source dynamic last4. | |
SourceExpMonth | Integer | False |
Source expiry month. | |
SourceExpYear | Integer | False |
Source expiry year. | |
SourceFingerprint | String | False |
Source fingerprint. | |
SourceFunding | String | False |
Source funding. | |
SourceLast4 | Integer | False |
Source last4. | |
SourceMetadata | String | False |
Source metadata. | |
SourceName | String | False |
Source name. | |
SourceObject | String | False |
Source object. | |
SourceTokenizationMethod | String | False |
Source tokenization method. | |
SourceWallet | String | False |
Source wallet. | |
SourceTransfer | String | True |
The transfer Id that created this charge. | |
StatementDescriptor | String | False |
The extra information about a charge. | |
Status | String | True |
The status of the payment is either succeeded, pending, or failed. | |
Transfer | String | True |
The Id of the transfer to the destination account. | |
TransferDataAmount | Integer | False |
An optional dictionary including the account to automatically transfer to as part of a destination charge. | |
TransferDataDestination | String | False |
An optional dictionary including the account to automatically transfer to as part of a destination charge. | |
TransferGroup | String | False |
A string that identifies this transaction as part of a group. | |
StatementDescriptorSuffix | String | False |
Provides information about the charge that customers see on their statements. | |
Object | String | True |
String representing the object's type. Objects of the same type share the same value. | |
AmountCaptured | Integer | True |
Amount in cents captured | |
Application | String | True |
ID of the Connect application that created the charge. | |
FailureBalanceTransaction | String | True |
ID of the balance transaction that describes the reversal of the balance on your account due to payment failure. | |
OnBehalfOf | String | False |
The account (if any) the charge was made on behalf of without triggering an automatic transfer. | |
RadarOptionsSession | String | False |
Options to configure Radar. A Radar Session is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. |
Pseudo-Columns
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.
Name | Type | Description |
AccountId | String |
The Id of the connected account to get charges for |