---
http_interactions:
- request:
    method: post
    uri: https://api.stripe.com/v1/payment_methods
    body:
      encoding: UTF-8
      string: type=card&card[number]=4242424242424242&card[exp_month]=12&card[exp_year]=2025&card[cvc]=314
    headers:
      User-Agent:
      - Stripe/v1 RubyBindings/11.1.0
      Authorization:
      - "<HIDDEN-AUTHORIZATION-HEADER>"
      Content-Type:
      - application/x-www-form-urlencoded
      X-Stripe-Client-Telemetry:
      - '{"last_request_metrics":{"request_id":"req_z85eXoVPKfYehv","request_duration_ms":454}}'
      Stripe-Version:
      - '2024-04-10'
      X-Stripe-Client-User-Agent:
      - "<HIDDEN-STRIPE-USER-AGENT>"
      Accept-Encoding:
      - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
      Accept:
      - "*/*"
  response:
    status:
      code: 200
      message: OK
    headers:
      Server:
      - nginx
      Date:
      - Wed, 17 Apr 2024 22:40:11 GMT
      Content-Type:
      - application/json
      Content-Length:
      - '996'
      Connection:
      - keep-alive
      Access-Control-Allow-Credentials:
      - 'true'
      Access-Control-Allow-Methods:
      - GET,HEAD,PUT,PATCH,POST,DELETE
      Access-Control-Allow-Origin:
      - "*"
      Access-Control-Expose-Headers:
      - Request-Id, Stripe-Manage-Version, Stripe-Should-Retry, X-Stripe-External-Auth-Required,
        X-Stripe-Privileged-Session-Required
      Access-Control-Max-Age:
      - '300'
      Cache-Control:
      - no-cache, no-store
      Content-Security-Policy:
      - report-uri https://q.stripe.com/csp-report?p=v1%2Fpayment_methods; block-all-mixed-content;
        default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none';
        img-src 'self'; script-src 'self' 'report-sample'; style-src 'self'
      Cross-Origin-Opener-Policy-Report-Only:
      - same-origin; report-to="coop"
      Idempotency-Key:
      - 5eb33193-9d49-4406-aaa0-e62804b00099
      Original-Request:
      - req_AezHDQR6swerUC
      Report-To:
      - '{"group":"coop","max_age":8640,"endpoints":[{"url":"https://q.stripe.com/coop-report"}],"include_subdomains":true}'
      Reporting-Endpoints:
      - coop="https://q.stripe.com/coop-report"
      Request-Id:
      - req_AezHDQR6swerUC
      Stripe-Should-Retry:
      - 'false'
      Stripe-Version:
      - '2024-04-10'
      Vary:
      - Origin
      X-Stripe-Routing-Context-Priority-Tier:
      - api-testmode
      Strict-Transport-Security:
      - max-age=63072000; includeSubDomains; preload
    body:
      encoding: UTF-8
      string: |-
        {
          "id": "pm_1P6h9DKuuB1fWySnlqKvKCqJ",
          "object": "payment_method",
          "allow_redisplay": "unspecified",
          "billing_details": {
            "address": {
              "city": null,
              "country": null,
              "line1": null,
              "line2": null,
              "postal_code": null,
              "state": null
            },
            "email": null,
            "name": null,
            "phone": null
          },
          "card": {
            "brand": "visa",
            "checks": {
              "address_line1_check": null,
              "address_postal_code_check": null,
              "cvc_check": "unchecked"
            },
            "country": "US",
            "display_brand": "visa",
            "exp_month": 12,
            "exp_year": 2025,
            "fingerprint": "6E6tgVjx6U65iHFV",
            "funding": "credit",
            "generated_from": null,
            "last4": "4242",
            "networks": {
              "available": [
                "visa"
              ],
              "preferred": null
            },
            "three_d_secure_usage": {
              "supported": true
            },
            "wallet": null
          },
          "created": 1713393611,
          "customer": null,
          "livemode": false,
          "metadata": {},
          "type": "card"
        }
  recorded_at: Wed, 17 Apr 2024 22:40:11 GMT
- request:
    method: post
    uri: https://api.stripe.com/v1/customers
    body:
      encoding: UTF-8
      string: name=Apple+Customer&email=applecustomer%40example.com
    headers:
      User-Agent:
      - Stripe/v1 RubyBindings/11.1.0
      Authorization:
      - "<HIDDEN-AUTHORIZATION-HEADER>"
      Content-Type:
      - application/x-www-form-urlencoded
      X-Stripe-Client-Telemetry:
      - '{"last_request_metrics":{"request_id":"req_AezHDQR6swerUC","request_duration_ms":512}}'
      Stripe-Version:
      - '2024-04-10'
      X-Stripe-Client-User-Agent:
      - "<HIDDEN-STRIPE-USER-AGENT>"
      Accept-Encoding:
      - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
      Accept:
      - "*/*"
  response:
    status:
      code: 200
      message: OK
    headers:
      Server:
      - nginx
      Date:
      - Wed, 17 Apr 2024 22:40:12 GMT
      Content-Type:
      - application/json
      Content-Length:
      - '649'
      Connection:
      - keep-alive
      Access-Control-Allow-Credentials:
      - 'true'
      Access-Control-Allow-Methods:
      - GET,HEAD,PUT,PATCH,POST,DELETE
      Access-Control-Allow-Origin:
      - "*"
      Access-Control-Expose-Headers:
      - Request-Id, Stripe-Manage-Version, Stripe-Should-Retry, X-Stripe-External-Auth-Required,
        X-Stripe-Privileged-Session-Required
      Access-Control-Max-Age:
      - '300'
      Cache-Control:
      - no-cache, no-store
      Content-Security-Policy:
      - report-uri https://q.stripe.com/csp-report?p=v1%2Fcustomers; block-all-mixed-content;
        default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none';
        img-src 'self'; script-src 'self' 'report-sample'; style-src 'self'
      Cross-Origin-Opener-Policy-Report-Only:
      - same-origin; report-to="coop"
      Idempotency-Key:
      - dc780644-1c06-4a19-91b2-2cd1d84b51a8
      Original-Request:
      - req_vxSKfzkLvLJxGe
      Report-To:
      - '{"group":"coop","max_age":8640,"endpoints":[{"url":"https://q.stripe.com/coop-report"}],"include_subdomains":true}'
      Reporting-Endpoints:
      - coop="https://q.stripe.com/coop-report"
      Request-Id:
      - req_vxSKfzkLvLJxGe
      Stripe-Should-Retry:
      - 'false'
      Stripe-Version:
      - '2024-04-10'
      Vary:
      - Origin
      X-Stripe-Routing-Context-Priority-Tier:
      - api-testmode
      Strict-Transport-Security:
      - max-age=63072000; includeSubDomains; preload
    body:
      encoding: UTF-8
      string: |-
        {
          "id": "cus_PwaJjS6XT3TQ5f",
          "object": "customer",
          "address": null,
          "balance": 0,
          "created": 1713393612,
          "currency": null,
          "default_source": null,
          "delinquent": false,
          "description": null,
          "discount": null,
          "email": "applecustomer@example.com",
          "invoice_prefix": "19C2805E",
          "invoice_settings": {
            "custom_fields": null,
            "default_payment_method": null,
            "footer": null,
            "rendering_options": null
          },
          "livemode": false,
          "metadata": {},
          "name": "Apple Customer",
          "next_invoice_sequence": 1,
          "phone": null,
          "preferred_locales": [],
          "shipping": null,
          "tax_exempt": "none",
          "test_clock": null
        }
  recorded_at: Wed, 17 Apr 2024 22:40:12 GMT
- request:
    method: post
    uri: https://api.stripe.com/v1/payment_methods/pm_1P6h9DKuuB1fWySnlqKvKCqJ/attach
    body:
      encoding: UTF-8
      string: customer=cus_PwaJjS6XT3TQ5f
    headers:
      User-Agent:
      - Stripe/v1 RubyBindings/11.1.0
      Authorization:
      - "<HIDDEN-AUTHORIZATION-HEADER>"
      Content-Type:
      - application/x-www-form-urlencoded
      X-Stripe-Client-Telemetry:
      - '{"last_request_metrics":{"request_id":"req_vxSKfzkLvLJxGe","request_duration_ms":511}}'
      Stripe-Version:
      - '2024-04-10'
      X-Stripe-Client-User-Agent:
      - "<HIDDEN-STRIPE-USER-AGENT>"
      Accept-Encoding:
      - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
      Accept:
      - "*/*"
  response:
    status:
      code: 200
      message: OK
    headers:
      Server:
      - nginx
      Date:
      - Wed, 17 Apr 2024 22:40:13 GMT
      Content-Type:
      - application/json
      Content-Length:
      - '1007'
      Connection:
      - keep-alive
      Access-Control-Allow-Credentials:
      - 'true'
      Access-Control-Allow-Methods:
      - GET,HEAD,PUT,PATCH,POST,DELETE
      Access-Control-Allow-Origin:
      - "*"
      Access-Control-Expose-Headers:
      - Request-Id, Stripe-Manage-Version, Stripe-Should-Retry, X-Stripe-External-Auth-Required,
        X-Stripe-Privileged-Session-Required
      Access-Control-Max-Age:
      - '300'
      Cache-Control:
      - no-cache, no-store
      Content-Security-Policy:
      - report-uri https://q.stripe.com/csp-report?p=v1%2Fpayment_methods%2F%3Apayment_method%2Fattach;
        block-all-mixed-content; default-src 'none'; base-uri 'none'; form-action
        'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample';
        style-src 'self'
      Cross-Origin-Opener-Policy-Report-Only:
      - same-origin; report-to="coop"
      Idempotency-Key:
      - 1af4a374-7d69-4a9c-aa74-7349f7f6c74d
      Original-Request:
      - req_XG8res7ijCpIgW
      Report-To:
      - '{"group":"coop","max_age":8640,"endpoints":[{"url":"https://q.stripe.com/coop-report"}],"include_subdomains":true}'
      Reporting-Endpoints:
      - coop="https://q.stripe.com/coop-report"
      Request-Id:
      - req_XG8res7ijCpIgW
      Stripe-Should-Retry:
      - 'false'
      Stripe-Version:
      - '2024-04-10'
      Vary:
      - Origin
      X-Stripe-Routing-Context-Priority-Tier:
      - api-testmode
      Strict-Transport-Security:
      - max-age=63072000; includeSubDomains; preload
    body:
      encoding: UTF-8
      string: |-
        {
          "id": "pm_1P6h9DKuuB1fWySnlqKvKCqJ",
          "object": "payment_method",
          "allow_redisplay": "unspecified",
          "billing_details": {
            "address": {
              "city": null,
              "country": null,
              "line1": null,
              "line2": null,
              "postal_code": null,
              "state": null
            },
            "email": null,
            "name": null,
            "phone": null
          },
          "card": {
            "brand": "visa",
            "checks": {
              "address_line1_check": null,
              "address_postal_code_check": null,
              "cvc_check": "pass"
            },
            "country": "US",
            "display_brand": "visa",
            "exp_month": 12,
            "exp_year": 2025,
            "fingerprint": "6E6tgVjx6U65iHFV",
            "funding": "credit",
            "generated_from": null,
            "last4": "4242",
            "networks": {
              "available": [
                "visa"
              ],
              "preferred": null
            },
            "three_d_secure_usage": {
              "supported": true
            },
            "wallet": null
          },
          "created": 1713393611,
          "customer": "cus_PwaJjS6XT3TQ5f",
          "livemode": false,
          "metadata": {},
          "type": "card"
        }
  recorded_at: Wed, 17 Apr 2024 22:40:13 GMT
- request:
    method: post
    uri: https://api.stripe.com/v1/customers
    body:
      encoding: UTF-8
      string: expand[0]=sources&email=leia%40lindgrenwolf.biz
    headers:
      Content-Type:
      - application/x-www-form-urlencoded
      Authorization:
      - "<HIDDEN-AUTHORIZATION-HEADER>"
      User-Agent:
      - Stripe/v1 ActiveMerchantBindings/1.133.0
      Stripe-Version:
      - '2020-08-27'
      X-Stripe-Client-User-Agent:
      - "<HIDDEN-STRIPE-USER-AGENT>"
      X-Stripe-Client-User-Metadata:
      - '{"ip":null}'
      Connection:
      - close
      Accept-Encoding:
      - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
      Accept:
      - "*/*"
  response:
    status:
      code: 200
      message: OK
    headers:
      Server:
      - nginx
      Date:
      - Wed, 17 Apr 2024 22:40:14 GMT
      Content-Type:
      - application/json
      Content-Length:
      - '818'
      Connection:
      - close
      Access-Control-Allow-Credentials:
      - 'true'
      Access-Control-Allow-Methods:
      - GET,HEAD,PUT,PATCH,POST,DELETE
      Access-Control-Allow-Origin:
      - "*"
      Access-Control-Expose-Headers:
      - Request-Id, Stripe-Manage-Version, Stripe-Should-Retry, X-Stripe-External-Auth-Required,
        X-Stripe-Privileged-Session-Required
      Access-Control-Max-Age:
      - '300'
      Cache-Control:
      - no-cache, no-store
      Content-Security-Policy:
      - report-uri https://q.stripe.com/csp-report?p=v1%2Fcustomers; block-all-mixed-content;
        default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none';
        img-src 'self'; script-src 'self' 'report-sample'; style-src 'self'
      Cross-Origin-Opener-Policy-Report-Only:
      - same-origin; report-to="coop"
      Idempotency-Key:
      - 799dd531-ec2d-4e1d-9d1c-f23c6cec1bb7
      Original-Request:
      - req_J9xl2e10YfvJQZ
      Report-To:
      - '{"group":"coop","max_age":8640,"endpoints":[{"url":"https://q.stripe.com/coop-report"}],"include_subdomains":true}'
      Reporting-Endpoints:
      - coop="https://q.stripe.com/coop-report"
      Request-Id:
      - req_J9xl2e10YfvJQZ
      Stripe-Should-Retry:
      - 'false'
      Stripe-Version:
      - '2020-08-27'
      Vary:
      - Origin
      X-Stripe-Routing-Context-Priority-Tier:
      - api-testmode
      Strict-Transport-Security:
      - max-age=63072000; includeSubDomains; preload
    body:
      encoding: UTF-8
      string: |-
        {
          "id": "cus_PwaJXiDsdJ2WVw",
          "object": "customer",
          "address": null,
          "balance": 0,
          "created": 1713393613,
          "currency": null,
          "default_currency": null,
          "default_source": null,
          "delinquent": false,
          "description": null,
          "discount": null,
          "email": "leia@lindgrenwolf.biz",
          "invoice_prefix": "11F84DD5",
          "invoice_settings": {
            "custom_fields": null,
            "default_payment_method": null,
            "footer": null,
            "rendering_options": null
          },
          "livemode": false,
          "metadata": {},
          "name": null,
          "next_invoice_sequence": 1,
          "phone": null,
          "preferred_locales": [],
          "shipping": null,
          "sources": {
            "object": "list",
            "data": [],
            "has_more": false,
            "total_count": 0,
            "url": "/v1/customers/cus_PwaJXiDsdJ2WVw/sources"
          },
          "tax_exempt": "none",
          "test_clock": null
        }
  recorded_at: Wed, 17 Apr 2024 22:40:14 GMT
- request:
    method: post
    uri: https://api.stripe.com/v1/payment_methods/pm_1P6h9DKuuB1fWySnlqKvKCqJ/attach
    body:
      encoding: UTF-8
      string: customer=cus_PwaJXiDsdJ2WVw
    headers:
      Content-Type:
      - application/x-www-form-urlencoded
      Authorization:
      - "<HIDDEN-AUTHORIZATION-HEADER>"
      User-Agent:
      - Stripe/v1 ActiveMerchantBindings/1.133.0
      Stripe-Version:
      - '2020-08-27'
      X-Stripe-Client-User-Agent:
      - "<HIDDEN-STRIPE-USER-AGENT>"
      X-Stripe-Client-User-Metadata:
      - '{"ip":null}'
      Connection:
      - close
      Accept-Encoding:
      - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
      Accept:
      - "*/*"
  response:
    status:
      code: 400
      message: Bad Request
    headers:
      Server:
      - nginx
      Date:
      - Wed, 17 Apr 2024 22:40:14 GMT
      Content-Type:
      - application/json
      Content-Length:
      - '245'
      Connection:
      - close
      Access-Control-Allow-Credentials:
      - 'true'
      Access-Control-Allow-Methods:
      - GET,HEAD,PUT,PATCH,POST,DELETE
      Access-Control-Allow-Origin:
      - "*"
      Access-Control-Expose-Headers:
      - Request-Id, Stripe-Manage-Version, Stripe-Should-Retry, X-Stripe-External-Auth-Required,
        X-Stripe-Privileged-Session-Required
      Access-Control-Max-Age:
      - '300'
      Cache-Control:
      - no-cache, no-store
      Content-Security-Policy:
      - report-uri https://q.stripe.com/csp-report?p=v1%2Fpayment_methods%2F%3Apayment_method%2Fattach;
        block-all-mixed-content; default-src 'none'; base-uri 'none'; form-action
        'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample';
        style-src 'self'
      Cross-Origin-Opener-Policy-Report-Only:
      - same-origin; report-to="coop"
      Idempotency-Key:
      - 4fc2fa0b-44af-4807-ac6a-9695ce2e80db
      Original-Request:
      - req_KR00YULmT3JDWA
      Report-To:
      - '{"group":"coop","max_age":8640,"endpoints":[{"url":"https://q.stripe.com/coop-report"}],"include_subdomains":true}'
      Reporting-Endpoints:
      - coop="https://q.stripe.com/coop-report"
      Request-Id:
      - req_KR00YULmT3JDWA
      Stripe-Should-Retry:
      - 'false'
      Stripe-Version:
      - '2020-08-27'
      Vary:
      - Origin
      X-Stripe-Routing-Context-Priority-Tier:
      - api-testmode
      Strict-Transport-Security:
      - max-age=63072000; includeSubDomains; preload
    body:
      encoding: UTF-8
      string: |
        {
          "error": {
            "message": "The payment method you provided has already been attached to a customer.",
            "request_log_url": "https://dashboard.stripe.com/test/logs/req_KR00YULmT3JDWA?t=1713393614",
            "type": "invalid_request_error"
          }
        }
  recorded_at: Wed, 17 Apr 2024 22:40:14 GMT
recorded_with: VCR 6.2.0
