PaymentLinks
Create, update, and query the PaymentLinks in Stripe.
Table Specific Information
Select
The connector 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 connector.
- Id supports the following operator: =.
- Active supports the following operator: =.
- AccountId supports the following operator: =.
You can select from the PaymentLinks table with the following queries:
SELECT * FROM PaymentLinks WHERE Id = 'plink_1MHKmISC4snQ4WkOZ7vBfsGz' SELECT * FROM PaymentLinks WHERE Active = 'true' SELECT * FROM PaymentLinks WHERE AccountId = 'acct_1MGcyqSC4snQ4WkO'
Insert
INSERT can be executed by specifying the LineItems column. The columns that are not read-only can be inserted optionally.
LineItems is an aggregate column. See the example below on how to insert using this column.
INSERT INTO PaymentLinkLineItems#TEMP (PriceId, Quantity) VALUES ('price_1MGhiLSC4snQ4WkOdVl8fSu2', 12) INSERT INTO PaymentLinks (CustomFieldsAggregate,LineItems) VALUES ('{"key":"test1","type":"text"}', PaymentLinkLineItems#TEMP)
Insertion in PaymentLinks can also be done through a JSON String. See the example below:
INSERT INTO PaymentLinks (LineItems) VALUES ('{\"priceid\":\"price_1MGhiLSC4snQ4WkOdVl8fSu2\", \"quantity\":\"6\"}')
Insert can also be done by specifying MetadataAggregate with LineItems column. The columns that are not read-only can be inserted optionally.
INSERT INTO PaymentLinks(LineItems,MetadataAggregate,AfterCompletionHostedConfirmationCustomMessage,AfterCompletionType,AllowPromotionCodes)values ('[{\"price\":\"price_1OPPwR2eZvKYlo2CcNoquIuL\",\"Quantity\":\"245\"}]','[{\"order_id\":\"2415362\"}]','Hello','hosted_confirmation',true)
To add custom fields to the related invoice see the example below:
Insert into PaymentLinks(LineItems, InvoiceCreationEnabled, InvoiceCreationInvoiceDataCustomFields) Values (PaymentLinkLineItems#TEMP, true, '[{\"name\": \"b\", \"value\": 1}, {\"name\": \"c\", \"value\": 2}]')
Update
To update a PaymentLinks, specify Id column.
INSERT INTO PaymentLinkLineItems#TEMP (Id, Quantity) VALUES ('li_N41aipJlFRxvEQ', 17) UPDATE PaymentLinks SET LineItems = 'PaymentLinkLineItems#TEMP' WHERE Id = 'plink_1MJtXUSC4snQ4WkOhs6HJqLr'
You can also perform updates in PaymentLinks through a JSON String. See the example below:
UPDATE PaymentLinks SET LineItems = '{\"quantity\":\"69\", \"id\":\"li_N40wBnIKX6599N\"}', PaymentMethodTypes='[\"card\"]' WHERE Id = 'plink_1MJsuWSC4snQ4WkOXm8qlChy'
Columns
Name | Type | ReadOnly | References | Description |
Id [KEY] | String | True |
The Id of the Payment Link. | |
Active | Boolean | False |
Only return payment links that are active or inactive. | |
AfterCompletionHostedConfirmationCustomMessage | String | False |
A custom message to display to the customer after the purchase is complete. | |
AfterCompletionType | String | False |
The specified behavior after the purchase is complete. | |
AfterCompletionRedirectURL | String | False |
The specified behavior after the purchase is complete. | |
AllowPromotionCodes | Boolean | False |
Enables user redeemable promotion codes. | |
ApplicationFeeAmount | Integer | False |
The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner Stripe account. Can only be applied when there are no line items with recurring prices. | |
ApplicationFeePercent | Decimal | False |
A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner Stripe account. | |
AutomaticTaxEnabled | Boolean | False |
If it is set to true, tax will be calculated automatically using the customer location. | |
BillingAddressCollection | String | False |
Configuration for collecting the customers billing address. | |
ConsentCollectionPromotions | String | False |
Configure fields to gather active consent from customers. If set to auto, enables the collection of customer consent for promotional communications. Possible values are auto and none. | |
ConsentCollectionTermsOfService | String | False |
Configure fields to gather active consent from customers. If set to required, it requires customers to check a terms of service checkbox before being able to pay. Possible values are required and none. | |
ConsentCollectionPaymentMethodResuseAgreementPosition | String | False |
Determines the position and visibility of the payment method reuse agreement in the UI. When set to auto, Stripe’s defaults will be used. When set to hidden, the payment method reuse agreement text will always be hidden in the UI. | |
Currency | String | False |
Three-letter ISO currency code, in lowercase. | |
CustomTextShippingAddressMessage | String | False |
Custom text that should be displayed alongside shipping address collection. | |
CustomTextSubmitMessage | String | False |
Custom text that should be displayed alongside the payment confirmation button. | |
CustomTextAfterSubmitMessage | String | False |
Custom text that should be displayed after the payment confirmation button. | |
CustomTextTermsOfServiceAcceptanceMessage | String | False |
Custom text that should be displayed in place of the default terms of service agreement text. | |
CustomerCreation | String | False |
Configures whether checkout sessions created by this payment link create a Customer. Possible values are if_required and always. | |
Livemode | Boolean | True |
Has the value true if the object exists in live mode or the value false if the object exists in test mode. | |
Object | String | True |
String representing the object type. | |
OnBehalfOf | String | False |
The account on behalf of which to charge. | |
MetadataAggregate | String | False |
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. | |
PaymentIntentDataCaptureMethod | String | False |
Controls when the funds will be captured from the customer account. Possible values are automatic and manual. | |
PaymentIntentDataSetupFutureUsage | String | False |
Indicates that you intend to make future payments with the payment method collected by this Checkout Session. Possible values are on_session and off_session. | |
PaymentMethodCollection | String | False |
Configuration for collecting a payment method during checkout. Possible values are always and if_required. | |
PaymentMethodTypes | String | False |
The list of payment method types that customers can use. Possible values are card, affirm, promptpay, bacs_debit, bancontact, blik, boleto, eps, fpx, giropay, grabpay, ideal, klarna, konbini, oxxo, p24, paynow, pix, afterpay_clearpay, alipay, au_becs_debit, sepa_debit, sofort, us_bank_account, wechat_pay. | |
PhoneNumberberCollectionEnabled | Boolean | False |
If true, a phone number will be collected during checkout. | |
ShippingAddressCollectionAllowedCountries | String | False |
An array of two-letter ISO country codes representing which countries Checkout should provide as options for shipping locations. | |
ShippingOptions | String | False |
The shipping rate options applied to the session. | |
SubmitType | String | False |
Indicates the type of transaction being performed which customizes relevant text on the page, such as the submit button. | |
SubscriptionDataDescription | String | False |
The subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. | |
SubscriptionDataTrialPeriodDays | Integer | False |
Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1. | |
TaxIdCollectionEnabled | Boolean | False |
Details on the state of tax ID collection for the payment link. | |
TransferDataDestination | String | False |
The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to. | |
TransferDataAmount | Int | False |
The amount that will be transferred automatically when a charge succeeds. | |
Url | String | True |
The public URL that can be shared with customers. | |
LineItems | String | False |
The line items representing what is being sold. Each line item represents an item being sold. | |
CustomFieldsAggregate | String | False |
Custom Fields object. | |
AutomaticTaxLiabilityType | String | False |
Type of the account referenced in the request. The allowed values are account, self. | |
AutomaticTaxLiabilityAccount | String | False |
The connected account being referenced when type is account. | |
InactiveMessage | String | False |
The custom message to be displayed to a customer when a payment link is no longer active. | |
InvoiceCreationEnabled | Boolean | False |
Enable creating an invoice on successful payment for payment mode payment links. | |
InvoiceCreationInvoiceDataAccountTaxIds | String | False |
The account tax IDs associated with the invoice. Default invoice values will be used if unspecified. | |
InvoiceCreationInvoiceDataCustomFields | String | False |
A list of up to 4 custom fields to be displayed on the invoice. | |
InvoiceCreationInvoiceDataDescription | String | False |
An arbitrary string attached to the object. Often useful for displaying to users. | |
InvoiceCreationInvoiceDataFooter | String | False |
Footer to be displayed on the invoice. | |
InvoiceCreationInvoiceDataIssuerAccount | String | False |
The connected account being referenced when invoice data issuer type is account. | |
InvoiceCreationInvoiceDataIssuerType | String | False |
Type of the account referenced. The allowed values are account, self. | |
InvoiceCreationInvoiceDataMetadata | String | False |
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. | |
InvoiceCreationInvoiceDataRenderingOptionsAmountTaxDisplay | String | False |
How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of exclude_tax or include_inclusive_tax. include_inclusive_tax will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. exclude_tax will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. The allowed values are exclude_tax, include_inclusive_tax. | |
RestrictionsCompletedSessionsCount | Integer | True |
The current number of checkout sessions that have been completed on the payment link which count towards the completed_sessions restriction to be met. | |
RestrictionsCompletedSessionsLimit | Integer | False |
The maximum number of checkout sessions that can be completed for the completed_sessions restriction to be met. |
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. |