UNPKG

@xuda.io/xuda-plugin-stripe-core

Version:

Xuda Stripe Connect Library

1,175 lines (1,166 loc) 54.2 kB
var _fields = { stripe_api_account_id: { text: "Stripe API Account ID", type: "select", description: "The Api account ID that holds Stripe's Api keys as defined in Xuda’s dashboard", mandatory: true, plugin_setup: true, // ajax_call: { // url: "https://cpi.xuda.io/get_plugin_setup", // data: { plugin_name: "@xuda.io/xuda-plugin-stripe-core" }, // callback: function (data, field) { // field.options = _.map(data.accounts, function (val, key) { // return { label: val.name, value: key }; // }); // }, // }, }, widgetCallbackEvent: { text: "Callback Event Id", type: "text", description: "A callback event ID triggered when operation is completed", is_event: true, }, stripe_country: { text: "Country", description: "", type: "select", options: [ { text: "Afghanistan", value: "AF" }, { text: "land Islands", value: "AX" }, { text: "Albania", value: "AL" }, { text: "Algeria", value: "DZ" }, { text: "American Samoa", value: "AS" }, { text: "AndorrA", value: "AD" }, { text: "Angola", value: "AO" }, { text: "Anguilla", value: "AI" }, { text: "Antarctica", value: "AQ" }, { text: "Antigua and Barbuda", value: "AG" }, { text: "Argentina", value: "AR" }, { text: "Armenia", value: "AM" }, { text: "Aruba", value: "AW" }, { text: "Australia", value: "AU" }, { text: "Austria", value: "AT" }, { text: "Azerbaijan", value: "AZ" }, { text: "Bahamas", value: "BS" }, { text: "Bahrain", value: "BH" }, { text: "Bangladesh", value: "BD" }, { text: "Barbados", value: "BB" }, { text: "Belarus", value: "BY" }, { text: "Belgium", value: "BE" }, { text: "Belize", value: "BZ" }, { text: "Benin", value: "BJ" }, { text: "Bermuda", value: "BM" }, { text: "Bhutan", value: "BT" }, { text: "Bolivia", value: "BO" }, { text: "Bosnia and Herzegovina", value: "BA" }, { text: "Botswana", value: "BW" }, { text: "Bouvet Island", value: "BV" }, { text: "Brazil", value: "BR" }, { text: "British Indian Ocean Territory", value: "IO" }, { text: "Brunei Darussalam", value: "BN" }, { text: "Bulgaria", value: "BG" }, { text: "Burkina Faso", value: "BF" }, { text: "Burundi", value: "BI" }, { text: "Cambodia", value: "KH" }, { text: "Cameroon", value: "CM" }, { text: "Canada", value: "CA" }, { text: "Cape Verde", value: "CV" }, { text: "Cayman Islands", value: "KY" }, { text: "Central African Republic", value: "CF" }, { text: "Chad", value: "TD" }, { text: "Chile", value: "CL" }, { text: "China", value: "CN" }, { text: "Christmas Island", value: "CX" }, { text: "Cocos (Keeling) Islands", value: "CC" }, { text: "Colombia", value: "CO" }, { text: "Comoros", value: "KM" }, { text: "Congo", value: "CG" }, { text: "Congo, The Democratic Republic of the", value: "CD" }, { text: "Cook Islands", value: "CK" }, { text: "Costa Rica", value: "CR" }, { text: "Cote DIvoire", value: "CI" }, { text: "Croatia", value: "HR" }, { text: "Cuba", value: "CU" }, { text: "Cyprus", value: "CY" }, { text: "Czech Republic", value: "CZ" }, { text: "Denmark", value: "DK" }, { text: "Djibouti", value: "DJ" }, { text: "Dominica", value: "DM" }, { text: "Dominican Republic", value: "DO" }, { text: "Ecuador", value: "EC" }, { text: "Egypt", value: "EG" }, { text: "El Salvador", value: "SV" }, { text: "Equatorial Guinea", value: "GQ" }, { text: "Eritrea", value: "ER" }, { text: "Estonia", value: "EE" }, { text: "Ethiopia", value: "ET" }, { text: "Falkland Islands (Malvinas)", value: "FK" }, { text: "Faroe Islands", value: "FO" }, { text: "Fiji", value: "FJ" }, { text: "Finland", value: "FI" }, { text: "France", value: "FR" }, { text: "French Guiana", value: "GF" }, { text: "French Polynesia", value: "PF" }, { text: "French Southern Territories", value: "TF" }, { text: "Gabon", value: "GA" }, { text: "Gambia", value: "GM" }, { text: "Georgia", value: "GE" }, { text: "Germany", value: "DE" }, { text: "Ghana", value: "GH" }, { text: "Gibraltar", value: "GI" }, { text: "Greece", value: "GR" }, { text: "Greenland", value: "GL" }, { text: "Grenada", value: "GD" }, { text: "Guadeloupe", value: "GP" }, { text: "Guam", value: "GU" }, { text: "Guatemala", value: "GT" }, { text: "Guernsey", value: "GG" }, { text: "Guinea", value: "GN" }, { text: "Guinea-Bissau", value: "GW" }, { text: "Guyana", value: "GY" }, { text: "Haiti", value: "HT" }, { text: "Heard Island and Mcdonald Islands", value: "HM" }, { text: "Holy See (Vatican City State)", value: "VA" }, { text: "Honduras", value: "HN" }, { text: "Hong Kong", value: "HK" }, { text: "Hungary", value: "HU" }, { text: "Iceland", value: "IS" }, { text: "India", value: "IN" }, { text: "Indonesia", value: "ID" }, { text: "Iran, Islamic Republic Of", value: "IR" }, { text: "Iraq", value: "IQ" }, { text: "Ireland", value: "IE" }, { text: "Isle of Man", value: "IM" }, { text: "Israel", value: "IL" }, { text: "Italy", value: "IT" }, { text: "Jamaica", value: "JM" }, { text: "Japan", value: "JP" }, { text: "Jersey", value: "JE" }, { text: "Jordan", value: "JO" }, { text: "Kazakhstan", value: "KZ" }, { text: "Kenya", value: "KE" }, { text: "Kiribati", value: "KI" }, { text: "Korea, Democratic PeopleS Republic of", value: "KP" }, { text: "Korea, Republic of", value: "KR" }, { text: "Kuwait", value: "KW" }, { text: "Kyrgyzstan", value: "KG" }, { text: "Lao PeopleS Democratic Republic", value: "LA" }, { text: "Latvia", value: "LV" }, { text: "Lebanon", value: "LB" }, { text: "Lesotho", value: "LS" }, { text: "Liberia", value: "LR" }, { text: "Libyan Arab Jamahiriya", value: "LY" }, { text: "Liechtenstein", value: "LI" }, { text: "Lithuania", value: "LT" }, { text: "Luxembourg", value: "LU" }, { text: "Macao", value: "MO" }, { text: "Macedonia, The Former Yugoslav Republic of", value: "MK", }, { text: "Madagascar", value: "MG" }, { text: "Malawi", value: "MW" }, { text: "Malaysia", value: "MY" }, { text: "Maldives", value: "MV" }, { text: "Mali", value: "ML" }, { text: "Malta", value: "MT" }, { text: "Marshall Islands", value: "MH" }, { text: "Martinique", value: "MQ" }, { text: "Mauritania", value: "MR" }, { text: "Mauritius", value: "MU" }, { text: "Mayotte", value: "YT" }, { text: "Mexico", value: "MX" }, { text: "Micronesia, Federated States of", value: "FM" }, { text: "Moldova, Republic of", value: "MD" }, { text: "Monaco", value: "MC" }, { text: "Mongolia", value: "MN" }, { text: "Montenegro", value: "ME" }, { text: "Montserrat", value: "MS" }, { text: "Morocco", value: "MA" }, { text: "Mozambique", value: "MZ" }, { text: "Myanmar", value: "MM" }, { text: "Namibia", value: "NA" }, { text: "Nauru", value: "NR" }, { text: "Nepal", value: "NP" }, { text: "Netherlands", value: "NL" }, { text: "Netherlands Antilles", value: "AN" }, { text: "New Caledonia", value: "NC" }, { text: "New Zealand", value: "NZ" }, { text: "Nicaragua", value: "NI" }, { text: "Niger", value: "NE" }, { text: "Nigeria", value: "NG" }, { text: "Niue", value: "NU" }, { text: "Norfolk Island", value: "NF" }, { text: "Northern Mariana Islands", value: "MP" }, { text: "Norway", value: "NO" }, { text: "Oman", value: "OM" }, { text: "Pakistan", value: "PK" }, { text: "Palau", value: "PW" }, { text: "Panama", value: "PA" }, { text: "Papua New Guinea", value: "PG" }, { text: "Paraguay", value: "PY" }, { text: "Peru", value: "PE" }, { text: "Philippines", value: "PH" }, { text: "Pitcairn", value: "PN" }, { text: "Poland", value: "PL" }, { text: "Portugal", value: "PT" }, { text: "Puerto Rico", value: "PR" }, { text: "Qatar", value: "QA" }, { text: "Reunion", value: "RE" }, { text: "Romania", value: "RO" }, { text: "Russian Federation", value: "RU" }, { text: "RWANDA", value: "RW" }, { text: "Saint Helena", value: "SH" }, { text: "Saint Kitts and Nevis", value: "KN" }, { text: "Saint Lucia", value: "LC" }, { text: "Saint Pierre and Miquelon", value: "PM" }, { text: "Saint Vincent and the Grenadines", value: "VC" }, { text: "Samoa", value: "WS" }, { text: "San Marino", value: "SM" }, { text: "Sao Tome and Principe", value: "ST" }, { text: "Saudi Arabia", value: "SA" }, { text: "Senegal", value: "SN" }, { text: "Serbia", value: "RS" }, { text: "Seychelles", value: "SC" }, { text: "Sierra Leone", value: "SL" }, { text: "Singapore", value: "SG" }, { text: "Slovakia", value: "SK" }, { text: "Slovenia", value: "SI" }, { text: "Solomon Islands", value: "SB" }, { text: "Somalia", value: "SO" }, { text: "South Africa", value: "ZA" }, { text: "South Georgia and the South Sandwich Islands", value: "GS", }, { text: "Spain", value: "ES" }, { text: "Sri Lanka", value: "LK" }, { text: "Sudan", value: "SD" }, { text: "Suritext", value: "SR" }, { text: "Svalbard and Jan Mayen", value: "SJ" }, { text: "Swaziland", value: "SZ" }, { text: "Sweden", value: "SE" }, { text: "Switzerland", value: "CH" }, { text: "Syrian Arab Republic", value: "SY" }, { text: "Taiwan, Province of China", value: "TW" }, { text: "Tajikistan", value: "TJ" }, { text: "Tanzania, United Republic of", value: "TZ" }, { text: "Thailand", value: "TH" }, { text: "Timor-Leste", value: "TL" }, { text: "Togo", value: "TG" }, { text: "Tokelau", value: "TK" }, { text: "Tonga", value: "TO" }, { text: "Trinidad and Tobago", value: "TT" }, { text: "Tunisia", value: "TN" }, { text: "Turkey", value: "TR" }, { text: "Turkmenistan", value: "TM" }, { text: "Turks and Caicos Islands", value: "TC" }, { text: "Tuvalu", value: "TV" }, { text: "Uganda", value: "UG" }, { text: "Ukraine", value: "UA" }, { text: "United Arab Emirates", value: "AE" }, { text: "United Kingdom", value: "GB" }, { text: "United States", value: "US" }, { text: "United States Minor Outlying Islands", value: "UM" }, { text: "Uruguay", value: "UY" }, { text: "Uzbekistan", value: "UZ" }, { text: "Vanuatu", value: "VU" }, { text: "Venezuela", value: "VE" }, { text: "Viet Nam", value: "VN" }, { text: "Virgin Islands, British", value: "VG" }, { text: "Virgin Islands, U.S.", value: "VI" }, { text: "Wallis and Futuna", value: "WF" }, { text: "Western Sahara", value: "EH" }, { text: "Yemen", value: "YE" }, { text: "Zambia", value: "ZM" }, { text: "Zimbabwe", value: "ZW" }, ], }, stripe_customer_id: { text: "Customer ID", type: "text", description: "The ID of an existing customer.", mandatory: true, }, stripe_card_id: { text: "Card ID", type: "text", description: "You can store multiple cards on a customer in order to charge the customer later.", }, stripe_token: { text: "Token", type: "text", description: "A token, like the ones returned by Stripe, Tokenization is the process Stripe uses to collect sensitive card or bank account details, or personally identifiable information (PII), directly from your customers in a secure manner. A token representing this information is returned to your server to use. You should use our recommended payments integrations to perform this process client-side. This ensures that no sensitive card data touches your server, and allows your integration to operate in a PCI-compliant way", }, }; export const methods = { stripe_charge: { name: "Charge", description: "To charge a credit or a debit card. You can retrieve and refund individual charges as well as list all charges.", fields: { stripe_api_account_id: _fields.stripe_api_account_id, widgetCallbackEvent: _fields.widgetCallbackEvent, stripe_customer_id: _fields.stripe_customer_id, stripe_amount: { text: "Amount", type: "number", description: "Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or equivalent in charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).", }, stripe_card_id: _fields.stripe_card_id, stripe_email: { text: "Email", type: "text", description: "The email address to which this charge’s receipt will be sent. The receipt will not be sent until the charge is paid, and no receipts will be sent for test mode charges. If this charge is for a Customer, the email address specified here will override the customer’s email address. If receipt_email is specified for a charge in live mode, a receipt will be sent regardless of your email settings.", }, stripe_description: { text: "Description", type: "text", description: "An arbitrary string which you can attach to a Charge object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the description of the charge(s) that they are describing.", }, stripe_charge_id: { text: "Charge ID", type: "text", description: "Captured charge Id", }, stripe_send_invoice: { text: "Send Invoice", type: "select", description: "", options: [ { text: "Yes", value: "", }, { text: "No", value: "N", }, ], }, stripe_capture: { text: "Capture", type: "select", description: "Whether to immediately capture the charge. Defaults to true. When false, the charge issues an authorization (or pre-authorization), and will need to be captured later. Uncaptured charges expire after a set number of days (7 by default). For more information, see the authorizing charges and settling later documentation.", options: [ { text: "Yes", value: "", }, { text: "No", value: "N", }, ], }, stripe_token: _fields.stripe_token, }, response: { stripe_charge_id: "ch_3LXlf62eZvKYlo2C0OFiZzUq", stripe_card_id: "card_19yUNL2eZvKYlo2CNGsN6EWH", stripe_charge_status: "succeeded", stripe_customer_id: "cus_AJ78ZaALpqgiuZ", stripe_charge_obj: "the whole api response object", }, }, stripe_capture_charge: { name: "Capture Charge", description: "Capture the payment of an existing, uncaptured, charge. This is the second half of the two-step payment flow, where first you created a charge with the capture option set to false. Uncaptured payments expire a set number of days after they are created (7 by default). If they are not captured by that point in time, they will be marked as refunded and will no longer be capturable.", fields: { stripe_api_account_id: _fields.stripe_api_account_id, widgetCallbackEvent: _fields.widgetCallbackEvent, stripe_charge_id: { text: "Charge ID", type: "text", mandatory: true, }, }, response: {}, }, stripe_refund: { name: "Refund", description: "Refund method allow you to refund a charge that has previously been created but not yet refunded. Funds will be refunded to the credit or debit card that was originally charged.", fields: { stripe_api_account_id: _fields.stripe_api_account_id, widgetCallbackEvent: _fields.widgetCallbackEvent, stripe_amount: { text: "Amount", type: "number", description: "Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or equivalent in charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).", warn: "Must set Amount if Charge Id field is not defined, default is entire charge", }, stripe_reason: { text: "Reason", type: "text", description: "String indicating the reason for the refund. If set, possible values are duplicate, fraudulent, and requested_by_customer. If you believe the charge to be fraudulent, specifying fraudulent as the reason will add the associated card and email to your block lists, and will also help us improve our fraud detection algorithms.", }, stripe_charge_id: { text: "Charge ID", type: "text", description: "Captured charge Id", warn: "Must set charge Id if Amount field is not defined", }, stripe_payment_intent: { text: "Payment Intent Id", type: "text", description: "ID of the PaymentIntent to refund.", }, stripe_reverse_transfer: { text: "Reverse Transfer", type: "bool", description: "Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount).", }, // , // stripe_send_invoice: { // text: "Send Invoice", // type: "select", // description: "", // options: [ // { // text: "Yes", // value: "", // }, // { // text: "No", // value: "N", // }, // ], // }, }, response: { stripe_refund_id: "ch_3LXlf62eZvKYlo2C0OFiZzUq", stripe_refund_status: "succeeded", stripe_refund_obj: "the whole api response object", }, }, stripe_remove_card: { name: "Remove Card", description: "You can delete cards from a customer. If you delete a card that is currently the default source, then the most recently added source will become the new default. If you delete a card that is the last remaining source on the customer, then the default_source attribute will become null. For recipients: if you delete the default card, then the most recently added card will become the new default. If you delete the last remaining card on a recipient, then the default_card attribute will become null. Note that for cards belonging to customers, you might want to prevent customers on paid subscriptions from deleting all cards on file, so that there is at least one default card for the next invoice payment attempt.", fields: { stripe_api_account_id: _fields.stripe_api_account_id, widgetCallbackEvent: _fields.widgetCallbackEvent, stripe_customer_id: _fields.stripe_customer_id, stripe_card_id: _fields.stripe_card_id, }, response: { stripe_card_id: "card_19yUNL2eZvKYlo2CNGsN6EWH", }, }, stripe_set_default_card: { name: "Set Default Card", description: "You can set default card to a customer.", fields: { stripe_api_account_id: _fields.stripe_api_account_id, widgetCallbackEvent: _fields.widgetCallbackEvent, stripe_customer_id: _fields.stripe_customer_id, stripe_card_id: _fields.stripe_card_id, }, response: { stripe_card_id: "card_19yUNL2eZvKYlo2CNGsN6EWH", }, }, stripe_create_customer: { name: "Create Customer", description: "This method represents a customer of your business. It lets you create recurring charges and track payments that belong to the same customer.", fields: { stripe_api_account_id: _fields.stripe_api_account_id, widgetCallbackEvent: _fields.widgetCallbackEvent, stripe_first_name: { text: "First Name", type: "text", description: "The individual’s first name.", }, stripe_last_name: { text: "Last Name", type: "text", description: "The individual’s last name.", }, stripe_ssn_last_4: { text: "SSN Last 4", type: "number", description: "The last four digits of the individual’s Social Security Number (U.S. only).", }, stripe_address_line_1: { text: "Address Line 1", type: "text", description: "Address line 1 (e.g., street, PO Box, or company name).", }, stripe_address_line_2: { text: "Address Line 2", type: "text", description: "Address line 2 (e.g., apartment, suite, unit, or building).", }, stripe_city: { text: "City", type: "text", description: "The individual’s first name.", }, stripe_postal_code: { text: "Postal Code", type: "text", description: "ZIP or postal code.", }, stripe_state: { text: "State", type: "text", description: "State, county, province, or region.", }, stripe_country: _fields.stripe_country, stripe_email: { text: "Email", type: "text", description: "The email address of the account holder. This is only to make the account easier to identify to you. Stripe only emails Custom accounts with your consent.", mandatory: true, }, stripe_phone_number: { text: "Phone Number", type: "text", description: "The individual’s phone number.", }, stripe_shipping_name: { text: "Shipping Name", type: "text", description: "Shipping Name.", }, stripe_shipping_address_line_1: { text: "Shipping Address Line 1", type: "text", description: "Address line 1 (e.g., street, PO Box, or company name).", }, stripe_shipping_address_line_2: { text: "Shipping Address Line 2", type: "text", description: "Address line 2 (e.g., apartment, suite, unit, or building).", }, stripe_shipping_city: { text: "Shipping City", type: "text", description: "The individual’s first name.", }, stripe_shipping_postal_code: { text: "Shipping Postal Code", type: "text", description: "ZIP or postal code.", }, stripe_shipping_state: { text: "Shipping State", type: "text", description: "State, county, province, or region.", }, stripe_shipping_country: { text: "Shipping Country", description: "", type: "select", options: [ { text: "Afghanistan", value: "AF" }, { text: "land Islands", value: "AX" }, { text: "Albania", value: "AL" }, { text: "Algeria", value: "DZ" }, { text: "American Samoa", value: "AS" }, { text: "AndorrA", value: "AD" }, { text: "Angola", value: "AO" }, { text: "Anguilla", value: "AI" }, { text: "Antarctica", value: "AQ" }, { text: "Antigua and Barbuda", value: "AG" }, { text: "Argentina", value: "AR" }, { text: "Armenia", value: "AM" }, { text: "Aruba", value: "AW" }, { text: "Australia", value: "AU" }, { text: "Austria", value: "AT" }, { text: "Azerbaijan", value: "AZ" }, { text: "Bahamas", value: "BS" }, { text: "Bahrain", value: "BH" }, { text: "Bangladesh", value: "BD" }, { text: "Barbados", value: "BB" }, { text: "Belarus", value: "BY" }, { text: "Belgium", value: "BE" }, { text: "Belize", value: "BZ" }, { text: "Benin", value: "BJ" }, { text: "Bermuda", value: "BM" }, { text: "Bhutan", value: "BT" }, { text: "Bolivia", value: "BO" }, { text: "Bosnia and Herzegovina", value: "BA" }, { text: "Botswana", value: "BW" }, { text: "Bouvet Island", value: "BV" }, { text: "Brazil", value: "BR" }, { text: "British Indian Ocean Territory", value: "IO" }, { text: "Brunei Darussalam", value: "BN" }, { text: "Bulgaria", value: "BG" }, { text: "Burkina Faso", value: "BF" }, { text: "Burundi", value: "BI" }, { text: "Cambodia", value: "KH" }, { text: "Cameroon", value: "CM" }, { text: "Canada", value: "CA" }, { text: "Cape Verde", value: "CV" }, { text: "Cayman Islands", value: "KY" }, { text: "Central African Republic", value: "CF" }, { text: "Chad", value: "TD" }, { text: "Chile", value: "CL" }, { text: "China", value: "CN" }, { text: "Christmas Island", value: "CX" }, { text: "Cocos (Keeling) Islands", value: "CC" }, { text: "Colombia", value: "CO" }, { text: "Comoros", value: "KM" }, { text: "Congo", value: "CG" }, { text: "Congo, The Democratic Republic of the", value: "CD" }, { text: "Cook Islands", value: "CK" }, { text: "Costa Rica", value: "CR" }, { text: "Cote DIvoire", value: "CI" }, { text: "Croatia", value: "HR" }, { text: "Cuba", value: "CU" }, { text: "Cyprus", value: "CY" }, { text: "Czech Republic", value: "CZ" }, { text: "Denmark", value: "DK" }, { text: "Djibouti", value: "DJ" }, { text: "Dominica", value: "DM" }, { text: "Dominican Republic", value: "DO" }, { text: "Ecuador", value: "EC" }, { text: "Egypt", value: "EG" }, { text: "El Salvador", value: "SV" }, { text: "Equatorial Guinea", value: "GQ" }, { text: "Eritrea", value: "ER" }, { text: "Estonia", value: "EE" }, { text: "Ethiopia", value: "ET" }, { text: "Falkland Islands (Malvinas)", value: "FK" }, { text: "Faroe Islands", value: "FO" }, { text: "Fiji", value: "FJ" }, { text: "Finland", value: "FI" }, { text: "France", value: "FR" }, { text: "French Guiana", value: "GF" }, { text: "French Polynesia", value: "PF" }, { text: "French Southern Territories", value: "TF" }, { text: "Gabon", value: "GA" }, { text: "Gambia", value: "GM" }, { text: "Georgia", value: "GE" }, { text: "Germany", value: "DE" }, { text: "Ghana", value: "GH" }, { text: "Gibraltar", value: "GI" }, { text: "Greece", value: "GR" }, { text: "Greenland", value: "GL" }, { text: "Grenada", value: "GD" }, { text: "Guadeloupe", value: "GP" }, { text: "Guam", value: "GU" }, { text: "Guatemala", value: "GT" }, { text: "Guernsey", value: "GG" }, { text: "Guinea", value: "GN" }, { text: "Guinea-Bissau", value: "GW" }, { text: "Guyana", value: "GY" }, { text: "Haiti", value: "HT" }, { text: "Heard Island and Mcdonald Islands", value: "HM" }, { text: "Holy See (Vatican City State)", value: "VA" }, { text: "Honduras", value: "HN" }, { text: "Hong Kong", value: "HK" }, { text: "Hungary", value: "HU" }, { text: "Iceland", value: "IS" }, { text: "India", value: "IN" }, { text: "Indonesia", value: "ID" }, { text: "Iran, Islamic Republic Of", value: "IR" }, { text: "Iraq", value: "IQ" }, { text: "Ireland", value: "IE" }, { text: "Isle of Man", value: "IM" }, { text: "Israel", value: "IL" }, { text: "Italy", value: "IT" }, { text: "Jamaica", value: "JM" }, { text: "Japan", value: "JP" }, { text: "Jersey", value: "JE" }, { text: "Jordan", value: "JO" }, { text: "Kazakhstan", value: "KZ" }, { text: "Kenya", value: "KE" }, { text: "Kiribati", value: "KI" }, { text: "Korea, Democratic PeopleS Republic of", value: "KP" }, { text: "Korea, Republic of", value: "KR" }, { text: "Kuwait", value: "KW" }, { text: "Kyrgyzstan", value: "KG" }, { text: "Lao PeopleS Democratic Republic", value: "LA" }, { text: "Latvia", value: "LV" }, { text: "Lebanon", value: "LB" }, { text: "Lesotho", value: "LS" }, { text: "Liberia", value: "LR" }, { text: "Libyan Arab Jamahiriya", value: "LY" }, { text: "Liechtenstein", value: "LI" }, { text: "Lithuania", value: "LT" }, { text: "Luxembourg", value: "LU" }, { text: "Macao", value: "MO" }, { text: "Macedonia, The Former Yugoslav Republic of", value: "MK", }, { text: "Madagascar", value: "MG" }, { text: "Malawi", value: "MW" }, { text: "Malaysia", value: "MY" }, { text: "Maldives", value: "MV" }, { text: "Mali", value: "ML" }, { text: "Malta", value: "MT" }, { text: "Marshall Islands", value: "MH" }, { text: "Martinique", value: "MQ" }, { text: "Mauritania", value: "MR" }, { text: "Mauritius", value: "MU" }, { text: "Mayotte", value: "YT" }, { text: "Mexico", value: "MX" }, { text: "Micronesia, Federated States of", value: "FM" }, { text: "Moldova, Republic of", value: "MD" }, { text: "Monaco", value: "MC" }, { text: "Mongolia", value: "MN" }, { text: "Montenegro", value: "ME" }, { text: "Montserrat", value: "MS" }, { text: "Morocco", value: "MA" }, { text: "Mozambique", value: "MZ" }, { text: "Myanmar", value: "MM" }, { text: "Namibia", value: "NA" }, { text: "Nauru", value: "NR" }, { text: "Nepal", value: "NP" }, { text: "Netherlands", value: "NL" }, { text: "Netherlands Antilles", value: "AN" }, { text: "New Caledonia", value: "NC" }, { text: "New Zealand", value: "NZ" }, { text: "Nicaragua", value: "NI" }, { text: "Niger", value: "NE" }, { text: "Nigeria", value: "NG" }, { text: "Niue", value: "NU" }, { text: "Norfolk Island", value: "NF" }, { text: "Northern Mariana Islands", value: "MP" }, { text: "Norway", value: "NO" }, { text: "Oman", value: "OM" }, { text: "Pakistan", value: "PK" }, { text: "Palau", value: "PW" }, { text: "Panama", value: "PA" }, { text: "Papua New Guinea", value: "PG" }, { text: "Paraguay", value: "PY" }, { text: "Peru", value: "PE" }, { text: "Philippines", value: "PH" }, { text: "Pitcairn", value: "PN" }, { text: "Poland", value: "PL" }, { text: "Portugal", value: "PT" }, { text: "Puerto Rico", value: "PR" }, { text: "Qatar", value: "QA" }, { text: "Reunion", value: "RE" }, { text: "Romania", value: "RO" }, { text: "Russian Federation", value: "RU" }, { text: "RWANDA", value: "RW" }, { text: "Saint Helena", value: "SH" }, { text: "Saint Kitts and Nevis", value: "KN" }, { text: "Saint Lucia", value: "LC" }, { text: "Saint Pierre and Miquelon", value: "PM" }, { text: "Saint Vincent and the Grenadines", value: "VC" }, { text: "Samoa", value: "WS" }, { text: "San Marino", value: "SM" }, { text: "Sao Tome and Principe", value: "ST" }, { text: "Saudi Arabia", value: "SA" }, { text: "Senegal", value: "SN" }, { text: "Serbia", value: "RS" }, { text: "Seychelles", value: "SC" }, { text: "Sierra Leone", value: "SL" }, { text: "Singapore", value: "SG" }, { text: "Slovakia", value: "SK" }, { text: "Slovenia", value: "SI" }, { text: "Solomon Islands", value: "SB" }, { text: "Somalia", value: "SO" }, { text: "South Africa", value: "ZA" }, { text: "South Georgia and the South Sandwich Islands", value: "GS", }, { text: "Spain", value: "ES" }, { text: "Sri Lanka", value: "LK" }, { text: "Sudan", value: "SD" }, { text: "Suritext", value: "SR" }, { text: "Svalbard and Jan Mayen", value: "SJ" }, { text: "Swaziland", value: "SZ" }, { text: "Sweden", value: "SE" }, { text: "Switzerland", value: "CH" }, { text: "Syrian Arab Republic", value: "SY" }, { text: "Taiwan, Province of China", value: "TW" }, { text: "Tajikistan", value: "TJ" }, { text: "Tanzania, United Republic of", value: "TZ" }, { text: "Thailand", value: "TH" }, { text: "Timor-Leste", value: "TL" }, { text: "Togo", value: "TG" }, { text: "Tokelau", value: "TK" }, { text: "Tonga", value: "TO" }, { text: "Trinidad and Tobago", value: "TT" }, { text: "Tunisia", value: "TN" }, { text: "Turkey", value: "TR" }, { text: "Turkmenistan", value: "TM" }, { text: "Turks and Caicos Islands", value: "TC" }, { text: "Tuvalu", value: "TV" }, { text: "Uganda", value: "UG" }, { text: "Ukraine", value: "UA" }, { text: "United Arab Emirates", value: "AE" }, { text: "United Kingdom", value: "GB" }, { text: "United States", value: "US" }, { text: "United States Minor Outlying Islands", value: "UM" }, { text: "Uruguay", value: "UY" }, { text: "Uzbekistan", value: "UZ" }, { text: "Vanuatu", value: "VU" }, { text: "Venezuela", value: "VE" }, { text: "Viet Nam", value: "VN" }, { text: "Virgin Islands, British", value: "VG" }, { text: "Virgin Islands, U.S.", value: "VI" }, { text: "Wallis and Futuna", value: "WF" }, { text: "Western Sahara", value: "EH" }, { text: "Yemen", value: "YE" }, { text: "Zambia", value: "ZM" }, { text: "Zimbabwe", value: "ZW" }, ], }, }, response: { stripe_customer_id: "cus_AJ78ZaALpqgiuZ", }, }, stripe_update_customer: { name: "Update Customer", description: "Updates the specified customer by setting the values of the parameters passed.", fields: { stripe_api_account_id: _fields.stripe_api_account_id, widgetCallbackEvent: _fields.widgetCallbackEvent, stripe_customer_id: _fields.stripe_customer_id, stripe_first_name: { text: "First Name", type: "text", description: "The individual’s first name.", }, stripe_last_name: { text: "Last Name", type: "text", description: "The individual’s last name.", }, stripe_ssn_last_4: { text: "SSN Last 4", type: "number", description: "The last four digits of the individual’s Social Security Number (U.S. only).", }, stripe_address_line_1: { text: "Address Line 1", type: "text", description: "Address line 1 (e.g., street, PO Box, or company name).", }, stripe_address_line_2: { text: "Address Line 2", type: "text", description: "Address line 2 (e.g., apartment, suite, unit, or building).", }, stripe_city: { text: "City", type: "text", description: "The individual’s first name.", }, stripe_postal_code: { text: "Postal Code", type: "text", description: "ZIP or postal code.", }, stripe_state: { text: "State", type: "text", description: "State, county, province, or region.", }, stripe_country: _fields.stripe_country, stripe_email: { text: "Email", type: "text", description: "The email address of the account holder. This is only to make the account easier to identify to you. Stripe only emails Custom accounts with your consent.", }, stripe_phone_number: { text: "Phone Number", type: "text", description: "The individual’s phone number.", }, stripe_shipping_name: { text: "Shipping Name", type: "text", description: "Shipping Name.", }, stripe_shipping_address_line_1: { text: "Shipping Address Line 1", type: "text", description: "Address line 1 (e.g., street, PO Box, or company name).", }, stripe_shipping_address_line_2: { text: "Shipping Address Line 2", type: "text", description: "Address line 2 (e.g., apartment, suite, unit, or building).", }, stripe_shipping_city: { text: "Shipping City", type: "text", description: "The individual’s first name.", }, stripe_shipping_postal_code: { text: "Shipping Postal Code", type: "text", description: "ZIP or postal code.", }, stripe_shipping_state: { text: "Shipping State", type: "text", description: "State, county, province, or region.", }, stripe_shipping_country: { text: "Shipping Country", description: "", type: "select", options: [ { text: "Afghanistan", value: "AF" }, { text: "land Islands", value: "AX" }, { text: "Albania", value: "AL" }, { text: "Algeria", value: "DZ" }, { text: "American Samoa", value: "AS" }, { text: "AndorrA", value: "AD" }, { text: "Angola", value: "AO" }, { text: "Anguilla", value: "AI" }, { text: "Antarctica", value: "AQ" }, { text: "Antigua and Barbuda", value: "AG" }, { text: "Argentina", value: "AR" }, { text: "Armenia", value: "AM" }, { text: "Aruba", value: "AW" }, { text: "Australia", value: "AU" }, { text: "Austria", value: "AT" }, { text: "Azerbaijan", value: "AZ" }, { text: "Bahamas", value: "BS" }, { text: "Bahrain", value: "BH" }, { text: "Bangladesh", value: "BD" }, { text: "Barbados", value: "BB" }, { text: "Belarus", value: "BY" }, { text: "Belgium", value: "BE" }, { text: "Belize", value: "BZ" }, { text: "Benin", value: "BJ" }, { text: "Bermuda", value: "BM" }, { text: "Bhutan", value: "BT" }, { text: "Bolivia", value: "BO" }, { text: "Bosnia and Herzegovina", value: "BA" }, { text: "Botswana", value: "BW" }, { text: "Bouvet Island", value: "BV" }, { text: "Brazil", value: "BR" }, { text: "British Indian Ocean Territory", value: "IO" }, { text: "Brunei Darussalam", value: "BN" }, { text: "Bulgaria", value: "BG" }, { text: "Burkina Faso", value: "BF" }, { text: "Burundi", value: "BI" }, { text: "Cambodia", value: "KH" }, { text: "Cameroon", value: "CM" }, { text: "Canada", value: "CA" }, { text: "Cape Verde", value: "CV" }, { text: "Cayman Islands", value: "KY" }, { text: "Central African Republic", value: "CF" }, { text: "Chad", value: "TD" }, { text: "Chile", value: "CL" }, { text: "China", value: "CN" }, { text: "Christmas Island", value: "CX" }, { text: "Cocos (Keeling) Islands", value: "CC" }, { text: "Colombia", value: "CO" }, { text: "Comoros", value: "KM" }, { text: "Congo", value: "CG" }, { text: "Congo, The Democratic Republic of the", value: "CD" }, { text: "Cook Islands", value: "CK" }, { text: "Costa Rica", value: "CR" }, { text: "Cote DIvoire", value: "CI" }, { text: "Croatia", value: "HR" }, { text: "Cuba", value: "CU" }, { text: "Cyprus", value: "CY" }, { text: "Czech Republic", value: "CZ" }, { text: "Denmark", value: "DK" }, { text: "Djibouti", value: "DJ" }, { text: "Dominica", value: "DM" }, { text: "Dominican Republic", value: "DO" }, { text: "Ecuador", value: "EC" }, { text: "Egypt", value: "EG" }, { text: "El Salvador", value: "SV" }, { text: "Equatorial Guinea", value: "GQ" }, { text: "Eritrea", value: "ER" }, { text: "Estonia", value: "EE" }, { text: "Ethiopia", value: "ET" }, { text: "Falkland Islands (Malvinas)", value: "FK" }, { text: "Faroe Islands", value: "FO" }, { text: "Fiji", value: "FJ" }, { text: "Finland", value: "FI" }, { text: "France", value: "FR" }, { text: "French Guiana", value: "GF" }, { text: "French Polynesia", value: "PF" }, { text: "French Southern Territories", value: "TF" }, { text: "Gabon", value: "GA" }, { text: "Gambia", value: "GM" }, { text: "Georgia", value: "GE" }, { text: "Germany", value: "DE" }, { text: "Ghana", value: "GH" }, { text: "Gibraltar", value: "GI" }, { text: "Greece", value: "GR" }, { text: "Greenland", value: "GL" }, { text: "Grenada", value: "GD" }, { text: "Guadeloupe", value: "GP" }, { text: "Guam", value: "GU" }, { text: "Guatemala", value: "GT" }, { text: "Guernsey", value: "GG" }, { text: "Guinea", value: "GN" }, { text: "Guinea-Bissau", value: "GW" }, { text: "Guyana", value: "GY" }, { text: "Haiti", value: "HT" }, { text: "Heard Island and Mcdonald Islands", value: "HM" }, { text: "Holy See (Vatican City State)", value: "VA" }, { text: "Honduras", value: "HN" }, { text: "Hong Kong", value: "HK" }, { text: "Hungary", value: "HU" }, { text: "Iceland", value: "IS" }, { text: "India", value: "IN" }, { text: "Indonesia", value: "ID" }, { text: "Iran, Islamic Republic Of", value: "IR" }, { text: "Iraq", value: "IQ" }, { text: "Ireland", value: "IE" }, { text: "Isle of Man", value: "IM" }, { text: "Israel", value: "IL" }, { text: "Italy", value: "IT" }, { text: "Jamaica", value: "JM" }, { text: "Japan", value: "JP" }, { text: "Jersey", value: "JE" }, { text: "Jordan", value: "JO" }, { text: "Kazakhstan", value: "KZ" }, { text: "Kenya", value: "KE" }, { text: "Kiribati", value: "KI" }, { text: "Korea, Democratic PeopleS Republic of", value: "KP" }, { text: "Korea, Republic of", value: "KR" }, { text: "Kuwait", value: "KW" }, { text: "Kyrgyzstan", value: "KG" }, { text: "Lao PeopleS Democratic Republic", value: "LA" }, { text: "Latvia", value: "LV" }, { text: "Lebanon", value: "LB" }, { text: "Lesotho", value: "LS" }, { text: "Liberia", value: "LR" }, { text: "Libyan Arab Jamahiriya", value: "LY" }, { text: "Liechtenstein", value: "LI" }, { text: "Lithuania", value: "LT" }, { text: "Luxembourg", value: "LU" }, { text: "Macao", value: "MO" }, { text: "Macedonia, The Former Yugoslav Republic of", value: "MK", }, { text: "Madagascar", value: "MG" }, { text: "Malawi", value: "MW" }, { text: "Malaysia", value: "MY" }, { text: "Maldives", value: "MV" }, { text: "Mali", value: "ML" }, { text: "Malta", value: "MT" }, { text: "Marshall Islands", value: "MH" }, { text: "Martinique", value: "MQ" }, { text: "Mauritania", value: "MR" }, { text: "Mauritius", value: "MU" }, { text: "Mayotte", value: "YT" }, { text: "Mexico", value: "MX" }, { text: "Micronesia, Federated States of", value: "FM" }, { text: "Moldova, Republic of", value: "MD" }, { text: "Monaco", value: "MC" }, { text: "Mongolia", value: "MN" }, { text: "Montenegro", value: "ME" }, { text: "Montserrat", value: "MS" }, { text: "Morocco", value: "MA" }, { text: "Mozambique", value: "MZ" }, { text: "Myanmar", value: "MM" }, { text: "Namibia", value: "NA" }, { text: "Nauru", value: "NR" }, { text: "Nepal", value: "NP" }, { text: "Netherlands", value: "NL" }, { text: "Netherlands Antilles", value: "AN" }, { text: "New Caledonia", value: "NC" }, { text: "New Zealand", value: "NZ" }, { text: "Nicaragua", value: "NI" }, { text: "Niger", value: "NE" }, { text: "Nigeria", value: "NG" }, { text: "Niue", value: "NU" }, { text: "Norfolk Island", value: "NF" }, { text: "Northern Mariana Islands", value: "MP" }, { text: "Norway", value: "NO" }, { text: "Oman", value: "OM" }, { text: "Pakistan", value: "PK" }, { text: "Palau", value: "PW" }, { text: "Panama", value: "PA" }, { text: "Papua New Guinea", value: "PG" }, { text: "Paraguay", value: "PY" }, { text: "Peru", value: "PE" }, { text: "Philippines", value: "PH" }, { text: "Pitcairn", value: "PN" }, { text: "Poland", value: "PL" }, { text: "Portugal", value: "PT" }, { text: "Puerto Rico", value: "PR" }, { text: "Qatar", value: "QA" }, { text: "Reunion", value: "RE" }, { text: "Romania", value: "RO" }, { text: "Russian Federation", value: "RU" }, { text: "RWANDA", value: "RW" }, { text: "Saint Helena", value: "SH" }, { text: "Saint Kitts and Nevis", value: "KN" }, { text: "Saint Lucia", value: "LC" }, { text: "Saint Pierre and Miquelon", value: "PM" }, { text: "Saint Vincent and the Grenadines", value: "VC" }, { text: "Samoa", value: "WS" }, { text: "San Marino", value: "SM" }, { text: "Sao Tome and Principe", value: "ST" }, { text: "Saudi Arabia", value: "SA" }, { text: "Senegal", value: "SN" }, { text: "Serbia", value: "RS" }, { text: "Seychelles", value: "SC" }, { text: "Sierra Leone", value: "SL" }, { text: "Singapore", value: "SG" }, { text: "Slovakia", value: "SK" }, { text: "Slovenia", value: "SI" }, { text: "Solomon Islands", value: "SB" }, { text: "Somalia", value: "SO" }, { text: "South Africa", value: "ZA" }, { text: "South Georgia and the South Sandwich Islands", value: "GS", }, { text: "Spain", value: "ES" }, { text: "Sri Lanka", value: "LK" }, { text: "Sudan", value: "SD" }, { text: "Suritext", value: "SR" }, { text: "Svalbard and Jan Mayen", value: "SJ" }, { text: "Swaziland", value: "SZ" }, { text: "Sweden", value: "SE" }, { text: "Switzerland", value: "CH" }, { text: "Syrian Arab Republic", value: "SY" }, { text: "Taiwan, Province of China", value: "TW" }, { text: "Tajikistan", value: "TJ" }, { text: "Tanzania, United Republic of", value: "TZ" }, { text: "Thailand", value: "TH" }, { text: "Timor-Leste", value: "TL" }, { text: "Togo", value: "TG" }, { text: "Tokelau", value: "TK" }, { text: "Tonga", value: "TO" }, { text: "Trinidad and Tobago", value: "TT" }, { text: "Tunisia", value: "TN" }, { text: "Turkey", value: "TR" }, { text: "Turkmenistan", value: "TM" }, { text: "Turks and Caicos Islands", value: "TC" }, { text: "Tuvalu", value: "TV" }, { text: "Uganda", value: "UG" }, { text: "Ukraine", value: "UA" }, { text: "United Arab Emirates", value: "AE" }, { text: "United Kingdom", value: "GB" }, { text: "United States", value: "US" }, { text: "United States Minor Outlying Islands", value: "UM" }, { text: "Uruguay", value: "UY" }, { text: "Uzbekistan", value: "UZ" },