

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 在 AWS Glue Studio 中連線至 Stripe
<a name="connecting-to-data-stripe"></a>

 Stripe 是一個面向企業的線上付款處理和信用卡處理平台。Stripe 平台可讓企業接受線上付款、為電子商務建立訂閱 (經常性計費)，以及設定銀行帳戶以接收付款。Stripe 也支援多方付款，可讓企業設定其市場，並允許收集付款，然後透過「連線」帳戶付款給賣方或服務供應商。

**Topics**
+ [AWS Glue 支援 Stripe](stripe-support.md)
+ [包含用於建立和使用連線的 API 操作的政策](stripe-configuring-iam-permissions.md)
+ [設定 Stripe](stripe-configuring.md)
+ [設定 Stripe 連線](stripe-configuring-connections.md)
+ [從 Stripe 實體中讀取](stripe-reading-from-entities.md)
+ [Stripe 連線選項](stripe-connection-options.md)
+ [限制](stripe-limitations.md)
+ [建立新的 Stripe 帳戶並設定用戶端應用程式](stripe-new-account-creation.md)

# AWS Glue 支援 Stripe
<a name="stripe-support"></a>

AWS Glue 支援 Stripe，如下所示：

**支援作為來源？**  
是。您可以使用 AWS Glue ETL 任務從 Stripe 查詢資料。

**支援作為目標？**  
否。

**支援的 Slack API 版本**  
 v1。

# 包含用於建立和使用連線的 API 操作的政策
<a name="stripe-configuring-iam-permissions"></a>

 下列範例政策描述建立和使用連線所需的 IAM 許可。如果您要建立新角色，請建立包含下列項目的政策：

------
#### [ JSON ]

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "glue:ListConnectionTypes",
        "glue:DescribeConnectionType",
        "glue:RefreshOAuth2Tokens",
        "glue:ListEntities",
        "glue:DescribeEntity"
      ],
      "Resource": "*"
    }
  ]
}
```

------

也可使用下列受管 IAM 政策來允許存取權：
+  [ AWSGlueServiceRole ](https://console.aws.amazon.com/iam/home#policies/arn:aws:iam::aws:policy/service-role/AWSGlueServiceRole) – 准許存取各種 AWS Glue 程序代表您執行所需的資源。這些資源包括 AWS Glue Amazon S3 Amazon CloudWatch Logs、IAM 和 Amazon EC2。如果您遵循此政策中指定資源的命名慣例，則 AWS Glue 程序具有必要的許可。此政策通常會連接至定義編目程式、工作和開發端點時所指定的角色。
+  [ AWSGlueConsoleFullAccess ](https://console.aws.amazon.com/iam/home#policies/arn:aws:iam::aws:policy/AWSGlueConsoleFullAccess) – 當政策連接到的身分使用 AWS 管理主控台時，授予 AWS Glue 資源的完整存取權。如果您依照此政策中指定的資源命名慣例，使用者就能擁有完整的主控台功能。此政策通常連接到 AWS Glue 主控台的使用者。

# 設定 Stripe
<a name="stripe-configuring"></a>

您必須先符合下列要求，才能使用 從 Stripe AWS Glue 傳輸資料：

## 最低需求
<a name="stripe-configuring-min-requirements"></a>
+  必須擁有一個帶有電子郵件和密碼的 Stripe 帳戶。如需詳細資訊，請參閱[建立新的 Stripe 帳戶並設定用戶端應用程式](stripe-new-account-creation.md)。
+  您的 Stripe 帳戶已啟用 API 存取。所有 Stripe API 的使用皆免費。

 如果您符合這些要求，就可以 AWS Glue 連線到您的 Stripe 帳戶。

# 設定 Stripe 連線
<a name="stripe-configuring-connections"></a>

 Stripe 支援自訂身分驗證。如需產生自訂授權所需 API 金鑰的詳細資訊，請參閱 [STRIPE REST API 文件](https://docs.stripe.com/api/authentication)。

若要設定 Stripe 連線：

1.  在 AWS Secrets Manager 中，使用下列詳細資訊建立秘密。必須為 AWS Glue中的每個連線建立機密。

   1.  對於客戶管理的連線應用程式，機密應包含以 `USER_MANAGED_CLIENT_APPLICATION_CLIENT_SECRET` 作為金鑰的連線應用程式消費者機密。

1. 在 AWS Glue Glue Studio 中，依照下列步驟在 **Data Connections** 下建立連線：

   1. 選取**連線類型**時，選取 Stripe。

   1.  選取 AWS Glue 可以擔任並具有下列動作許可的 IAM 角色：

------
#### [ JSON ]

****  

      ```
      {
        "Version":"2012-10-17",		 	 	 
        "Statement": [
          {
            "Effect": "Allow",
            "Action": [
              "secretsmanager:DescribeSecret",
              "secretsmanager:GetSecretValue",
              "secretsmanager:PutSecretValue",
              "ec2:CreateNetworkInterface",
              "ec2:DescribeNetworkInterfaces",
              "ec2:DeleteNetworkInterface"
            ],
            "Resource": "*"
          }
        ]
      }
      ```

------

   1.  選取您要用於此連線`secretName`的 AWS Glue ，以放置字符。

   1.  如果想要使用您的網路，請選取網路選項。

1.  授予與您的 AWS Glue 任務相關聯的 IAM 角色讀取 的許可`secretName`。

# 從 Stripe 實體中讀取
<a name="stripe-reading-from-entities"></a>

 **先決條件** 
+  您要從中讀取的 Stripe 物件。

 **支援的實體** 


| 實體 | 可以篩選 | 支援限制 | 支援排序依據 | 支援選取 \$1 | 支援分區 | 
| --- | --- | --- | --- | --- | --- | 
| 餘額 | 否 | 否 | 否 | 是 | 否 | 
| 餘額交易 | 是 | 是 | 否 | 是 | 是 | 
| 費用 | 是 | 是 | 否 | 是 | 是 | 
| 爭論 | 是 | 是 | 否 | 是 | 是 | 
| 檔案連結 | 是 | 是 | 否 | 是 | 是 | 
| PaymentIntents | 是 | 是 | 否 | 是 | 是 | 
| SetupIntents | 是 | 是 | 否 | 是 | 是 | 
| 支出 | 是 | 是 | 否 | 是 | 是 | 
| 退款 | 是 | 是 | 否 | 是 | 是 | 
| 產品 | 是 | 是 | 否 | 是 | 是 | 
| 價格 | 是 | 是 | 否 | 是 | 是 | 
| 優惠券 | 是 | 是 | 否 | 是 | 是 | 
| 促銷代碼 | 是 | 是 | 否 | 是 | 是 | 
| 稅務代碼 | 否 | 是 | 否 | 是 | 否 | 
| 稅率 | 是 | 是 | 否 | 是 | 是 | 
| 運費 | 是 | 是 | 否 | 是 | 是 | 
| 工作階段 | 是 | 是 | 否 | 是 | 是 | 
| 貸記通知單 | 是 | 是 | 否 | 是 | 是 | 
| 客戶 | 是 | 是 | 否 | 是 | 是 | 
| 發票 | 是 | 是 | 否 | 是 | 是 | 
| 發票項目 | 是 | 是 | 否 | 是 | 否 | 
| 計劃 | 是 | 是 | 否 | 是 | 是 | 
| 報價 | 是 | 是 | 否 | 是 | 否 | 
| Subscriptions | 是 | 是 | 否 | 是 |  | 
| 訂閱項目 | 否 | 是 | 否 | 是 | 否 | 
| 訂閱排程 | 是 | 是 | 否 | 是 | 是 | 
| 帳戶 | 否 | 是 | 否 | 是 | 是 | 
| 應用程式費用 | 是 | 是 | 否 | 是 | 是 | 
| 國家/地區規格 | 否 | 是 | 否 | 是 | 否 | 
| 轉接 | 是 | 是 | 否 | 是 | 是 | 
| 早期詐騙警告 | 是 | 是 | 否 | 是 | 是 | 
| 報告類型 | 否 | 否 | 否 | 是 | 否 | 

 **範例** 

```
stripe_read = glueContext.create_dynamic_frame.from_options(
    connection_type="stripe",
    connection_options={
        "connectionName": "connectionName",
        "ENTITY_NAME": "coupons",
        "API_VERSION": "v1"
    }
)
```

 **Stripe 實體和欄位詳細資訊** 


| 實體 | 欄位 | 資料類型 | 支援的運算子 | 
| --- | --- | --- | --- | 
| 餘額 |  |  |  | 
|  | 有用 | 清單 |  | 
|  | connect\$1reserved | 清單 |  | 
|  | 待定 | 清單 |  | 
|  | livemode | Boolean |  | 
|  | object | String |  | 
|  | instant\$1available | 清單 |  | 
|  | issuing | Struct |  | 
| 餘額交易 |  |  |  | 
|  | id | String |  | 
|  | object | String |  | 
|  | amount | Integer |  | 
|  | available\$1on | DateTime | =, >=, <=,<,> | 
|  | 已建立 | DateTime | =, >=, <=,<,> | 
|  | currency | String |  | 
|  | 描述 | String |  | 
|  | exchange\$1rate | BigDecimal |  | 
|  | fee | Integer |  | 
|  | fee\$1details | 清單 |  | 
|  | net | Integer |  | 
|  | report\$1category | String |  | 
|  | source | String | = | 
|  | status | String |  | 
|  | type | String | = | 
|  | cross\$1border\$1classification | String |  | 
| 費用 |  |  |  | 
|  | id | String |  | 
|  | object | String |  | 
|  | amount | Integer | =, <, > | 
|  | amount\$1captured | Integer |  | 
|  | amount\$1refunded | Integer |  | 
|  | 應用程式 | String |  | 
|  | application\$1fee | String |  | 
|  | application\$1fee\$1amount | Integer |  | 
|  | balance\$1transaction | String |  | 
|  | billing\$1details | Struct |  | 
|  | calculated\$1statement\$1descriptor | String |  | 
|  | captured | Boolean |  | 
|  | 已建立 | DateTime | =, >=, <=,<,> | 
|  | currency | String |  | 
|  | customer | String | = | 
|  | 描述 | String |  | 
|  | 目的地 | String |  | 
|  | dispute | String |  | 
|  | disputed | Boolean | = | 
|  | failure\$1balance\$1transaction | String |  | 
|  | failure\$1code | String |  | 
|  | failure\$1message | String |  | 
|  | fraud\$1details | Struct |  | 
|  | 發票 | String |  | 
|  | livemode | Boolean |  | 
|  | 中繼資料 | Struct |  | 
|  | on\$1behalf\$1of | String |  | 
|  | order | String |  | 
|  | outcome | Struct |  | 
|  | paid | Boolean |  | 
|  | payment\$1intent | String | = | 
|  | payment\$1method | String |  | 
|  | payment\$1method\$1details | Struct |  | 
|  | receipt\$1email | String |  | 
|  | receipt\$1number | String |  | 
|  | receipt\$1url | String |  | 
|  | refunded | Boolean | = | 
|  | refunds | Struct |  | 
|  | review | String |  | 
|  | shipping | Struct |  | 
|  | source | Struct |  | 
|  | source\$1transfer | String |  | 
|  | statement\$1descriptor | String |  | 
|  | statement\$1descriptor\$1suffix | String |  | 
|  | status | String |  | 
|  | 傳輸 | String |  | 
|  | transfer\$1data | Struct |  | 
|  | transfer\$1group | String | = | 
| 爭論 |  |  |  | 
|  | id | String |  | 
|  | object | String |  | 
|  | amount | Integer | =, <, > | 
|  | balance\$1transaction | String |  | 
|  | balance\$1transactions | 清單 |  | 
|  | charge | String | = | 
|  | 已建立 | DateTime | =, >=, <=,<,> | 
|  | currency | String |  | 
|  | evidence | Struct |  | 
|  | evidence\$1details | Struct |  | 
|  | is\$1charge\$1refundable | Boolean |  | 
|  | livemode | Boolean |  | 
|  | 中繼資料 | Struct |  | 
|  | payment\$1intent | String | = | 
|  | reason | String | = | 
|  | status | String |  | 
|  | payment\$1method\$1details | Struct |  | 
| 檔案連結 |  |  |  | 
|  | id | String |  | 
|  | object | String |  | 
|  | 已建立 | DateTime | =, >=, <=,<,> | 
|  | expired | Boolean | = | 
|  | expires\$1at | DateTime |  | 
|  | file | String | = | 
|  | livemode | Boolean |  | 
|  | 中繼資料 | Struct |  | 
|  | url | String |  | 
| PaymentIntents |  |  |  | 
|  | id | String |  | 
|  | object | String |  | 
|  | amount | Integer |  | 
|  | amount\$1capturable | Integer |  | 
|  | amount\$1details | Struct |  | 
|  | amount\$1received | Integer |  | 
|  | 應用程式 | String |  | 
|  | application\$1fee\$1amount | Integer |  | 
|  | auto\$1payment\$1methods | Struct |  | 
|  | canceled\$1at | DateTime |  | 
|  | cancellation\$1reason | String |  | 
|  | capture\$1method | String |  | 
|  | client\$1secret | String |  | 
|  | confirmation\$1method | String |  | 
|  | 已建立 | DateTime | =, >=, <=,<,> | 
|  | currency | String |  | 
|  | customer | String | = | 
|  | 描述 | String |  | 
|  | 發票 | String |  | 
|  | last\$1payment\$1error | Struct |  | 
|  | latest\$1charge | String |  | 
|  | livemode | Boolean |  | 
|  | 中繼資料 | Struct |  | 
|  | next\$1action | Struct |  | 
|  | on\$1behalf\$1of | String |  | 
|  | payment\$1method | String |  | 
|  | payment\$1method\$1options | Struct |  | 
|  | payment\$1method\$1types | 清單 |  | 
|  | payment\$1method\$1configuration\$1details | Struct |  | 
|  | 處理 | Struct |  | 
|  | receipt\$1email | String |  | 
|  | review | String |  | 
|  | setup\$1future\$1usage | String |  | 
|  | shipping | Struct |  | 
|  | source | String |  | 
|  | statement\$1descriptor | String |  | 
|  | statement\$1descriptor\$1suffix | String |  | 
|  | status | String |  | 
|  | transfer\$1data | Struct |  | 
|  | transfer\$1group | String |  | 
| SetupIntents |  |  |  | 
|  | id | String |  | 
|  | object | String |  | 
|  | 應用程式 | String |  | 
|  | cancellation\$1reason | String |  | 
|  | client\$1secret | String |  | 
|  | 已建立 | DateTime | =, >=, <=,<,> | 
|  | customer | String | = | 
|  | 描述 | String |  | 
|  | flow\$1directions | 清單 |  | 
|  | last\$1setup\$1error | Struct |  | 
|  | latest\$1attempt | String |  | 
|  | livemode | Boolean |  | 
|  | mandate | String |  | 
|  | 中繼資料 | Struct |  | 
|  | next\$1action | Struct |  | 
|  | on\$1behalf\$1of | String |  | 
|  | payment\$1method | String |  | 
|  | payment\$1method\$1options | Struct |  | 
|  | payment\$1method\$1types | 清單 |  | 
|  | single\$1use\$1mandate | String |  | 
|  | status | String |  | 
|  | 使用方式 | String |  | 
|  | auto\$1payment\$1methods | Struct |  | 
| 支出 |  |  |  | 
|  | id | String |  | 
|  | object | String |  | 
|  | amount | Integer | =, <, > | 
|  | arrival\$1date | DateTime | =, >=, <=,<,> | 
|  | automatic | Boolean |  | 
|  | balance\$1transaction | String |  | 
|  | 已建立 | DateTime | =, >=, <=,<,> | 
|  | currency | String |  | 
|  | 描述 | String | = | 
|  | 目的地 | String |  | 
|  | failure\$1balance\$1transaction | String |  | 
|  | failure\$1code | String |  | 
|  | failure\$1message | String |  | 
|  | livemode | Boolean |  | 
|  | 中繼資料 | Struct |  | 
|  | 方法 | String |  | 
|  | original\$1payout | String |  | 
|  | reversed\$1by | String |  | 
|  | reconciliation\$1status | String |  | 
|  | source\$1type | String |  | 
|  | statement\$1descriptor | String |  | 
|  | status | String |  | 
|  | type | String |  | 
|  | application\$1fee | String |  | 
|  | application\$1fee\$1amount | Integer |  | 
| 退款 |  |  |  | 
|  | id | String |  | 
|  | object | String |  | 
|  | amount | Integer |  | 
|  | balance\$1transaction | String |  | 
|  | charge | String | = | 
|  | 已建立 | DateTime | =, >=, <=,<,> | 
|  | currency | String |  | 
|  | 中繼資料 | Struct |  | 
|  | destination\$1details | Struct |  | 
|  | payment\$1intent | String | = | 
|  | reason | String |  | 
|  | receipt\$1number | String |  | 
|  | source\$1transfer\$1reversal | String |  | 
|  | status | String |  | 
|  | transfer\$1reversal | String |  | 
| 產品 |  |  |  | 
|  | id | String |  | 
|  | object | String |  | 
|  | active | Boolean | = | 
|  | 屬性 | 清單 |  | 
|  | 已建立 | DateTime | =, >=, <=,<,> | 
|  | default\$1price | String |  | 
|  | 描述 | String |  | 
|  | images | 清單 |  | 
|  | livemode | Boolean |  | 
|  | 中繼資料 | Struct |  | 
|  | name | String |  | 
|  | package\$1dimensions | Struct |  | 
|  | shippable | Boolean |  | 
|  | statement\$1descriptor | String |  | 
|  | tax\$1code | String |  | 
|  | type | String | = | 
|  | unit\$1label | String |  | 
|  | 已更新 | DateTime |  | 
|  | url | String |  | 
|  | 功能 | 清單 |  | 
| 價格 |  |  |  | 
|  | id | String |  | 
|  | object | String |  | 
|  | active | Boolean | = | 
|  | billing\$1scheme | String |  | 
|  | 已建立 | DateTime | =, >=, <=,<,> | 
|  | currency | String | = | 
|  | custom\$1unit\$1amount | Struct |  | 
|  | livemode | Boolean |  | 
|  | lookup\$1key | String |  | 
|  | 中繼資料 | Struct |  | 
|  | nickname | String |  | 
|  | product | String | = | 
|  | recurring | Struct |  | 
|  | tax\$1behavior | String |  | 
|  | tiers\$1mode | String |  | 
|  | transform\$1quantity | Struct |  | 
|  | type | String | = | 
|  | unit\$1amount | Integer |  | 
|  | unit\$1amount\$1decimal | String |  | 
| 優惠券 |  |  |  | 
|  | Id | String |  | 
|  | object | String |  | 
|  | amount\$1off | Integer |  | 
|  | 已建立 | DateTime | =, >=, <=,<,> | 
|  | currency | String | = | 
|  | duration | String | = | 
|  | duration\$1in\$1months | Integer | =,<,> | 
|  | livemode | Boolean |  | 
|  | max\$1redemptions | Integer | =, <, > | 
|  | 中繼資料 | Struct |  | 
|  | name | String |  | 
|  | percent\$1off | Double | = | 
|  | redeem\$1by | DateTime | =, >=, <=, <, > | 
|  | times\$1redeemed | Integer |  | 
|  | 有效 | Boolean |  | 
| 促銷代碼 |  |  |  | 
|  | Id | String |  | 
|  | object | String |  | 
|  | active | Boolean | = | 
|  | code | String | = | 
|  | coupon | Struct |  | 
|  | 已建立 | DateTime | =,>=,<=,<,> | 
|  | customer | String |  | 
|  | expires\$1at | DateTime |  | 
|  | livemode | Boolean |  | 
|  | max\$1redemptions | Integer |  | 
|  | 中繼資料 | Struct |  | 
|  | 限制 | Struct |  | 
|  | times\$1redeemed | Integer |  | 
| 稅務代碼 |  |  |  | 
|  | Id | String |  | 
|  | object | String |  | 
|  | 描述 | String |  | 
|  | name | String |  | 
| 稅率 |  |  |  | 
|  | Id | String |  | 
|  | object | String |  | 
|  | active | Boolean | = | 
|  | 國家/地區 | String |  | 
|  | 已建立 | DateTime | =, >=, <=, <, > | 
|  | 描述 | String |  | 
|  | display\$1name | String |  | 
|  | inclusive | Boolean | = | 
|  | jurisdiction | String |  | 
|  | jurisdiction\$1level | String |  | 
|  | livemode | Boolean |  | 
|  | 中繼資料 | Struct |  | 
|  | 百分比 | Double |  | 
|  | effective\$1percentage | Double |  | 
|  | state | String |  | 
|  | tax\$1type | String |  | 
| 運費 |  |  |  | 
|  | Id | String |  | 
|  | object | String |  | 
|  | active | Boolean | = | 
|  | 已建立 | DateTime | =, >=, <=, <, > | 
|  | delivery\$1estimate | Struct |  | 
|  | display\$1name | String |  | 
|  | fixed\$1amount | Struct |  | 
|  | livemode | Boolean |  | 
|  | 中繼資料 | Struct |  | 
|  | tax\$1behavior | String |  | 
|  | tax\$1code | String |  | 
|  | type | String |  | 
| 工作階段 |  |  |  | 
|  | id | String |  | 
|  | object | String |  | 
|  | after\$1expiration | Struct |  | 
|  | allow\$1promotion\$1codes | Boolean |  | 
|  | amount\$1subtotal | Integer |  | 
|  | amount\$1total | Integer |  | 
|  | auto\$1tax | Struct |  | 
|  | billing\$1address\$1collection | String |  | 
|  | cancel\$1url | String |  | 
|  | client\$1reference\$1id | String |  | 
|  | consent | Struct |  | 
|  | consent\$1collection | Struct |  | 
|  | 已建立 | DateTime | =, >=, <=, <, > | 
|  | currency | String |  | 
|  | custom\$1text | Struct |  | 
|  | customer | String |  | 
|  | customer\$1creation | String |  | 
|  | customer\$1details | Struct |  | 
|  | customer\$1email | String |  | 
|  | expires\$1at | DateTime |  | 
|  | 發票 | String |  | 
|  | invoice\$1creation | Struct |  | 
|  | livemode | Boolean |  | 
|  | locale | String |  | 
|  | 中繼資料 | Struct |  | 
|  | 模式 | String |  | 
|  | payment\$1intent | String | = | 
|  | payment\$1link | String |  | 
|  | payment\$1method\$1collection | String |  | 
|  | payment\$1method\$1options | Struct |  | 
|  | payment\$1method\$1types | 清單 |  | 
|  | payment\$1status | String |  | 
|  | phone\$1number\$1collection | Struct |  | 
|  | recovered\$1from | String |  | 
|  | setup\$1intent | String |  | 
|  | shipping\$1address\$1collection | Struct |  | 
|  | shipping\$1cost | Struct |  | 
|  | shipping\$1details | Struct |  | 
|  | shipping\$1options | 清單 |  | 
|  | status | String |  | 
|  | submit\$1type | String |  | 
|  | 訂閱 | String |  | 
|  | success\$1url | String |  | 
|  | tax\$1id\$1collection | Struct |  | 
|  | total\$1details | Struct |  | 
|  | url | String |  | 
|  | ui\$1mode | String |  | 
| 貸記通知單 |  |  |  | 
|  | id | String |  | 
|  | object | String |  | 
|  | amount | Integer |  | 
|  | 已建立 | DateTime | =, >=, <=, <, > | 
|  | currency | String |  | 
|  | customer | String | = | 
|  | customer\$1balance\$1transaction | String |  | 
|  | discount\$1amount | Integer |  | 
|  | discount\$1amounts | 清單 |  | 
|  | 發票 | String | = | 
|  | lines | Struct |  | 
|  | livemode | Boolean |  | 
|  | memo | String |  | 
|  | 中繼資料 | Struct |  | 
|  | number | String |  | 
|  | out\$1of\$1band\$1amount | Integer |  | 
|  | pdf | String |  | 
|  | reason | String |  | 
|  | refund | String |  | 
|  | status | String |  | 
|  | subtotal | Integer |  | 
|  | subtotal\$1excluding\$1tax | Integer |  | 
|  | tax\$1amounts | 清單 |  | 
|  | total | Integer |  | 
|  | total\$1excluding\$1tax | Integer |  | 
|  | type | String |  | 
|  | voided\$1at | DateTime |  | 
|  | amount\$1shipping | Integer |  | 
|  | effective\$1at | DateTime |  | 
|  | shipping\$1cost | Struct |  | 
| 客戶 |  |  |  | 
|  | id | String |  | 
|  | object | String |  | 
|  | address | Struct |  | 
|  | balance | Integer |  | 
|  | 已建立 | DateTime |  | 
|  | currency | String | =, >=, <=, <, > | 
|  | default\$1source | String |  | 
|  | delinquent | Boolean | = | 
|  | 描述 | String |  | 
|  | discount | Struct |  | 
|  | email | String | = | 
|  | invoice\$1prefix | String |  | 
|  | invoice\$1settings | Struct |  | 
|  | livemode | Boolean |  | 
|  | 中繼資料 | Struct |  | 
|  | name | String |  | 
|  | next\$1invoice\$1sequence | Integer |  | 
|  | phone | String |  | 
|  | preferred\$1locales | 清單 |  | 
|  | shipping | Struct |  | 
|  | tax\$1exempt | String |  | 
|  | test\$1clock | String |  | 
| 發票 |  |  |  | 
|  | id | String |  | 
|  | object | String |  | 
|  | account\$1country | String |  | 
|  | account\$1name | String |  | 
|  | account\$1tax\$1ids | 清單 |  | 
|  | amount\$1due | Integer |  | 
|  | amount\$1paid | Integer |  | 
|  | amount\$1remaining | Integer |  | 
|  | 應用程式 | String |  | 
|  | application\$1fee\$1amount | Integer |  | 
|  | attempt\$1count | Integer |  | 
|  | attempted | Boolean | = | 
|  | auto\$1advance | Boolean | = | 
|  | auto\$1tax | Struct |  | 
|  | billing\$1reason | String |  | 
|  | charge | String |  | 
|  | collection\$1method | String | = | 
|  | 已建立 | DateTime | =, >=, <=, <, > | 
|  | currency | String |  | 
|  | custom\$1fields | 清單 |  | 
|  | customer | String | = | 
|  | customer\$1address | Struct |  | 
|  | customer\$1email | String |  | 
|  | customer\$1name | String |  | 
|  | customer\$1phone | String |  | 
|  | customer\$1shipping | Struct |  | 
|  | customer\$1tax\$1exempt | String |  | 
|  | customer\$1tax\$1ids | 清單 |  | 
|  | default\$1payment\$1method | String |  | 
|  | default\$1source | String |  | 
|  | default\$1tax\$1rates | 清單 |  | 
|  | 描述 | String |  | 
|  | discount | Struct |  | 
|  | discounts | 清單 |  | 
|  | due\$1date | DateTime | =, >=, <=, <, > | 
|  | ending\$1balance | Integer |  | 
|  | footer | String |  | 
|  | from\$1invoice | Struct |  | 
|  | hosted\$1invoice\$1url | String |  | 
|  | invoice\$1pdf | String |  | 
|  | last\$1finalization\$1error | Struct |  | 
|  | latest\$1revision | String |  | 
|  | lines | Struct |  | 
|  | livemode | Boolean |  | 
|  | 中繼資料 | Struct |  | 
|  | next\$1payment\$1attempt | DateTime |  | 
|  | number | String |  | 
|  | on\$1behalf\$1of | String |  | 
|  | paid | Boolean | = | 
|  | paid\$1out\$1of\$1band | Boolean |  | 
|  | payment\$1intent | String |  | 
|  | payment\$1settings | Struct |  | 
|  | period\$1end | DateTime | =, >=, <=, <, > | 
|  | period\$1start | DateTime | =, >=, <=, <, > | 
|  | post\$1payment\$1credit\$1notes\$1amount | Integer |  | 
|  | pre\$1payment\$1credit\$1notes\$1amount | Integer |  | 
|  | quote | String |  | 
|  | receipt\$1number | String |  | 
|  | rendering | Struct |  | 
|  | rendering\$1options | Struct |  | 
|  | start\$1balance | Integer |  | 
|  | statement\$1descriptor | String |  | 
|  | status | String | = | 
|  | status\$1transitions | Struct |  | 
|  | 訂閱 | String |  | 
|  | subscription\$1details | Struct |  | 
|  | subtotal | Integer | =, <, > | 
|  | subtotal\$1excluding\$1tax | Integer |  | 
|  | tax | Integer |  | 
|  | test\$1clock | String |  | 
|  | total | Integer | =, <, > | 
|  | total\$1discount\$1amounts | 清單 |  | 
|  | total\$1excluding\$1tax | Integer |  | 
|  | total\$1tax\$1amounts | 清單 |  | 
|  | transfer\$1data | Struct |  | 
|  | webhooks\$1delivered\$1at | DateTime |  | 
|  | automatically\$1finalizes\$1at | DateTime |  | 
|  | effective\$1at | DateTime |  | 
|  | 發行者 | Struct |  | 
| 發票項目 |  |  |  | 
|  | id | String |  | 
|  | object | String |  | 
|  | amount | Integer | =, <, > | 
|  | currency | String |  | 
|  | customer | String | = | 
|  | date | DateTime |  | 
|  | 描述 | String |  | 
|  | discountable | Boolean |  | 
|  | discounts | 清單 |  | 
|  | 發票 | String | = | 
|  | livemode | Boolean |  | 
|  | 中繼資料 | Struct |  | 
|  | period | Struct |  | 
|  | plan | Struct |  | 
|  | 價格 | Struct |  | 
|  | proration | Boolean | = | 
|  | 數量 | Integer |  | 
|  | 訂閱 | String |  | 
|  | subscription\$1item | String |  | 
|  | tax\$1rates | 清單 |  | 
|  | test\$1clock | String |  | 
|  | unit\$1amount | Integer |  | 
|  | unit\$1amount\$1decimal | String |  | 
| 計劃 |  |  |  | 
|  | id | String |  | 
|  | object | String |  | 
|  | active | Boolean | = | 
|  | aggregate\$1usage | String |  | 
|  | amount | Integer |  | 
|  | amount\$1decimal | String |  | 
|  | billing\$1scheme | String |  | 
|  | 已建立 | DateTime | =, >=, <=, <, > | 
|  | currency | String | = | 
|  | 間隔 | String | = | 
|  | interval\$1count | Integer |  | 
|  | livemode | Boolean |  | 
|  | 中繼資料 | Struct |  | 
|  | nickname | String |  | 
|  | product | String | = | 
|  | tiers\$1mode | String |  | 
|  | transform\$1usage | Struct |  | 
|  | trial\$1period\$1days | Integer | =, <, > | 
|  | usage\$1type | String |  | 
|  | meter | String |  | 
| 報價 |  |  |  | 
|  | id | String |  | 
|  | object | String |  | 
|  | amount\$1subtotal | Integer |  | 
|  | amount\$1total | Integer |  | 
|  | 應用程式 | String |  | 
|  | application\$1fee\$1amount | Integer |  | 
|  | application\$1fee\$1percent | Double |  | 
|  | auto\$1tax | Struct |  | 
|  | collection\$1method | String |  | 
|  | computed | Struct |  | 
|  | 已建立 | DateTime |  | 
|  | currency | String |  | 
|  | customer | String | = | 
|  | default\$1tax\$1rates | 清單 |  | 
|  | 描述 | String |  | 
|  | discounts | 清單 |  | 
|  | expires\$1at | DateTime |  | 
|  | footer | String |  | 
|  | from\$1quote | Struct |  | 
|  | header | String |  | 
|  | 發票 | String |  | 
|  | invoice\$1settings | Struct |  | 
|  | livemode | Boolean |  | 
|  | 中繼資料 | Struct |  | 
|  | number | String |  | 
|  | on\$1behalf\$1of | String |  | 
|  | status | String | = | 
|  | status\$1transitions | Struct |  | 
|  | 訂閱 | String |  | 
|  | subscription\$1data | Struct |  | 
|  | subscription\$1schedule | String |  | 
|  | test\$1clock | String |  | 
|  | total\$1details | Struct |  | 
|  | transfer\$1data | Struct |  | 
| Subscriptions |  |  |  | 
|  | id | String |  | 
|  | object | String |  | 
|  | 應用程式 | String |  | 
|  | application\$1fee\$1percent | Double |  | 
|  | auto\$1tax | Struct |  | 
|  | billing\$1cycle\$1anchor | DateTime |  | 
|  | billing\$1thresholds | Struct |  | 
|  | cancel\$1at | DateTime |  | 
|  | cancel\$1at\$1period\$1end | Boolean |  | 
|  | canceled\$1at | DateTime |  | 
|  | collection\$1method | String | = | 
|  | 已建立 | DateTime | =, >=, <=,<,> | 
|  | currency | String |  | 
|  | current\$1period\$1end | DateTime | =, >=, <= | 
|  | current\$1period\$1start | DateTime | =, >=, <= | 
|  | customer | String | = | 
|  | days\$1until\$1due | Integer |  | 
|  | default\$1payment\$1method | String |  | 
|  | default\$1source | String |  | 
|  | default\$1tax\$1rates | 清單 |  | 
|  | 描述 | String |  | 
|  | discount | Struct |  | 
|  | ended\$1at | DateTime |  | 
|  | items | Struct |  | 
|  | latest\$1invoice | String |  | 
|  | livemode | Boolean |  | 
|  | 中繼資料 | Struct |  | 
|  | next\$1pending\$1invoice\$1item\$1invoice | DateTime |  | 
|  | pause\$1collection | Struct |  | 
|  | payment\$1settings | Struct |  | 
|  | pending\$1invoice\$1item\$1interval | Struct |  | 
|  | pending\$1setup\$1intent | String |  | 
|  | pending\$1update | Struct |  | 
|  | plan | Struct |  | 
|  | 數量 | Integer |  | 
|  | schedule | String |  | 
|  | start\$1date | DateTime |  | 
|  | status | String | = | 
|  | test\$1clock | String |  | 
|  | transfer\$1data | Struct |  | 
|  | trial\$1end | DateTime |  | 
|  | trial\$1start | DateTime |  | 
| 訂閱項目 |  |  |  | 
|  | Id | String |  | 
|  | object | String |  | 
|  | billing\$1thresholds | Struct |  | 
|  | 已建立 | DateTime | =, >=, <=, <, > | 
|  | 中繼資料 | Struct |  | 
|  | plan | Struct |  | 
|  | 價格 | Struct |  | 
|  | 訂閱 | String |  | 
|  | tax\$1rates | 清單 |  | 
|  | discounts | 清單 |  | 
| 訂閱排程 |  |  |  | 
|  | object | String |  | 
|  | 應用程式 | String |  | 
|  | canceled\$1at | DateTime |  | 
|  | completed\$1at | DateTime |  | 
|  | 已建立 | DateTime |  | 
|  | current\$1phase | Struct |  | 
|  | customer | String | = | 
|  | default\$1settings | Struct |  | 
|  | end\$1behavior | String |  | 
|  | livemode | Boolean |  | 
|  | 中繼資料 | Struct |  | 
|  | 階段 | 清單 |  | 
|  | released\$1at | DateTime |  | 
|  | released\$1subscription | String |  | 
|  | renewal\$1interval | String |  | 
|  | status | String |  | 
|  | 訂閱 | String |  | 
|  | test\$1clock | String |  | 
| 帳戶 |  |  |  | 
|  | details\$1submitted | Boolean |  | 
|  | tos\$1acceptance | Struct |  | 
|  | type | String |  | 
|  | 中繼資料 | Struct |  | 
|  | id | String |  | 
|  | object | String |  | 
|  | default\$1currency | String |  | 
|  | capabilities | Struct |  | 
|  | charges\$1enabled | Boolean |  | 
|  | 設定 | Struct |  | 
|  | requirements | Struct |  | 
|  | payouts\$1enabled | Boolean |  | 
|  | future\$1requirements | Struct |  | 
|  | external\$1accounts | Struct |  | 
|  | 控制器 | Struct |  | 
|  | 國家/地區 | String |  | 
|  | email | String |  | 
|  | 已建立 | DateTime | =, >=, <=, <, > | 
|  | business\$1profile | Struct |  | 
|  | business\$1type | String |  | 
|  | company | Struct |  | 
| 應用程式費用 |  |  |  | 
|  | id | String |  | 
|  | object | String |  | 
|  | 帳戶 | String |  | 
|  | amount | Integer | =, <, > | 
|  | amount\$1refunded | Integer | =, <, > | 
|  | 應用程式 | String |  | 
|  | balance\$1transaction | String |  | 
|  | charge | String | = | 
|  | 已建立 | DateTime |  | 
|  | currency | String |  | 
|  | livemode | Boolean |  | 
|  | originating\$1transaction | String |  | 
|  | refunded | Boolean | = | 
|  | refunds | Struct |  | 
|  | fee\$1source | Struct |  | 
| 國家/地區規格 |  |  |  | 
|  | id | String |  | 
|  | object | String |  | 
|  | default\$1currency | String |  | 
|  | supported\$1bank\$1account\$1currencies | Struct |  | 
|  | supported\$1payment\$1currencies | 清單 |  | 
|  | supported\$1payment\$1methods | 清單 |  | 
|  | supported\$1transfer\$1countries | 清單 |  | 
|  | verification\$1fields | Struct |  | 
| 轉接 |  |  |  | 
|  | id | String |  | 
|  | object | String |  | 
|  | amount | Integer | =, <, > | 
|  | amount\$1reversed | Integer |  | 
|  | balance\$1transaction | String |  | 
|  | 已建立 | DateTime | =, >=, <=, <, > | 
|  | currency | String | = | 
|  | 描述 | String |  | 
|  | 目的地 | String | = | 
|  | destination\$1payment | String |  | 
|  | livemode | Boolean |  | 
|  | 中繼資料 | Struct |  | 
|  | reversals | Struct |  | 
|  | reversed | Boolean |  | 
|  | source\$1transaction | String |  | 
|  | source\$1type | String |  | 
|  | transfer\$1group | String | = | 
| 早期詐騙警告 |  |  |  | 
|  | id | String |  | 
|  | object | String |  | 
|  | actionable | Boolean |  | 
|  | charge | String | = | 
|  | 已建立 | DateTime | =, >=, <=, <, > | 
|  | fraud\$1type | String |  | 
|  | livemode | Boolean |  | 
|  | payment\$1intent | String | = | 
| 報告類型 |  |  |  | 
|  | id | String |  | 
|  | object | String |  | 
|  | data\$1available\$1end | DateTime |  | 
|  | data\$1available\$1start | DateTime |  | 
|  | default\$1columns | 清單 |  | 
|  | livemode | Boolean |  | 
|  | name | String |  | 
|  | 已更新 | DateTime |  | 
|  | version | Integer |  | 

 **分區查詢** 

 如果想要在 Spark 中使用並行，可以提供其他 Spark 選項 `PARTITION_FIELD`、`LOWER_BOUND`、`UPPER_BOUND`、`NUM_PARTITIONS`。使用這些參數，原始查詢會分區為可由 Spark 任務並行執行的子查詢的 `NUM_PARTITIONS` 數目。
+  `PARTITION_FIELD`：用來分區查詢的欄位名稱。
+  `LOWER_BOUND`：所選分區欄位的包含下限值。

   對於日期，我們接受 Spark SQL 查詢中使用的 Spark 日期格式。有效值範例：`"2024-07-01T00:00:00.000Z"`。
+  `UPPER_BOUND`：所選分區欄位的唯一上限值。
+  `NUM_PARTITIONS`：分區數目。

 實體分區欄位支援詳細資訊如下表所示。


| 實體名稱 | 分區欄位 | 資料類型 | 
| --- | --- | --- | 
| 餘額交易 | 已建立 | DateTime | 
| 費用 | 已建立 | DateTime | 
| 爭論 | 已建立 | DateTime | 
| 檔案連結 | 已建立 | DateTime | 
| PaymentIntents | 已建立 | DateTime | 
| SetupIntents | 已建立 | DateTime | 
| 支出 | 已建立 | DateTime | 
| 退款 | 已建立 | DateTime | 
| 產品 | 已建立 | DateTime | 
| 價格 | 已建立 | DateTime | 
| 優惠券 | 已建立 | DateTime | 
| 促銷代碼 | 已建立 | DateTime | 
| 稅率 | 已建立 | DateTime | 
| 運費 | 已建立 | DateTime | 
| 工作階段 | 已建立 | DateTime | 
| 貸記通知單 | 已建立 | DateTime | 
| 客戶 | 已建立 | DateTime | 
| 發票 | 已建立 | DateTime | 
| 計劃 | 已建立 | DateTime | 
| Subscriptions | 已建立 | DateTime | 
| 訂閱排程 | 已建立 | DateTime | 
| 帳戶 | 已建立 | DateTime | 
| 應用程式費用 | 已建立 | DateTime | 
| 轉接 | 已建立 | DateTime | 
| 早期詐騙警告 | 已建立 | DateTime | 

 **範例** 

```
stripe_read = glueContext.create_dynamic_frame.from_options(
    connection_type="stripe",
    connection_options={
        "connectionName": "connectionName",
        "ENTITY_NAME": "coupons",
        "API_VERSION": "v1",
        "PARTITION_FIELD": "created"
        "LOWER_BOUND": "2024-05-01T20:55:02.000Z"
        "UPPER_BOUND": "2024-07-11T20:55:02.000Z"
        "NUM_PARTITIONS": "10"
    }
)
```

# Stripe 連線選項
<a name="stripe-connection-options"></a>

以下是 Stripe 的連線選項：
+  `ENTITY_NAME`(String) - (必要) 用於讀取/寫入。Stripe 中的物件名稱。
+  `API_VERSION`(String) - (必要) 用於讀取/寫入。您想要使用的 Stripe Rest API 版本。範例：v1。
+  `SELECTED_FIELDS`(List<String>) - 預設：empty(SELECT \$1)。用於讀取。您要為物件選取的資料欄。
+  `FILTER_PREDICATE`(String) - 預設：空白。用於讀取。其應該為 Spark SQL 格式。
+  `QUERY`(String) - 預設：空白。用於讀取。完整的 Spark SQL 查詢。
+  `PARTITION_FIELD`(String) - 用於讀取。用於分區查詢的欄位。
+  `LOWER_BOUND`(String) - 用於讀取。所選分區欄位的包含下限值。
+  `UPPER_BOUND`(String) - 用於讀取。所選分區欄位的唯一上限值。
+  `NUM_PARTITIONS`(Integer) - 預設：1。用於讀取。要讀取的分區數目。

# 限制
<a name="stripe-limitations"></a>

以下是 Stripe 連接器的限制：
+  連接器僅支援欄位型分區。
+  連接器不支援記錄型分區，沒有擷取記錄總數的佈建。
+  主索引鍵資料類型為字串，因此連接器不支援基於 ID 的分區。

# 建立新的 Stripe 帳戶並設定用戶端應用程式
<a name="stripe-new-account-creation"></a>

**建立 Stripe 帳戶**

1. 選擇連結 **https://dashboard.stripe.com/register**。

1. 輸入電子郵件、全名、密碼，然後選擇**建立帳戶**。

1. 使用帳戶登入後，請選擇**開啟 Gmail** 來驗證帳戶。

1. 按一下電子郵件中收到的驗證連結來驗證帳戶。

1. 按一下驗證電子郵件地址後，其會重新導向至另一個頁面

1. 按一下**啟用付款**以啟用帳戶後，其會重新導向至「啟用付款」頁面 (**https://dashboard.stripe.com/welcome**)，並確保填寫全部有效的詳細資訊，然後選擇**繼續**按鈕。



**建立 Slack 開發人員應用程式**

1. 登入 [Stripe](https://dashboard.stripe.com/login)。

1. 選擇如下圖頂端顯示的**開發人員**。

1. 在「開發人員」下選擇 **API 金鑰**。

1. 選擇**顯示測試金鑰**以取得 API 金鑰。