Each row is uniquely identified by this column. Use it as the upsert key when applying incremental datasets to your warehouse.
transaction. This is always the same as the business entity of the customer.amount that is yet to be captured. The payment capture is recorded as a transaction of type = payment. This applies only to a transaction of type = authorization.amount that has not been invoiced yet and is therefore added to excess_payments for the customer. This applies only to a transaction of type = payment.fraudulent: The transaction was marked as fraudulent.safe: The transaction was marked as safe.suspicious: The transaction was identified as potentially fraudulent by the gateway.adyen: Adyen is a payment gateway.amazon_payments: Amazon Payments is a payment service provider.authorize_net: Authorize.net is a payment gateway.balanced_payments: Balanced is a payment gateway.bank_of_america: Bank of America Gateway.beanstream: Bambora (formerly known as Beanstream) is a payment gateway.bluepay: BluePay is a payment gateway.bluesnap: BlueSnap is a payment gateway.braintree: Braintree is a payment gateway.chargebee: Chargebee test gateway.chargebee_payments: Chargebee Payments gateway.checkout_com: Checkout.com is a payment gateway.cybersource: CyberSource is a payment gateway.dlocal: Dlocal provides payment solutions for global commerce by accepting local payment methods.ebanx: EBANX is a payment gateway, enabling businesses to accept diverse local payment methods from various countries for increased market reach and conversion.ecentric: Ecentric provides a seamless payment processing service in South Africa, specializing in omnichannel capabilities.elavon: Elavon Virtual Merchant is a payment solution.eway: eWAY Account is a payment gateway.eway_rapid: eWAY Rapid is a payment gateway.exact: Exact Payments is a payment gateway.first_data_global: First Data Global Gateway Virtual Terminal Account.global_payments: Global Payments is a payment service provider.gocardless: GoCardless is a payment service provider.hdfc: HDFC Account is a payment gateway.ingenico_direct: Worldline Online Payments is a payment gateway.metrics_global: Metrics Global is a leading payment service provider providing unified payment services in the US.migs: MasterCard Internet Gateway Service payment gateway.mollie: Mollie is a payment gateway.moneris: Moneris is a payment gateway.moneris_us: Moneris USA is a payment gateway.nmi: NMI is a payment gateway.not_applicable: Indicates that a payment gateway is not applicable for this table.nuvei: Nuvei is a secure and reliable payment processing solution that allows businesses to accept payments from customers and is suitable for various types of businesses.ogone: Ingenico ePayments (formerly known as Ogone) is a payment gateway.orbital: Chase Paymentech (Orbital) is a payment gateway.pay_com: Pay.com provides payment services focused on simplicity and hassle-free operations for businesses of all sizes.paymill: PAYMILL is a payment gateway.paypal: PayPal Commerce is a payment gateway.paypal_express_checkout: PayPal Express Checkout is a payment gateway.paypal_payflow_pro: PayPal Payflow Pro is a payment gateway.paypal_pro: PayPal Pro Account is a payment gateway.pin: Pin is a payment gateway.quickbooks: Intuit QuickBooks Payments gateway.razorpay: Razorpay is a fast-growing payment service provider in India, working with all leading banks and supporting major local payment methods including Netbanking, UPI, etc.sage_pay: Sage Pay is a payment gateway.stripe: Stripe is a payment gateway.tco: 2Checkout is a payment gateway.vantiv: Vantiv is a payment gateway.wepay: WePay is a payment gateway.windcave: Windcave provides an end-to-end payment processing solution in ANZ and other leading global markets.wirecard: WireCard Account is a payment service provider.worldpay: WorldPay is a payment gateway.customer: Customer initiated 3DS payment.merchant: Payment initiated on a stored payment method by the merchant.ach_credit: ACH Credit.alipay: Alipay.amazon_payments: Amazon Payments.apple_pay: Apple Pay.automated_bank_transfer: Automated Bank Transfer.bancontact: Bancontact.bank_transfer: Bank Transfer.boleto: Boleto.card: Card.cash: Cash.chargeback: Only applicable for a transaction of type = refund. This value is set by Chargebee when an automated chargeback occurred.check: Check.custom: Custom.direct_debit: Direct Debit.dotpay: Dotpay.faster_payments: Faster Payments.giropay: Giropaygoogle_pay: Google Payideal: IDEALklarna_pay_now: Klarna Pay Nownetbanking_emandates: Netbanking E-mandatesother: Payment Methods other than the above types.pay_to: PayTopaypal_express_checkout: Paypal Express Checkoutsepa_credit: SEPA Creditsepa_instant_transfer: Sepa Instant Transfer.sofort: Sofortunionpay: Unionpayupi: UPIvenmo: Venmowechat_pay: WeChat Paypayment_method = check.id of the offline transaction being refunded or reversed. This applies only to transactions of type = refund or payment_reversal.id of the transaction (always of type = payment) being refunded. This applies only to transactions of type = refund.resource_version is updated with a new timestamp in milliseconds for every change made to the table. This field is present only if the table was updated after 2016-09-28.failure: Transaction failed. Refer to the error_code and error_text fields to understand the reason for failure.in_progress: The transaction is being processed by the gateway. This typically happens for direct debit transactions or, in the case of cards, refund transactions. Such transactions can take 2 to 7 days to complete, depending on the gateway and payment method.needs_attention: Connection with the Gateway terminated abruptly, so the status of this transaction needs manual resolution.success: The transaction was successful.timeout: Transaction failed because the Gateway did not accept the connection.voided: The transaction was voided or authorization expired at the gateway.authorization: The transaction represents an authorization for capturing the amount from the customer’s payment_source.payment: The transaction represents the capture of the amount from the customer’s payment_source.payment_reversal: Indicates a reversal transaction.refund: The transaction represents a refund of the amount to the customer’s payment_source.needs_attention along with relevant details from the customers and subscriptions tables. SELECT
t.id AS transaction_id,
t.currency_code,
t.amount,
t.id_at_gateway,
t.status AS transaction_status,
c.id AS customer_id,
c.name AS customer_name,
c.email AS customer_email,
s.id AS subscription_id,
s.status AS subscription_status
FROM
transactions t
LEFT JOIN customers c ON t.customer_id = c.id
LEFT JOIN subscriptions s ON t.subscription_id = s.id
WHERE
t.status = 'needs_attention';