From ee1f60808e084571cd840c86b5b78a279671afc4 Mon Sep 17 00:00:00 2001
From: Mohamed ABDELLANI
Date: Thu, 29 Feb 2024 18:32:18 +0100
Subject: [PATCH 001/319] prevent generating invoices when order's distributor
can't generate invoices
---
.../spree/admin/invoices_controller.rb | 10 ++++++++--
.../spree/admin/orders/invoices_spec.rb | 20 +++++++++++++++++++
2 files changed, 28 insertions(+), 2 deletions(-)
diff --git a/app/controllers/spree/admin/invoices_controller.rb b/app/controllers/spree/admin/invoices_controller.rb
index 81f79a299e..e0c01c7bee 100644
--- a/app/controllers/spree/admin/invoices_controller.rb
+++ b/app/controllers/spree/admin/invoices_controller.rb
@@ -19,8 +19,14 @@ module Spree
def generate
@order = Order.find_by(number: params[:order_id])
- authorize! :invoice, @order
- OrderInvoiceGenerator.new(@order).generate_or_update_latest_invoice
+ if @order.distributor.can_invoice?
+ authorize! :invoice, @order
+ OrderInvoiceGenerator.new(@order).generate_or_update_latest_invoice
+ else
+ flash[:error] = t(:must_have_valid_business_number,
+ enterprise_name: @order.distributor.name)
+ end
+
redirect_back(fallback_location: spree.admin_dashboard_path)
end
diff --git a/spec/controllers/spree/admin/orders/invoices_spec.rb b/spec/controllers/spree/admin/orders/invoices_spec.rb
index 88cfdfc39e..1fcfa606ce 100644
--- a/spec/controllers/spree/admin/orders/invoices_spec.rb
+++ b/spec/controllers/spree/admin/orders/invoices_spec.rb
@@ -158,6 +158,10 @@ describe Spree::Admin::InvoicesController, type: :controller do
let(:distributor) { order.distributor }
let(:params) { { order_id: order.number } }
+ before do
+ distributor.update_attribute(:abn, "123412341234")
+ end
+
context "as a normal user" do
before { allow(controller).to receive(:spree_current_user) { user } }
@@ -193,6 +197,22 @@ describe Spree::Admin::InvoicesController, type: :controller do
expect(response).to redirect_to spree.admin_dashboard_path
end
+
+ context "distributor didn't set an ABN" do
+ before do
+ distributor.update_attribute(:abn, "")
+ end
+
+ it "should not allow me to generate a new invoice for the order" do
+ expect do
+ spree_get :generate, params
+ end.to change{ Invoice.count }.by(0)
+
+ expect(response).to redirect_to spree.admin_dashboard_path
+ expect(flash[:error])
+ .to eq "#{distributor.name} must have a valid ABN before invoices can be used."
+ end
+ end
end
end
end
From d16308011554c9da955bdd0f638b88a0d3f85277 Mon Sep 17 00:00:00 2001
From: Kelly
Date: Tue, 16 Apr 2024 14:52:17 -0400
Subject: [PATCH 002/319] added test for if user isn't logged in for
payments_controller
---
spec/controllers/payments_controller_spec.rb | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
create mode 100644 spec/controllers/payments_controller_spec.rb
diff --git a/spec/controllers/payments_controller_spec.rb b/spec/controllers/payments_controller_spec.rb
new file mode 100644
index 0000000000..64c663de99
--- /dev/null
+++ b/spec/controllers/payments_controller_spec.rb
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+describe PaymentsController, type: :controller do
+
+ describe "testing redirect_to_authorize" do
+ context "when user isn't logged in" do
+ it "redirects to the login page and set error flash msg" do
+ get :redirect_to_authorize, params: { id: payment.id }
+ expect(response).to redirect_to(root_path(anchor: "/login", after_login: request.original_fullpath))
+ expect(flash[:error]).to eq I18n.t("spree.orders.edit.login_to_view_order")
+ end
+ end
+
+ context "when user is logged in" do
+
+ end
+
+end
\ No newline at end of file
From 7d814e739d4ad5d15e5ab88c657816fec41c2806 Mon Sep 17 00:00:00 2001
From: Kelly
Date: Tue, 16 Apr 2024 15:09:21 -0400
Subject: [PATCH 003/319] added objects necessary for testing - user, order,
payment
---
spec/controllers/payments_controller_spec.rb | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/spec/controllers/payments_controller_spec.rb b/spec/controllers/payments_controller_spec.rb
index 64c663de99..e3b2cf5d90 100644
--- a/spec/controllers/payments_controller_spec.rb
+++ b/spec/controllers/payments_controller_spec.rb
@@ -3,6 +3,9 @@
require 'spec_helper'
describe PaymentsController, type: :controller do
+ let!(:user) { create(:user) }
+ let!(:order) { create(:order, user: user) }
+ let!(:payment) { create(:payment, order: order) }
describe "testing redirect_to_authorize" do
context "when user isn't logged in" do
@@ -13,8 +16,8 @@ describe PaymentsController, type: :controller do
end
end
- context "when user is logged in" do
-
+ context "when user is logged in" do
+
+ end
end
-
end
\ No newline at end of file
From 1ad544820c37ef53a8e91cdb51839a0e022c3459 Mon Sep 17 00:00:00 2001
From: Kelly
Date: Tue, 16 Apr 2024 15:21:49 -0400
Subject: [PATCH 004/319] completed payments_controller_spec testing
---
spec/controllers/payments_controller_spec.rb | 23 +++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/spec/controllers/payments_controller_spec.rb b/spec/controllers/payments_controller_spec.rb
index e3b2cf5d90..b68478eb4c 100644
--- a/spec/controllers/payments_controller_spec.rb
+++ b/spec/controllers/payments_controller_spec.rb
@@ -17,7 +17,28 @@ describe PaymentsController, type: :controller do
end
context "when user is logged in" do
-
+ before do
+ allow(controller).to receive(:spree_current_user).and_return(user)
+ end
+
+ context "has cvv response message" do
+ before do
+ allow_any_instance_of(Spree::Payment).to receive(:cvv_response_message).and_return('http://example.com')
+ end
+
+ it "redirects to the CVV response URL" do
+ get :redirect_to_authorize, params: { id: payment.id }
+ expect(response).to redirect_to('http://example.com')
+ end
+
+ end
+
+ context "doesn't have cvv response message" do
+ it "redirect to order URL" do
+ get :redirect_to_authorize, params: { id: payment.id }
+ expect(response).to redirect_to(order_url(order))
+ end
+ end
end
end
end
\ No newline at end of file
From 954125b7f6862f2bcfa701d0a37867795bde59bb Mon Sep 17 00:00:00 2001
From: Kelly
Date: Tue, 16 Apr 2024 15:30:21 -0400
Subject: [PATCH 005/319] style improvements after running rubocop
---
spec/controllers/payments_controller_spec.rb | 74 ++++++++++----------
1 file changed, 37 insertions(+), 37 deletions(-)
diff --git a/spec/controllers/payments_controller_spec.rb b/spec/controllers/payments_controller_spec.rb
index b68478eb4c..2af4e7a481 100644
--- a/spec/controllers/payments_controller_spec.rb
+++ b/spec/controllers/payments_controller_spec.rb
@@ -3,42 +3,42 @@
require 'spec_helper'
describe PaymentsController, type: :controller do
- let!(:user) { create(:user) }
- let!(:order) { create(:order, user: user) }
- let!(:payment) { create(:payment, order: order) }
-
- describe "testing redirect_to_authorize" do
- context "when user isn't logged in" do
- it "redirects to the login page and set error flash msg" do
- get :redirect_to_authorize, params: { id: payment.id }
- expect(response).to redirect_to(root_path(anchor: "/login", after_login: request.original_fullpath))
- expect(flash[:error]).to eq I18n.t("spree.orders.edit.login_to_view_order")
- end
- end
-
- context "when user is logged in" do
- before do
- allow(controller).to receive(:spree_current_user).and_return(user)
- end
+ let!(:user) { create(:user) }
+ let!(:order) { create(:order, user:) }
+ let!(:payment) { create(:payment, order:) }
- context "has cvv response message" do
- before do
- allow_any_instance_of(Spree::Payment).to receive(:cvv_response_message).and_return('http://example.com')
- end
-
- it "redirects to the CVV response URL" do
- get :redirect_to_authorize, params: { id: payment.id }
- expect(response).to redirect_to('http://example.com')
- end
-
- end
-
- context "doesn't have cvv response message" do
- it "redirect to order URL" do
- get :redirect_to_authorize, params: { id: payment.id }
- expect(response).to redirect_to(order_url(order))
- end
- end
- end
+ describe "testing redirect_to_authorize" do
+ context "when user isn't logged in" do
+ it "redirects to the login page and set error flash msg" do
+ get :redirect_to_authorize, params: { id: payment.id }
+ expect(response).to redirect_to(root_path(anchor: "/login",
+ after_login: request.original_fullpath))
+ expect(flash[:error]).to eq I18n.t("spree.orders.edit.login_to_view_order")
+ end
end
-end
\ No newline at end of file
+
+ context "when user is logged in" do
+ before do
+ allow(controller).to receive(:spree_current_user).and_return(user)
+ end
+
+ context "has cvv response message" do
+ before do
+ allow_any_instance_of(Spree::Payment).to receive(:cvv_response_message).and_return('http://example.com')
+ end
+
+ it "redirects to the CVV response URL" do
+ get :redirect_to_authorize, params: { id: payment.id }
+ expect(response).to redirect_to('http://example.com')
+ end
+ end
+
+ context "doesn't have cvv response message" do
+ it "redirect to order URL" do
+ get :redirect_to_authorize, params: { id: payment.id }
+ expect(response).to redirect_to(order_url(order))
+ end
+ end
+ end
+ end
+end
From 51d90e782b94adc166099ac36f6821471c62d8a1 Mon Sep 17 00:00:00 2001
From: Sergio Souza
Date: Wed, 27 Mar 2024 09:49:47 -0300
Subject: [PATCH 006/319] remove the source_locale from the avaliable_locales
method
---
lib/open_food_network/i18n_config.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/open_food_network/i18n_config.rb b/lib/open_food_network/i18n_config.rb
index d0d71d0450..838a4308cb 100644
--- a/lib/open_food_network/i18n_config.rb
+++ b/lib/open_food_network/i18n_config.rb
@@ -17,7 +17,7 @@ module OpenFoodNetwork
# All locales that can be accessed by the application, including fallbacks.
def self.available_locales
- (selectable_locales + [default_locale, source_locale]).uniq
+ (selectable_locales + [default_locale]).uniq
end
# The default locale that is used when the user doesn't have a preference.
From 947772599790166627282b4fabae0bccaaba4f53 Mon Sep 17 00:00:00 2001
From: Sergio Souza
Date: Tue, 16 Apr 2024 18:02:13 -0300
Subject: [PATCH 007/319] update tests for avaliable_locales
---
spec/lib/open_food_network/i18n_config_spec.rb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/spec/lib/open_food_network/i18n_config_spec.rb b/spec/lib/open_food_network/i18n_config_spec.rb
index b69aa8b745..457ce35a49 100644
--- a/spec/lib/open_food_network/i18n_config_spec.rb
+++ b/spec/lib/open_food_network/i18n_config_spec.rb
@@ -77,7 +77,7 @@ module OpenFoodNetwork
end
it "provides the default available locales" do
- expect(I18nConfig.available_locales).to eq ["en_GB", "en"]
+ expect(I18nConfig.available_locales).to eq ["en_GB"]
end
end
@@ -92,7 +92,7 @@ module OpenFoodNetwork
end
it "provides the default available locales" do
- expect(I18nConfig.available_locales).to eq ["es", "fr", "de", "en"]
+ expect(I18nConfig.available_locales).to eq ["es", "fr", "de"]
end
end
end
From 9ae064a24f8fdc2d814a7787b4a087e02f46522c Mon Sep 17 00:00:00 2001
From: cyrillefr
Date: Mon, 22 Apr 2024 17:36:47 +0200
Subject: [PATCH 008/319] Fix RedundantPresenceValidationOnBelongs on some
files
- presence: true is redundant since Rails 5.0 BUT applies
with new default config of
belongs_to_required_by_default to true
Lots of files with belongs_to_required_by_default = false
(backward compatibility)
So: deleting this setting implies to adding optional: true
- added 'NOT NULL' constraints so model constraints match
with contraints on DB tables.
- updated the todo
---
.rubocop_todo.yml | 7 +------
app/models/enterprise_fee.rb | 1 -
app/models/exchange.rb | 3 ---
app/models/inventory_item.rb | 4 ----
app/models/order_cycle.rb | 4 +---
app/models/spree/address.rb | 6 ++----
...cle_and_sender_and_receiver_on_exchange.rb | 7 +++++++
...ire_name_and_coordinator_on_order_cycle.rb | 6 ++++++
...ty_and_phone_and_country_and_on_address.rb | 8 ++++++++
db/schema.rb | 20 +++++++++----------
10 files changed, 35 insertions(+), 31 deletions(-)
create mode 100644 db/migrate/20240422140057_require_order_cycle_and_sender_and_receiver_on_exchange.rb
create mode 100644 db/migrate/20240422145353_require_name_and_coordinator_on_order_cycle.rb
create mode 100644 db/migrate/20240422150502_require_address1_and_city_and_phone_and_country_and_on_address.rb
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index 8ed82cc4a7..3092909883 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -660,15 +660,10 @@ Rails/RedundantActiveRecordAllMethod:
- 'app/models/spree/variant.rb'
- 'spec/system/admin/product_import_spec.rb'
-# Offense count: 20
+# Offense count: 14
# This cop supports unsafe autocorrection (--autocorrect-all).
Rails/RedundantPresenceValidationOnBelongsTo:
Exclude:
- - 'app/models/enterprise_fee.rb'
- - 'app/models/exchange.rb'
- - 'app/models/inventory_item.rb'
- - 'app/models/order_cycle.rb'
- - 'app/models/spree/address.rb'
- 'app/models/spree/line_item.rb'
- 'app/models/spree/order.rb'
- 'app/models/spree/product_property.rb'
diff --git a/app/models/enterprise_fee.rb b/app/models/enterprise_fee.rb
index a4bcdd272d..16f61a3cd3 100644
--- a/app/models/enterprise_fee.rb
+++ b/app/models/enterprise_fee.rb
@@ -21,7 +21,6 @@ class EnterpriseFee < ApplicationRecord
validates :fee_type, inclusion: { in: FEE_TYPES }
validates :name, presence: true
- validates :enterprise_id, presence: true
before_save :ensure_valid_tax_category_settings
diff --git a/app/models/exchange.rb b/app/models/exchange.rb
index 796a251ed1..32aa3237ab 100644
--- a/app/models/exchange.rb
+++ b/app/models/exchange.rb
@@ -10,8 +10,6 @@
# shopfront (outgoing products). But the set of shown products can be smaller
# than all incoming products.
class Exchange < ApplicationRecord
- self.belongs_to_required_by_default = false
-
acts_as_taggable
belongs_to :order_cycle
@@ -24,7 +22,6 @@ class Exchange < ApplicationRecord
has_many :exchange_fees, dependent: :destroy
has_many :enterprise_fees, through: :exchange_fees
- validates :order_cycle, :sender, :receiver, presence: true
validates :sender_id, uniqueness: { scope: [:order_cycle_id, :receiver_id, :incoming] }
before_destroy :delete_related_exchange_variants, prepend: true
diff --git a/app/models/inventory_item.rb b/app/models/inventory_item.rb
index d013ea52f2..8d90a4271f 100644
--- a/app/models/inventory_item.rb
+++ b/app/models/inventory_item.rb
@@ -1,14 +1,10 @@
# frozen_string_literal: true
class InventoryItem < ApplicationRecord
- self.belongs_to_required_by_default = false
-
belongs_to :enterprise
belongs_to :variant, class_name: "Spree::Variant"
validates :variant_id, uniqueness: { scope: :enterprise_id }
- validates :enterprise, presence: true
- validates :variant, presence: true
validates :visible,
inclusion: { in: [true, false], message: I18n.t(:inventory_item_visibility_error) }
diff --git a/app/models/order_cycle.rb b/app/models/order_cycle.rb
index e6b0d1dff1..7b71a3a79e 100644
--- a/app/models/order_cycle.rb
+++ b/app/models/order_cycle.rb
@@ -3,8 +3,6 @@
require 'open_food_network/scope_variant_to_hub'
class OrderCycle < ApplicationRecord
- self.belongs_to_required_by_default = false
-
searchable_attributes :orders_open_at, :orders_close_at, :coordinator_id
searchable_scopes :active, :inactive, :active_or_complete, :upcoming, :closed, :not_closed,
:dated, :undated, :soonest_opening, :soonest_closing, :most_recently_closed
@@ -44,7 +42,7 @@ class OrderCycle < ApplicationRecord
before_update :reset_processed_at, if: :will_save_change_to_orders_close_at?
after_save :sync_subscriptions, if: :opening?
- validates :name, :coordinator_id, presence: true
+ validates :name, presence: true
validate :orders_close_at_after_orders_open_at?
preference :product_selection_from_coordinator_inventory_only, :boolean, default: false
diff --git a/app/models/spree/address.rb b/app/models/spree/address.rb
index 59363374f1..9c305be78d 100644
--- a/app/models/spree/address.rb
+++ b/app/models/spree/address.rb
@@ -4,19 +4,17 @@ module Spree
class Address < ApplicationRecord
include AddressDisplay
- self.belongs_to_required_by_default = false
-
searchable_attributes :firstname, :lastname, :phone, :full_name, :full_name_reversed,
:full_name_with_comma, :full_name_with_comma_reversed
searchable_associations :country, :state
belongs_to :country, class_name: "Spree::Country"
- belongs_to :state, class_name: "Spree::State"
+ belongs_to :state, class_name: "Spree::State", optional: true
has_one :enterprise, dependent: :restrict_with_exception
has_many :shipments
- validates :address1, :city, :country, :phone, presence: true
+ validates :address1, :city, :phone, presence: true
validates :company, presence: true, unless: -> { first_name.blank? || last_name.blank? }
validates :firstname, :lastname, presence: true, if: -> do
company.blank? || company == 'unused'
diff --git a/db/migrate/20240422140057_require_order_cycle_and_sender_and_receiver_on_exchange.rb b/db/migrate/20240422140057_require_order_cycle_and_sender_and_receiver_on_exchange.rb
new file mode 100644
index 0000000000..b159516a3a
--- /dev/null
+++ b/db/migrate/20240422140057_require_order_cycle_and_sender_and_receiver_on_exchange.rb
@@ -0,0 +1,7 @@
+class RequireOrderCycleAndSenderAndReceiverOnExchange < ActiveRecord::Migration[7.0]
+ def change
+ change_column_null :exchanges, :order_cycle_id, false
+ change_column_null :exchanges, :sender_id, false
+ change_column_null :exchanges, :receiver_id, false
+ end
+end
diff --git a/db/migrate/20240422145353_require_name_and_coordinator_on_order_cycle.rb b/db/migrate/20240422145353_require_name_and_coordinator_on_order_cycle.rb
new file mode 100644
index 0000000000..a58db5462d
--- /dev/null
+++ b/db/migrate/20240422145353_require_name_and_coordinator_on_order_cycle.rb
@@ -0,0 +1,6 @@
+class RequireNameAndCoordinatorOnOrderCycle < ActiveRecord::Migration[7.0]
+ def change
+ change_column_null :order_cycles, :name, false
+ change_column_null :order_cycles, :coordinator_id, false
+ end
+end
diff --git a/db/migrate/20240422150502_require_address1_and_city_and_phone_and_country_and_on_address.rb b/db/migrate/20240422150502_require_address1_and_city_and_phone_and_country_and_on_address.rb
new file mode 100644
index 0000000000..f200225349
--- /dev/null
+++ b/db/migrate/20240422150502_require_address1_and_city_and_phone_and_country_and_on_address.rb
@@ -0,0 +1,8 @@
+class RequireAddress1AndCityAndPhoneAndCountryAndOnAddress < ActiveRecord::Migration[7.0]
+ def change
+ change_column_null :spree_addresses, :address1, false
+ change_column_null :spree_addresses, :city, false
+ change_column_null :spree_addresses, :phone, false
+ change_column_null :spree_addresses, :country_id, false
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 51491dce7f..68d8d5206d 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema[7.0].define(version: 2024_02_13_044159) do
+ActiveRecord::Schema[7.0].define(version: 2024_04_22_150502) do
# These are extensions that must be enabled in order to support this database
enable_extension "pg_stat_statements"
enable_extension "plpgsql"
@@ -258,9 +258,9 @@ ActiveRecord::Schema[7.0].define(version: 2024_02_13_044159) do
end
create_table "exchanges", id: :serial, force: :cascade do |t|
- t.integer "order_cycle_id"
- t.integer "sender_id"
- t.integer "receiver_id"
+ t.integer "order_cycle_id", null: false
+ t.integer "sender_id", null: false
+ t.integer "receiver_id", null: false
t.text "pickup_time"
t.text "pickup_instructions"
t.datetime "created_at", precision: nil, null: false
@@ -330,10 +330,10 @@ ActiveRecord::Schema[7.0].define(version: 2024_02_13_044159) do
end
create_table "order_cycles", id: :serial, force: :cascade do |t|
- t.string "name", limit: 255
+ t.string "name", limit: 255, null: false
t.datetime "orders_open_at", precision: nil
t.datetime "orders_close_at", precision: nil
- t.integer "coordinator_id"
+ t.integer "coordinator_id", null: false
t.datetime "created_at", precision: nil, null: false
t.datetime "updated_at", precision: nil, null: false
t.datetime "processed_at", precision: nil
@@ -420,15 +420,15 @@ ActiveRecord::Schema[7.0].define(version: 2024_02_13_044159) do
create_table "spree_addresses", id: :serial, force: :cascade do |t|
t.string "firstname", limit: 255
t.string "lastname", limit: 255
- t.string "address1", limit: 255
+ t.string "address1", limit: 255, null: false
t.string "address2", limit: 255
- t.string "city", limit: 255
+ t.string "city", limit: 255, null: false
t.string "zipcode", limit: 255
- t.string "phone", limit: 255
+ t.string "phone", limit: 255, null: false
t.string "state_name", limit: 255
t.string "alternative_phone", limit: 255
t.integer "state_id"
- t.integer "country_id"
+ t.integer "country_id", null: false
t.datetime "created_at", precision: nil, null: false
t.datetime "updated_at", precision: nil, null: false
t.string "company", limit: 255
From 64d633c64e46a4ec864119aed8a51bfc49aba66e Mon Sep 17 00:00:00 2001
From: Maikel Linke
Date: Tue, 23 Apr 2024 13:50:46 +1000
Subject: [PATCH 009/319] Publish enterprise website with https://
---
engines/dfc_provider/app/services/enterprise_builder.rb | 3 +++
engines/dfc_provider/spec/requests/enterprises_spec.rb | 1 +
swagger/dfc.yaml | 2 +-
3 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/engines/dfc_provider/app/services/enterprise_builder.rb b/engines/dfc_provider/app/services/enterprise_builder.rb
index b2087c2601..b03d27737d 100644
--- a/engines/dfc_provider/app/services/enterprise_builder.rb
+++ b/engines/dfc_provider/app/services/enterprise_builder.rb
@@ -23,6 +23,9 @@ class EnterpriseBuilder < DfcBuilder
socialMedias: SocialMediaBuilder.social_medias(enterprise),
websites: [enterprise.website].compact,
).tap do |e|
+ # The model strips the protocol and we need to add it:
+ e.websites = e.websites.map { |url| "https://#{url}" }
+
add_ofn_property(e, "ofn:long_description", enterprise.long_description)
# This could be expressed as dfc-b:hasMainContact Person with name.
diff --git a/engines/dfc_provider/spec/requests/enterprises_spec.rb b/engines/dfc_provider/spec/requests/enterprises_spec.rb
index 587971a2ec..c205bc62a9 100644
--- a/engines/dfc_provider/spec/requests/enterprises_spec.rb
+++ b/engines/dfc_provider/spec/requests/enterprises_spec.rb
@@ -71,6 +71,7 @@ describe "Enterprises", type: :request, swagger_doc: "dfc.yaml", rswag_autodoc:
expect(json_response["@graph"][0]).to include(
"dfc-b:affiliates" => "http://test.host/api/dfc/enterprise_groups/60000",
+ "dfc-b:websitePage" => "https://openfoodnetwork.org",
)
# Insert static value to keep documentation deterministic:
diff --git a/swagger/dfc.yaml b/swagger/dfc.yaml
index a96c33c2e7..f75cd154dc 100644
--- a/swagger/dfc.yaml
+++ b/swagger/dfc.yaml
@@ -376,7 +376,7 @@ paths:
dfc-b:hasAddress: http://test.host/api/dfc/addresses/40000
dfc-b:hasPhoneNumber: 0404 444 000 200
dfc-b:email: hello@example.org
- dfc-b:websitePage: openfoodnetwork.org
+ dfc-b:websitePage: https://openfoodnetwork.org
dfc-b:hasSocialMedia: http://test.host/api/dfc/enterprises/10000/social_medias/facebook
dfc-b:logo: ''
dfc-b:name: Fred's Farm
From d0f683d2792e5292cef65521f3d0e65faaf0de63 Mon Sep 17 00:00:00 2001
From: David Cook
Date: Tue, 23 Apr 2024 16:48:52 +1000
Subject: [PATCH 010/319] Spec for bug
---
spec/system/admin/products_v3/products_spec.rb | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/spec/system/admin/products_v3/products_spec.rb b/spec/system/admin/products_v3/products_spec.rb
index 7384f1c0bd..a4f2a3b139 100644
--- a/spec/system/admin/products_v3/products_spec.rb
+++ b/spec/system/admin/products_v3/products_spec.rb
@@ -2,13 +2,16 @@
require "system_helper"
-describe 'As an admin, I can manage products', feature: :admin_style_v3 do
+describe 'As an enterprise user, I can manage my products', feature: :admin_style_v3 do
include WebHelper
include AuthenticationHelper
include FileHelper
+ let(:producer) { create(:supplier_enterprise) }
+ let(:user) { create(:user, enterprises: [producer]) }
+
before do
- login_as_admin
+ login_as user
end
it "can see the new product page" do
@@ -129,8 +132,10 @@ describe 'As an admin, I can manage products', feature: :admin_style_v3 do
before { create_products 1 }
# create a product with a different supplier
- let!(:producer) { create(:supplier_enterprise, name: "Producer 1") }
- let!(:product_by_supplier) { create(:simple_product, name: "Apples", supplier: producer) }
+ let!(:producer1) { create(:supplier_enterprise, name: "Producer 1") }
+ let!(:product_by_supplier) { create(:simple_product, name: "Apples", supplier: producer1) }
+
+ before { user.enterprise_roles.create(enterprise: producer1) }
it "can search for and update a product" do
visit admin_products_url
@@ -145,6 +150,7 @@ describe 'As an admin, I can manage products', feature: :admin_style_v3 do
fill_in "Name", with: "Pommes"
end
+ pending "#12403"
expect {
click_button "Save changes"
@@ -180,7 +186,7 @@ describe 'As an admin, I can manage products', feature: :admin_style_v3 do
end
end
- describe "updating" do
+ xdescribe "updating" do # pending #12403
let!(:variant_a1) {
product_a.variants.first.tap{ |v|
v.update! display_name: "Medium box", sku: "APL-01", price: 5.25, on_hand: 5,
@@ -974,7 +980,7 @@ describe 'As an admin, I can manage products', feature: :admin_style_v3 do
def create_products(amount)
amount.times do |i|
- create(:simple_product, name: "product #{i}")
+ create(:simple_product, name: "product #{i}", supplier: producer)
end
end
From b5cdee3d65f725df76aaea1f993959b02ff5ef57 Mon Sep 17 00:00:00 2001
From: David Cook
Date: Tue, 23 Apr 2024 13:02:54 +1000
Subject: [PATCH 011/319] Rename translation key
So that it can be used for more general purposes.
---
app/webpacker/controllers/application_controller.js | 2 +-
config/locales/en.yml | 9 +++++----
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/app/webpacker/controllers/application_controller.js b/app/webpacker/controllers/application_controller.js
index 3065427cf4..50f5e57269 100644
--- a/app/webpacker/controllers/application_controller.js
+++ b/app/webpacker/controllers/application_controller.js
@@ -47,7 +47,7 @@ export default class extends Controller {
console.error(reflex + ":\n " + error);
// show error message
- alert(I18n.t("errors.stimulus_reflex_error"));
+ alert(I18n.t("errors.general_error.message"));
}
reflexForbidden(element, reflex, noop, reflexId) {
diff --git a/config/locales/en.yml b/config/locales/en.yml
index e20236b1d9..1fe516fee8 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -175,14 +175,15 @@ en:
message_html: "The change you wanted was rejected. Maybe you tried to change something you don't have access to.
"
- stimulus_reflex_error: "We're sorry, but something went wrong.
+ general_error:
+ message: "We're sorry, but something went wrong.
- This might be a temporary problem, so please try again or reload the page.
+ This might be a temporary problem, so please try again or reload the page.
- We record all errors and may be working on a fix.
+ We record all errors and may be working on a fix.
- If the problem persists or is urgent, please contact us."
+ If the problem persists or is urgent, please contact us."
stripe:
error_code:
incorrect_number: "The card number is incorrect."
From 574e8f01356e51f5b9641d2fd8cf5d926930f6a2 Mon Sep 17 00:00:00 2001
From: David Cook
Date: Tue, 23 Apr 2024 13:04:48 +1000
Subject: [PATCH 012/319] Show error message when turbo:frame-missing
Instead of replacing frame contents with unhelpful text 'Content missing'.
---
app/webpacker/js/turbo.js | 14 ++++++++++++++
app/webpacker/packs/admin.js | 3 ++-
app/webpacker/packs/application.js | 2 +-
3 files changed, 17 insertions(+), 2 deletions(-)
create mode 100644 app/webpacker/js/turbo.js
diff --git a/app/webpacker/js/turbo.js b/app/webpacker/js/turbo.js
new file mode 100644
index 0000000000..4451810c93
--- /dev/null
+++ b/app/webpacker/js/turbo.js
@@ -0,0 +1,14 @@
+import "@hotwired/turbo";
+
+document.addEventListener("turbo:frame-missing", (event) => {
+ // don't replace frame contents
+ event.preventDefault();
+
+ // show error message instead
+ status = event.detail.response.status;
+ if(status == 401) {
+ alert(I18n.t("errors.unauthorized.message"));
+ } else {
+ alert(I18n.t("errors.general_error.message"));
+ }
+});
diff --git a/app/webpacker/packs/admin.js b/app/webpacker/packs/admin.js
index 81735d3040..dbb68bafc2 100644
--- a/app/webpacker/packs/admin.js
+++ b/app/webpacker/packs/admin.js
@@ -1,6 +1,6 @@
import "controllers";
import "channels";
-import "@hotwired/turbo";
+import "../js/turbo";
import "../js/hotkeys";
import "../js/mrujs";
import "../js/matomo";
@@ -17,3 +17,4 @@ import Trix from "trix";
document.addEventListener("trix-file-accept", (event) => {
event.preventDefault();
});
+
diff --git a/app/webpacker/packs/application.js b/app/webpacker/packs/application.js
index 5ee6a3b066..f8263d1830 100644
--- a/app/webpacker/packs/application.js
+++ b/app/webpacker/packs/application.js
@@ -1,5 +1,5 @@
import "controllers";
-import "@hotwired/turbo";
+import "../js/turbo";
import "../js/hotkeys";
import "../js/mrujs";
import "../js/matomo";
From 5a9b9a065b0d2dc2861d8fccddd6f9bb0d8d5647 Mon Sep 17 00:00:00 2001
From: Maikel Linke
Date: Tue, 23 Apr 2024 16:49:45 +1000
Subject: [PATCH 013/319] DRY website fix
---
engines/dfc_provider/app/services/enterprise_builder.rb | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/engines/dfc_provider/app/services/enterprise_builder.rb b/engines/dfc_provider/app/services/enterprise_builder.rb
index b03d27737d..0d61c1735d 100644
--- a/engines/dfc_provider/app/services/enterprise_builder.rb
+++ b/engines/dfc_provider/app/services/enterprise_builder.rb
@@ -21,11 +21,10 @@ class EnterpriseBuilder < DfcBuilder
localizations: [address],
phoneNumbers: [enterprise.phone].compact,
socialMedias: SocialMediaBuilder.social_medias(enterprise),
- websites: [enterprise.website].compact,
- ).tap do |e|
- # The model strips the protocol and we need to add it:
- e.websites = e.websites.map { |url| "https://#{url}" }
+ # The model strips the protocol and we need to add it:
+ websites: [enterprise.website].compact.map { |url| "https://#{url}" },
+ ).tap do |e|
add_ofn_property(e, "ofn:long_description", enterprise.long_description)
# This could be expressed as dfc-b:hasMainContact Person with name.
From 5559816e12169cbd4e401fc151ec0f1270608cb5 Mon Sep 17 00:00:00 2001
From: Anthony Musyoki <445103+anthonyms@users.noreply.github.com>
Date: Thu, 21 Mar 2024 15:02:38 +0300
Subject: [PATCH 014/319] Fix Rubocop Rails issue:
Rails/HasManyOrHasOneDependent
---
app/models/enterprise.rb | 8 ++++---
spec/factories/payment_method_factory.rb | 5 ++++
spec/factories/shipping_method_factory.rb | 5 ++++
spec/models/enterprise_spec.rb | 29 +++++++++++++++++++++++
4 files changed, 44 insertions(+), 3 deletions(-)
diff --git a/app/models/enterprise.rb b/app/models/enterprise.rb
index 22a18473a9..5340aecddd 100644
--- a/app/models/enterprise.rb
+++ b/app/models/enterprise.rb
@@ -43,7 +43,9 @@ class Enterprise < ApplicationRecord
foreign_key: 'supplier_id',
dependent: :destroy
has_many :supplied_variants, through: :supplied_products, source: :variants
- has_many :distributed_orders, class_name: 'Spree::Order', foreign_key: 'distributor_id'
+ has_many :distributed_orders, class_name: 'Spree::Order',
+ foreign_key: 'distributor_id',
+ dependent: :destroy
belongs_to :address, class_name: 'Spree::Address'
belongs_to :business_address, optional: true, class_name: 'Spree::Address', dependent: :destroy
has_many :enterprise_fees
@@ -52,9 +54,9 @@ class Enterprise < ApplicationRecord
belongs_to :owner, class_name: 'Spree::User',
inverse_of: :owned_enterprises
has_many :distributor_payment_methods,
- inverse_of: :distributor, foreign_key: :distributor_id
+ inverse_of: :distributor, foreign_key: :distributor_id, dependent: :destroy
has_many :distributor_shipping_methods,
- inverse_of: :distributor, foreign_key: :distributor_id
+ inverse_of: :distributor, foreign_key: :distributor_id, dependent: :destroy
has_many :payment_methods, through: :distributor_payment_methods
has_many :shipping_methods, through: :distributor_shipping_methods
has_many :customers, dependent: :destroy
diff --git a/spec/factories/payment_method_factory.rb b/spec/factories/payment_method_factory.rb
index 98e8d36a35..c93657ef21 100644
--- a/spec/factories/payment_method_factory.rb
+++ b/spec/factories/payment_method_factory.rb
@@ -24,4 +24,9 @@ FactoryBot.define do
distributors { [FactoryBot.create(:stripe_account).enterprise] }
preferred_enterprise_id { distributors.first.id }
end
+
+ factory :distributor_payment_method, class: DistributorPaymentMethod do
+ distributor { FactoryBot.create(:distributor_enterprise) }
+ payment_method { FactoryBot.create(:payment_method) }
+ end
end
diff --git a/spec/factories/shipping_method_factory.rb b/spec/factories/shipping_method_factory.rb
index d6957e78bd..68b41106c4 100644
--- a/spec/factories/shipping_method_factory.rb
+++ b/spec/factories/shipping_method_factory.rb
@@ -68,4 +68,9 @@ FactoryBot.define do
distributors { [create(:distributor_enterprise_with_tax)] }
end
end
+
+ factory :distributor_shipping_method, class: DistributorShippingMethod do
+ shipping_method { FactoryBot.create(:shipping_method) }
+ distributor { FactoryBot.create(:distributor_enterprise) }
+ end
end
diff --git a/spec/models/enterprise_spec.rb b/spec/models/enterprise_spec.rb
index e764c9da73..06eb7cfbb0 100644
--- a/spec/models/enterprise_spec.rb
+++ b/spec/models/enterprise_spec.rb
@@ -57,6 +57,35 @@ describe Enterprise do
expect(EnterpriseRelationship.where(id: [er1, er2])).to be_empty
end
+ it "destroys all distributed_orders upon destroy" do
+ enterprise = create(:distributor_enterprise)
+ order_ids = create_list(:order, 2, distributor: enterprise).map(&:id)
+
+ expect(Spree::Order.where(id: order_ids)).to exist
+ enterprise.destroy
+ expect(Spree::Order.where(id: order_ids)).not_to exist
+ end
+
+ it "destroys all distributor_payment_methods upon destroy" do
+ enterprise = create(:distributor_enterprise)
+ payment_method_ids = create_list(:distributor_payment_method, 2,
+ distributor: enterprise).map(&:id)
+
+ expect(DistributorPaymentMethod.where(id: payment_method_ids)).to exist
+ enterprise.destroy
+ expect(DistributorPaymentMethod.where(id: payment_method_ids)).not_to exist
+ end
+
+ it "destroys all distributor_shipping_methods upon destroy" do
+ enterprise = create(:enterprise)
+ shipping_method_ids = create_list(:distributor_shipping_method, 2,
+ distributor: enterprise).map(&:id)
+
+ expect(DistributorShippingMethod.where(id: shipping_method_ids)).to exist
+ enterprise.destroy
+ expect(DistributorShippingMethod.where(id: shipping_method_ids)).not_to exist
+ end
+
describe "relationships to other enterprises" do
let(:e) { create(:distributor_enterprise) }
let(:p) { create(:supplier_enterprise) }
From 1ec453df4df494a4c1c5f675b57616d3095e2a85 Mon Sep 17 00:00:00 2001
From: Anthony Musyoki <445103+anthonyms@users.noreply.github.com>
Date: Thu, 21 Mar 2024 15:54:29 +0300
Subject: [PATCH 015/319] Fix Rubocop issue: Do not delete addresses having
shipments
The reasoning is that we should not delete an address that has
ever received a shipment
---
app/models/spree/address.rb | 2 +-
spec/models/spree/address_spec.rb | 11 +++++++++++
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/app/models/spree/address.rb b/app/models/spree/address.rb
index 9c305be78d..9d7cac881f 100644
--- a/app/models/spree/address.rb
+++ b/app/models/spree/address.rb
@@ -12,7 +12,7 @@ module Spree
belongs_to :state, class_name: "Spree::State", optional: true
has_one :enterprise, dependent: :restrict_with_exception
- has_many :shipments
+ has_many :shipments, dependent: :restrict_with_exception
validates :address1, :city, :phone, presence: true
validates :company, presence: true, unless: -> { first_name.blank? || last_name.blank? }
diff --git a/spec/models/spree/address_spec.rb b/spec/models/spree/address_spec.rb
index 41d0a28b15..c0b4f17234 100644
--- a/spec/models/spree/address_spec.rb
+++ b/spec/models/spree/address_spec.rb
@@ -134,6 +134,17 @@ describe Spree::Address do
end
end
+ context "associations" do
+ it "destroys shipments upon destroy" do
+ address = create(:address)
+ create(:shipment, address:)
+
+ expect {
+ address.destroy
+ }.to raise_error(ActiveRecord::DeleteRestrictionError)
+ end
+ end
+
context ".default" do
it "sets up a new record the default country" do
expect(Spree::Address.default.country).to eq DefaultCountry.country
From 4f851bbe1f5e3a518c25ad95691ae9a26ecf63c3 Mon Sep 17 00:00:00 2001
From: Anthony Musyoki <445103+anthonyms@users.noreply.github.com>
Date: Mon, 25 Mar 2024 11:47:58 +0300
Subject: [PATCH 016/319] Fix Rubocop: Do not delete dependent stock_movements
---
app/models/spree/stock_item.rb | 2 +-
spec/models/spree/stock_item_spec.rb | 4 ++++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/app/models/spree/stock_item.rb b/app/models/spree/stock_item.rb
index 192a154b3d..6ac038beb6 100644
--- a/app/models/spree/stock_item.rb
+++ b/app/models/spree/stock_item.rb
@@ -8,7 +8,7 @@ module Spree
belongs_to :stock_location, class_name: 'Spree::StockLocation', inverse_of: :stock_items
belongs_to :variant, -> { with_deleted }, class_name: 'Spree::Variant'
- has_many :stock_movements
+ has_many :stock_movements, dependent: nil
validates :stock_location, :variant, presence: true
validates :variant_id, uniqueness: { scope: [:stock_location_id, :deleted_at] }
diff --git a/spec/models/spree/stock_item_spec.rb b/spec/models/spree/stock_item_spec.rb
index d3b1b26bab..2cf29f9918 100644
--- a/spec/models/spree/stock_item_spec.rb
+++ b/spec/models/spree/stock_item_spec.rb
@@ -112,6 +112,10 @@ RSpec.describe Spree::StockItem do
it "doesnt raise ReadOnlyRecord error" do
expect { subject.destroy }.not_to raise_error
end
+
+ it "does not destroy stock_movements when destroyed" do
+ expect { subject.destroy }.not_to change { Spree::StockMovement.count }
+ end
end
end
end
From 4140257fa1e3ffa1b63efa53ae694276ecf9c81a Mon Sep 17 00:00:00 2001
From: Anthony Musyoki <445103+anthonyms@users.noreply.github.com>
Date: Tue, 26 Mar 2024 09:54:51 +0300
Subject: [PATCH 017/319] Fix Rubocop: Do not delete dependent adjustments
TaxRate acts_as_paranoid iand is thus not hard_deleted
---
app/models/spree/tax_rate.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/models/spree/tax_rate.rb b/app/models/spree/tax_rate.rb
index 62dade25b1..d7d91a7b73 100644
--- a/app/models/spree/tax_rate.rb
+++ b/app/models/spree/tax_rate.rb
@@ -21,7 +21,7 @@ module Spree
belongs_to :zone, class_name: "Spree::Zone", inverse_of: :tax_rates
belongs_to :tax_category, class_name: "Spree::TaxCategory", inverse_of: :tax_rates
- has_many :adjustments, as: :originator
+ has_many :adjustments, as: :originator, dependent: nil
validates :amount, presence: true, numericality: true
validates :tax_category, presence: true
From 645cb10864d1736113ed5d51290ec37797eb8ecb Mon Sep 17 00:00:00 2001
From: Anthony Musyoki <445103+anthonyms@users.noreply.github.com>
Date: Tue, 26 Mar 2024 10:01:02 +0300
Subject: [PATCH 018/319] Fix Rubocop: Do not delete Spree::Variant
associations
Spree::Variant acts_as_paranoid and is thus not hard deleted
---
app/models/spree/variant.rb | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/app/models/spree/variant.rb b/app/models/spree/variant.rb
index c5f93e0de9..294c1edfe0 100644
--- a/app/models/spree/variant.rb
+++ b/app/models/spree/variant.rb
@@ -32,8 +32,8 @@ module Spree
delegate :name, :name=, :description, :description=, :meta_keywords, to: :product
- has_many :inventory_units, inverse_of: :variant
- has_many :line_items, inverse_of: :variant
+ has_many :inventory_units, inverse_of: :variant, dependent: nil
+ has_many :line_items, inverse_of: :variant, dependent: nil
has_many :stock_items, dependent: :destroy, inverse_of: :variant
has_many :stock_locations, through: :stock_items
@@ -53,7 +53,7 @@ module Spree
:currency, :currency=,
to: :find_or_build_default_price
- has_many :exchange_variants
+ has_many :exchange_variants, dependent: nil
has_many :exchanges, through: :exchange_variants
has_many :variant_overrides, dependent: :destroy
has_many :inventory_items, dependent: :destroy
From c2cbe4f0bfaae10b5136f7d3ec16bbd77ca571a9 Mon Sep 17 00:00:00 2001
From: Anthony Musyoki <445103+anthonyms@users.noreply.github.com>
Date: Tue, 26 Mar 2024 10:57:40 +0300
Subject: [PATCH 019/319] Fix Rubocop: Hard delete paranoid associations
As much as the associated models act_as_paranoid, it
doesnt make sense to keep them around after deleting the enterprise
---
app/models/enterprise.rb | 15 +++++++++++++--
spec/models/enterprise_spec.rb | 20 ++++++++++++++++++++
2 files changed, 33 insertions(+), 2 deletions(-)
diff --git a/app/models/enterprise.rb b/app/models/enterprise.rb
index 5340aecddd..3c080e7fca 100644
--- a/app/models/enterprise.rb
+++ b/app/models/enterprise.rb
@@ -48,7 +48,7 @@ class Enterprise < ApplicationRecord
dependent: :destroy
belongs_to :address, class_name: 'Spree::Address'
belongs_to :business_address, optional: true, class_name: 'Spree::Address', dependent: :destroy
- has_many :enterprise_fees
+ has_many :enterprise_fees, dependent: nil # paranoid association is deleted in a before_destroy
has_many :enterprise_roles, dependent: :destroy
has_many :users, through: :enterprise_roles
belongs_to :owner, class_name: 'Spree::User',
@@ -63,7 +63,7 @@ class Enterprise < ApplicationRecord
has_many :inventory_items, dependent: :destroy
has_many :tag_rules, dependent: :destroy
has_one :stripe_account, dependent: :destroy
- has_many :vouchers
+ has_many :vouchers, dependent: nil # paranoid association is deleted in a before_destroy
has_many :connected_apps, dependent: :destroy
has_one :custom_tab, dependent: :destroy
@@ -130,6 +130,9 @@ class Enterprise < ApplicationRecord
after_create :set_default_contact
after_create :relate_to_owners_enterprises
+ before_destroy :delete_all_enterprise_fees
+ before_destroy :delete_all_vouchers
+
after_rollback :restore_permalink
after_touch :touch_distributors
after_create_commit :send_welcome_email
@@ -587,4 +590,12 @@ class Enterprise < ApplicationRecord
where.not(enterprises: { id: }).
update_all(updated_at: Time.zone.now)
end
+
+ def delete_all_enterprise_fees
+ enterprise_fees.each(&:really_destroy!)
+ end
+
+ def delete_all_vouchers
+ vouchers.each(&:really_destroy!)
+ end
end
diff --git a/spec/models/enterprise_spec.rb b/spec/models/enterprise_spec.rb
index 06eb7cfbb0..d21514ff8e 100644
--- a/spec/models/enterprise_spec.rb
+++ b/spec/models/enterprise_spec.rb
@@ -86,6 +86,26 @@ describe Enterprise do
expect(DistributorShippingMethod.where(id: shipping_method_ids)).not_to exist
end
+ it "destroys all enterprise_fees upon destroy" do
+ enterprise = create(:enterprise)
+ fee_ids = create_list(:enterprise_fee, 2, enterprise:).map(&:id)
+
+ expect(EnterpriseFee.where(id: fee_ids)).to exist
+ enterprise.destroy
+ expect(EnterpriseFee.where(id: fee_ids)).not_to exist
+ end
+
+ it "destroys all vouchers upon destroy" do
+ enterprise = create(:enterprise)
+ voucher_ids = (1..2).map do |code|
+ create(:voucher, enterprise:, code: "new code #{code}")
+ end.map(&:id)
+
+ expect(Voucher.where(id: voucher_ids)).to exist
+ enterprise.destroy
+ expect(Voucher.where(id: voucher_ids)).not_to exist
+ end
+
describe "relationships to other enterprises" do
let(:e) { create(:distributor_enterprise) }
let(:p) { create(:supplier_enterprise) }
From 434afb73cd28777fff7c98636814cf852df4f0b2 Mon Sep 17 00:00:00 2001
From: Anthony Musyoki <445103+anthonyms@users.noreply.github.com>
Date: Wed, 3 Apr 2024 12:34:50 +0300
Subject: [PATCH 020/319] Fix Rubocop: Update handling of enterprise
associations
---
app/models/enterprise.rb | 24 +++++--------
spec/models/enterprise_spec.rb | 66 +++++++++++++++++++---------------
2 files changed, 46 insertions(+), 44 deletions(-)
diff --git a/app/models/enterprise.rb b/app/models/enterprise.rb
index 3c080e7fca..dd5a63a5fc 100644
--- a/app/models/enterprise.rb
+++ b/app/models/enterprise.rb
@@ -45,25 +45,29 @@ class Enterprise < ApplicationRecord
has_many :supplied_variants, through: :supplied_products, source: :variants
has_many :distributed_orders, class_name: 'Spree::Order',
foreign_key: 'distributor_id',
- dependent: :destroy
+ dependent: :restrict_with_exception
belongs_to :address, class_name: 'Spree::Address'
belongs_to :business_address, optional: true, class_name: 'Spree::Address', dependent: :destroy
- has_many :enterprise_fees, dependent: nil # paranoid association is deleted in a before_destroy
+ has_many :enterprise_fees, dependent: :restrict_with_exception
has_many :enterprise_roles, dependent: :destroy
has_many :users, through: :enterprise_roles
belongs_to :owner, class_name: 'Spree::User',
inverse_of: :owned_enterprises
has_many :distributor_payment_methods,
- inverse_of: :distributor, foreign_key: :distributor_id, dependent: :destroy
+ inverse_of: :distributor,
+ foreign_key: :distributor_id,
+ dependent: :restrict_with_exception
has_many :distributor_shipping_methods,
- inverse_of: :distributor, foreign_key: :distributor_id, dependent: :destroy
+ inverse_of: :distributor,
+ foreign_key: :distributor_id,
+ dependent: :restrict_with_exception
has_many :payment_methods, through: :distributor_payment_methods
has_many :shipping_methods, through: :distributor_shipping_methods
has_many :customers, dependent: :destroy
has_many :inventory_items, dependent: :destroy
has_many :tag_rules, dependent: :destroy
has_one :stripe_account, dependent: :destroy
- has_many :vouchers, dependent: nil # paranoid association is deleted in a before_destroy
+ has_many :vouchers, dependent: :restrict_with_exception
has_many :connected_apps, dependent: :destroy
has_one :custom_tab, dependent: :destroy
@@ -130,8 +134,6 @@ class Enterprise < ApplicationRecord
after_create :set_default_contact
after_create :relate_to_owners_enterprises
- before_destroy :delete_all_enterprise_fees
- before_destroy :delete_all_vouchers
after_rollback :restore_permalink
after_touch :touch_distributors
@@ -590,12 +592,4 @@ class Enterprise < ApplicationRecord
where.not(enterprises: { id: }).
update_all(updated_at: Time.zone.now)
end
-
- def delete_all_enterprise_fees
- enterprise_fees.each(&:really_destroy!)
- end
-
- def delete_all_vouchers
- vouchers.each(&:really_destroy!)
- end
end
diff --git a/spec/models/enterprise_spec.rb b/spec/models/enterprise_spec.rb
index d21514ff8e..8fd7c29f1f 100644
--- a/spec/models/enterprise_spec.rb
+++ b/spec/models/enterprise_spec.rb
@@ -57,53 +57,61 @@ describe Enterprise do
expect(EnterpriseRelationship.where(id: [er1, er2])).to be_empty
end
- it "destroys all distributed_orders upon destroy" do
+ it "raises a DeleteRestrictionError on destroy if distributed_orders exist" do
enterprise = create(:distributor_enterprise)
- order_ids = create_list(:order, 2, distributor: enterprise).map(&:id)
+ create_list(:order, 2, distributor: enterprise)
- expect(Spree::Order.where(id: order_ids)).to exist
- enterprise.destroy
- expect(Spree::Order.where(id: order_ids)).not_to exist
+ expect do
+ enterprise.destroy
+ end.to raise_error(ActiveRecord::DeleteRestrictionError,
+ /Cannot delete record because of dependent distributed_orders/)
+ .and change { Spree::Order.count }.by(0)
end
- it "destroys all distributor_payment_methods upon destroy" do
+ it "raises an DeleteRestrictionError on destroy if distributor_payment_methods exist" do
enterprise = create(:distributor_enterprise)
- payment_method_ids = create_list(:distributor_payment_method, 2,
- distributor: enterprise).map(&:id)
+ create_list(:distributor_payment_method, 2, distributor: enterprise)
- expect(DistributorPaymentMethod.where(id: payment_method_ids)).to exist
- enterprise.destroy
- expect(DistributorPaymentMethod.where(id: payment_method_ids)).not_to exist
+ expect do
+ enterprise.destroy
+ end.to raise_error(ActiveRecord::DeleteRestrictionError,
+ /Cannot delete record because of dependent distributor_payment_methods/)
+ .and change { DistributorPaymentMethod.count }.by(0)
end
- it "destroys all distributor_shipping_methods upon destroy" do
- enterprise = create(:enterprise)
- shipping_method_ids = create_list(:distributor_shipping_method, 2,
- distributor: enterprise).map(&:id)
+ it "raises an DeleteRestrictionError on destroy if distributor_shipping_methods exist" do
+ enterprise = create(:distributor_enterprise)
+ create_list(:distributor_shipping_method, 2, distributor: enterprise)
- expect(DistributorShippingMethod.where(id: shipping_method_ids)).to exist
- enterprise.destroy
- expect(DistributorShippingMethod.where(id: shipping_method_ids)).not_to exist
+ expect do
+ enterprise.destroy
+ end.to raise_error(ActiveRecord::DeleteRestrictionError,
+ /Cannot delete record because of dependent distributor_shipping_methods/)
+ .and change { DistributorShippingMethod.count }.by(0)
end
- it "destroys all enterprise_fees upon destroy" do
+ it "does not destroy enterprise_fees upon destroy" do
enterprise = create(:enterprise)
- fee_ids = create_list(:enterprise_fee, 2, enterprise:).map(&:id)
+ create_list(:enterprise_fee, 2, enterprise:)
- expect(EnterpriseFee.where(id: fee_ids)).to exist
- enterprise.destroy
- expect(EnterpriseFee.where(id: fee_ids)).not_to exist
+ expect do
+ enterprise.destroy
+ end.to raise_error(ActiveRecord::DeleteRestrictionError,
+ /Cannot delete record because of dependent enterprise_fees/)
+ .and change { EnterpriseFee.count }.by(0)
end
- it "destroys all vouchers upon destroy" do
+ it "does not destroy vouchers upon destroy" do
enterprise = create(:enterprise)
- voucher_ids = (1..2).map do |code|
+ (1..2).map do |code|
create(:voucher, enterprise:, code: "new code #{code}")
- end.map(&:id)
+ end
- expect(Voucher.where(id: voucher_ids)).to exist
- enterprise.destroy
- expect(Voucher.where(id: voucher_ids)).not_to exist
+ expect do
+ enterprise.destroy
+ end.to raise_error(ActiveRecord::DeleteRestrictionError,
+ /Cannot delete record because of dependent vouchers/)
+ .and change { Voucher.count }.by(0)
end
describe "relationships to other enterprises" do
From 0d03cdf8159ed0e68c122a3a4b08769fccfacdb8 Mon Sep 17 00:00:00 2001
From: Anthony Musyoki <445103+anthonyms@users.noreply.github.com>
Date: Tue, 23 Apr 2024 12:47:38 +0300
Subject: [PATCH 021/319] Fix Rubocop: Delete dependent stock_movements
---
.rubocop_todo.yml | 11 -----------
app/models/spree/stock_item.rb | 2 +-
app/models/spree/stock_movement.rb | 4 ----
spec/models/spree/stock_item_spec.rb | 6 +-----
spec/models/spree/stock_movement_spec.rb | 7 -------
5 files changed, 2 insertions(+), 28 deletions(-)
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index 3092909883..4f407763c9 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -565,17 +565,6 @@ RSpecRails/InferredSpecType:
- 'spec/requests/voucher_adjustments_spec.rb'
- 'spec/routing/stripe_spec.rb'
-# Offense count: 11
-# Configuration parameters: Include.
-# Include: app/models/**/*.rb
-Rails/HasManyOrHasOneDependent:
- Exclude:
- - 'app/models/enterprise.rb'
- - 'app/models/spree/address.rb'
- - 'app/models/spree/stock_item.rb'
- - 'app/models/spree/tax_rate.rb'
- - 'app/models/spree/variant.rb'
-
# Offense count: 22
# Configuration parameters: IgnoreScopes, Include.
# Include: app/models/**/*.rb
diff --git a/app/models/spree/stock_item.rb b/app/models/spree/stock_item.rb
index 6ac038beb6..565a165e6f 100644
--- a/app/models/spree/stock_item.rb
+++ b/app/models/spree/stock_item.rb
@@ -8,7 +8,7 @@ module Spree
belongs_to :stock_location, class_name: 'Spree::StockLocation', inverse_of: :stock_items
belongs_to :variant, -> { with_deleted }, class_name: 'Spree::Variant'
- has_many :stock_movements, dependent: nil
+ has_many :stock_movements, dependent: :destroy
validates :stock_location, :variant, presence: true
validates :variant_id, uniqueness: { scope: [:stock_location_id, :deleted_at] }
diff --git a/app/models/spree/stock_movement.rb b/app/models/spree/stock_movement.rb
index 1cf432df5c..02352588e2 100644
--- a/app/models/spree/stock_movement.rb
+++ b/app/models/spree/stock_movement.rb
@@ -14,10 +14,6 @@ module Spree
scope :recent, -> { order('created_at DESC') }
- def readonly?
- !new_record?
- end
-
private
def update_stock_item_quantity
diff --git a/spec/models/spree/stock_item_spec.rb b/spec/models/spree/stock_item_spec.rb
index 2cf29f9918..c3f94ef71a 100644
--- a/spec/models/spree/stock_item_spec.rb
+++ b/spec/models/spree/stock_item_spec.rb
@@ -109,12 +109,8 @@ RSpec.describe Spree::StockItem do
context "with stock movements" do
before { Spree::StockMovement.create(stock_item: subject, quantity: 1) }
- it "doesnt raise ReadOnlyRecord error" do
- expect { subject.destroy }.not_to raise_error
- end
-
it "does not destroy stock_movements when destroyed" do
- expect { subject.destroy }.not_to change { Spree::StockMovement.count }
+ expect { subject.destroy }.to change { Spree::StockMovement.count }.by(-1)
end
end
end
diff --git a/spec/models/spree/stock_movement_spec.rb b/spec/models/spree/stock_movement_spec.rb
index 95f0ea5564..251ed56e5c 100644
--- a/spec/models/spree/stock_movement_spec.rb
+++ b/spec/models/spree/stock_movement_spec.rb
@@ -11,13 +11,6 @@ describe Spree::StockMovement do
expect(subject).to respond_to(:stock_item)
end
- it 'is readonly unless new' do
- subject.save
- expect {
- subject.save
- }.to raise_error(ActiveRecord::ReadOnlyRecord)
- end
-
context "when quantity is negative" do
context "after save" do
it "should decrement the stock item count on hand" do
From 85e3d5d8580b4c7bb04c1f5634c7582a3e164349 Mon Sep 17 00:00:00 2001
From: filipefurtad0
Date: Mon, 22 Apr 2024 17:21:19 +0100
Subject: [PATCH 022/319] Tests payment intents for offline payments
Moves let variables outside shared examples block
Re-records cassettes
---
...t_intent_last_payment_error_as_message.yml | 632 ++++++++++++
...t_intent_last_payment_error_as_message.yml | 632 ++++++++++++
...t_intent_last_payment_error_as_message.yml | 632 ++++++++++++
...t_intent_last_payment_error_as_message.yml | 632 ++++++++++++
...t_intent_last_payment_error_as_message.yml | 632 ++++++++++++
...t_intent_last_payment_error_as_message.yml | 632 ++++++++++++
...t_intent_last_payment_error_as_message.yml | 630 ++++++++++++
...t_intent_last_payment_error_as_message.yml | 632 ++++++++++++
.../captures_the_payment.yml | 905 ++++++++++++++++++
...s_payment_intent_id_and_does_not_raise.yml | 512 ++++++++++
.../captures_the_payment.yml | 905 ++++++++++++++++++
...s_payment_intent_id_and_does_not_raise.yml | 512 ++++++++++
.../from_Diners_Club/captures_the_payment.yml | 905 ++++++++++++++++++
...s_payment_intent_id_and_does_not_raise.yml | 512 ++++++++++
.../captures_the_payment.yml | 905 ++++++++++++++++++
...s_payment_intent_id_and_does_not_raise.yml | 512 ++++++++++
.../from_Discover/captures_the_payment.yml | 905 ++++++++++++++++++
...s_payment_intent_id_and_does_not_raise.yml | 512 ++++++++++
.../captures_the_payment.yml | 905 ++++++++++++++++++
...s_payment_intent_id_and_does_not_raise.yml | 512 ++++++++++
.../from_JCB/captures_the_payment.yml | 905 ++++++++++++++++++
...s_payment_intent_id_and_does_not_raise.yml | 512 ++++++++++
.../from_Mastercard/captures_the_payment.yml | 905 ++++++++++++++++++
...s_payment_intent_id_and_does_not_raise.yml | 512 ++++++++++
.../captures_the_payment.yml | 905 ++++++++++++++++++
...s_payment_intent_id_and_does_not_raise.yml | 512 ++++++++++
.../captures_the_payment.yml | 905 ++++++++++++++++++
...s_payment_intent_id_and_does_not_raise.yml | 512 ++++++++++
.../captures_the_payment.yml | 905 ++++++++++++++++++
...s_payment_intent_id_and_does_not_raise.yml | 512 ++++++++++
.../from_UnionPay/captures_the_payment.yml | 905 ++++++++++++++++++
...s_payment_intent_id_and_does_not_raise.yml | 512 ++++++++++
.../captures_the_payment.yml | 905 ++++++++++++++++++
...s_payment_intent_id_and_does_not_raise.yml | 512 ++++++++++
.../from_Visa/captures_the_payment.yml | 905 ++++++++++++++++++
...s_payment_intent_id_and_does_not_raise.yml | 512 ++++++++++
.../from_Visa_debit_/captures_the_payment.yml | 905 ++++++++++++++++++
...s_payment_intent_id_and_does_not_raise.yml | 512 ++++++++++
...t_intent_last_payment_error_as_message.yml | 70 +-
...t_intent_last_payment_error_as_message.yml | 70 +-
...t_intent_last_payment_error_as_message.yml | 70 +-
...t_intent_last_payment_error_as_message.yml | 70 +-
...t_intent_last_payment_error_as_message.yml | 70 +-
...t_intent_last_payment_error_as_message.yml | 70 +-
...t_intent_last_payment_error_as_message.yml | 70 +-
...t_intent_last_payment_error_as_message.yml | 70 +-
.../captures_the_payment.yml | 116 +--
...s_payment_intent_id_and_does_not_raise.yml | 58 +-
.../captures_the_payment.yml | 116 +--
...s_payment_intent_id_and_does_not_raise.yml | 58 +-
.../from_Diners_Club/captures_the_payment.yml | 116 +--
...s_payment_intent_id_and_does_not_raise.yml | 58 +-
.../captures_the_payment.yml | 116 +--
...s_payment_intent_id_and_does_not_raise.yml | 58 +-
.../from_Discover/captures_the_payment.yml | 116 +--
...s_payment_intent_id_and_does_not_raise.yml | 58 +-
.../captures_the_payment.yml | 116 +--
...s_payment_intent_id_and_does_not_raise.yml | 58 +-
.../from_JCB/captures_the_payment.yml | 116 +--
...s_payment_intent_id_and_does_not_raise.yml | 58 +-
.../from_Mastercard/captures_the_payment.yml | 116 +--
...s_payment_intent_id_and_does_not_raise.yml | 58 +-
.../captures_the_payment.yml | 116 +--
...s_payment_intent_id_and_does_not_raise.yml | 58 +-
.../captures_the_payment.yml | 116 +--
...s_payment_intent_id_and_does_not_raise.yml | 58 +-
.../captures_the_payment.yml | 116 +--
...s_payment_intent_id_and_does_not_raise.yml | 58 +-
.../from_UnionPay/captures_the_payment.yml | 116 +--
...s_payment_intent_id_and_does_not_raise.yml | 58 +-
.../captures_the_payment.yml | 116 +--
...s_payment_intent_id_and_does_not_raise.yml | 58 +-
.../from_Visa/captures_the_payment.yml | 116 +--
...s_payment_intent_id_and_does_not_raise.yml | 58 +-
.../from_Visa_debit_/captures_the_payment.yml | 116 +--
...s_payment_intent_id_and_does_not_raise.yml | 58 +-
.../stripe/payment_intent_validator_spec.rb | 381 +++++---
77 files changed, 28163 insertions(+), 1697 deletions(-)
create mode 100644 spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_invalid/invalid_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Exceeding_velocity_limit_decline/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml
create mode 100644 spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_invalid/invalid_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Expired_card_decline/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml
create mode 100644 spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_invalid/invalid_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Generic_decline/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml
create mode 100644 spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_invalid/invalid_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Incorrect_CVC_decline/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml
create mode 100644 spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_invalid/invalid_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Insufficient_funds_decline/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml
create mode 100644 spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_invalid/invalid_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Lost_card_decline/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml
create mode 100644 spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_invalid/invalid_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Processing_error_decline/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml
create mode 100644 spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_invalid/invalid_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Stolen_card_decline/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml
create mode 100644 spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_American_Express/captures_the_payment.yml
create mode 100644 spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_American_Express/returns_payment_intent_id_and_does_not_raise.yml
create mode 100644 spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_BCcard_and_DinaCard/captures_the_payment.yml
create mode 100644 spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_BCcard_and_DinaCard/returns_payment_intent_id_and_does_not_raise.yml
create mode 100644 spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Diners_Club/captures_the_payment.yml
create mode 100644 spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Diners_Club/returns_payment_intent_id_and_does_not_raise.yml
create mode 100644 spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Diners_Club_14-digit_card_/captures_the_payment.yml
create mode 100644 spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Diners_Club_14-digit_card_/returns_payment_intent_id_and_does_not_raise.yml
create mode 100644 spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Discover/captures_the_payment.yml
create mode 100644 spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Discover/returns_payment_intent_id_and_does_not_raise.yml
create mode 100644 spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Discover_debit_/captures_the_payment.yml
create mode 100644 spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Discover_debit_/returns_payment_intent_id_and_does_not_raise.yml
create mode 100644 spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_JCB/captures_the_payment.yml
create mode 100644 spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_JCB/returns_payment_intent_id_and_does_not_raise.yml
create mode 100644 spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Mastercard/captures_the_payment.yml
create mode 100644 spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Mastercard/returns_payment_intent_id_and_does_not_raise.yml
create mode 100644 spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Mastercard_2-series_/captures_the_payment.yml
create mode 100644 spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Mastercard_2-series_/returns_payment_intent_id_and_does_not_raise.yml
create mode 100644 spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Mastercard_debit_/captures_the_payment.yml
create mode 100644 spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Mastercard_debit_/returns_payment_intent_id_and_does_not_raise.yml
create mode 100644 spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Mastercard_prepaid_/captures_the_payment.yml
create mode 100644 spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Mastercard_prepaid_/returns_payment_intent_id_and_does_not_raise.yml
create mode 100644 spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_UnionPay/captures_the_payment.yml
create mode 100644 spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_UnionPay/returns_payment_intent_id_and_does_not_raise.yml
create mode 100644 spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_UnionPay_19-digit_card_/captures_the_payment.yml
create mode 100644 spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_UnionPay_19-digit_card_/returns_payment_intent_id_and_does_not_raise.yml
create mode 100644 spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Visa/captures_the_payment.yml
create mode 100644 spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Visa/returns_payment_intent_id_and_does_not_raise.yml
create mode 100644 spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Visa_debit_/captures_the_payment.yml
create mode 100644 spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Visa_debit_/returns_payment_intent_id_and_does_not_raise.yml
rename spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/{ => as_a_guest}/when_payment_intent_is_invalid/invalid_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Exceeding_velocity_limit_decline/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml (89%)
rename spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/{ => as_a_guest}/when_payment_intent_is_invalid/invalid_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Expired_card_decline/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml (89%)
rename spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/{ => as_a_guest}/when_payment_intent_is_invalid/invalid_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Generic_decline/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml (89%)
rename spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/{ => as_a_guest}/when_payment_intent_is_invalid/invalid_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Incorrect_CVC_decline/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml (89%)
rename spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/{ => as_a_guest}/when_payment_intent_is_invalid/invalid_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Insufficient_funds_decline/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml (89%)
rename spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/{ => as_a_guest}/when_payment_intent_is_invalid/invalid_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Lost_card_decline/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml (89%)
rename spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/{ => as_a_guest}/when_payment_intent_is_invalid/invalid_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Processing_error_decline/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml (89%)
rename spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/{ => as_a_guest}/when_payment_intent_is_invalid/invalid_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Stolen_card_decline/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml (89%)
rename spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/{ => as_a_guest}/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_American_Express/captures_the_payment.yml (88%)
rename spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/{ => as_a_guest}/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_American_Express/returns_payment_intent_id_and_does_not_raise.yml (88%)
rename spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/{ => as_a_guest}/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_BCcard_and_DinaCard/captures_the_payment.yml (88%)
rename spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/{ => as_a_guest}/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_BCcard_and_DinaCard/returns_payment_intent_id_and_does_not_raise.yml (88%)
rename spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/{ => as_a_guest}/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Diners_Club/captures_the_payment.yml (88%)
rename spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/{ => as_a_guest}/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Diners_Club/returns_payment_intent_id_and_does_not_raise.yml (88%)
rename spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/{ => as_a_guest}/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Diners_Club_14-digit_card_/captures_the_payment.yml (88%)
rename spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/{ => as_a_guest}/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Diners_Club_14-digit_card_/returns_payment_intent_id_and_does_not_raise.yml (88%)
rename spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/{ => as_a_guest}/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Discover/captures_the_payment.yml (88%)
rename spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/{ => as_a_guest}/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Discover/returns_payment_intent_id_and_does_not_raise.yml (88%)
rename spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/{ => as_a_guest}/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Discover_debit_/captures_the_payment.yml (88%)
rename spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/{ => as_a_guest}/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Discover_debit_/returns_payment_intent_id_and_does_not_raise.yml (88%)
rename spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/{ => as_a_guest}/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_JCB/captures_the_payment.yml (88%)
rename spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/{ => as_a_guest}/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_JCB/returns_payment_intent_id_and_does_not_raise.yml (88%)
rename spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/{ => as_a_guest}/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Mastercard/captures_the_payment.yml (88%)
rename spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/{ => as_a_guest}/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Mastercard/returns_payment_intent_id_and_does_not_raise.yml (88%)
rename spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/{ => as_a_guest}/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Mastercard_2-series_/captures_the_payment.yml (88%)
rename spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/{ => as_a_guest}/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Mastercard_2-series_/returns_payment_intent_id_and_does_not_raise.yml (88%)
rename spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/{ => as_a_guest}/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Mastercard_debit_/captures_the_payment.yml (88%)
rename spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/{ => as_a_guest}/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Mastercard_debit_/returns_payment_intent_id_and_does_not_raise.yml (88%)
rename spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/{ => as_a_guest}/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Mastercard_prepaid_/captures_the_payment.yml (88%)
rename spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/{ => as_a_guest}/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Mastercard_prepaid_/returns_payment_intent_id_and_does_not_raise.yml (88%)
rename spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/{ => as_a_guest}/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_UnionPay/captures_the_payment.yml (88%)
rename spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/{ => as_a_guest}/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_UnionPay/returns_payment_intent_id_and_does_not_raise.yml (88%)
rename spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/{ => as_a_guest}/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_UnionPay_19-digit_card_/captures_the_payment.yml (88%)
rename spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/{ => as_a_guest}/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_UnionPay_19-digit_card_/returns_payment_intent_id_and_does_not_raise.yml (88%)
rename spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/{ => as_a_guest}/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Visa/captures_the_payment.yml (88%)
rename spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/{ => as_a_guest}/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Visa/returns_payment_intent_id_and_does_not_raise.yml (88%)
rename spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/{ => as_a_guest}/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Visa_debit_/captures_the_payment.yml (88%)
rename spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/{ => as_a_guest}/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Visa_debit_/returns_payment_intent_id_and_does_not_raise.yml (88%)
diff --git a/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_invalid/invalid_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Exceeding_velocity_limit_decline/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml b/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_invalid/invalid_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Exceeding_velocity_limit_decline/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml
new file mode 100644
index 0000000000..a457dd85fe
--- /dev/null
+++ b/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_invalid/invalid_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Exceeding_velocity_limit_decline/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml
@@ -0,0 +1,632 @@
+---
+http_interactions:
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_methods
+ body:
+ encoding: UTF-8
+ string: type=card&card[number]=4000000000006975&card[exp_month]=12&card[exp_year]=2025&card[cvc]=314
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_sojXClxhQQaFbW","request_duration_ms":394}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:22:59 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:
+ - 22e0121b-31af-4767-b4ae-cd488f756d92
+ Original-Request:
+ - req_rLIXRkYVBfZDQW
+ 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_rLIXRkYVBfZDQW
+ 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_1P8hR9KuuB1fWySnujBh02U7",
+ "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": "WoxwxVPUPcg0EjXW",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "6975",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1713871379,
+ "customer": null,
+ "livemode": false,
+ "metadata": {},
+ "type": "card"
+ }
+ recorded_at: Tue, 23 Apr 2024 11:22:59 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:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_rLIXRkYVBfZDQW","request_duration_ms":453}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:22:59 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:
+ - 78275c47-0297-4c0e-a239-98563992887d
+ Original-Request:
+ - req_GVnMFgqWxAysaQ
+ 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_GVnMFgqWxAysaQ
+ 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_PyekV1ShGBjY8G",
+ "object": "customer",
+ "address": null,
+ "balance": 0,
+ "created": 1713871379,
+ "currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": null,
+ "discount": null,
+ "email": "applecustomer@example.com",
+ "invoice_prefix": "84F0FD2D",
+ "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: Tue, 23 Apr 2024 11:22:59 GMT
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_intents
+ body:
+ encoding: UTF-8
+ string: amount=100¤cy=eur&payment_method=pm_1P8hR9KuuB1fWySnujBh02U7&payment_method_types[0]=card&capture_method=manual&customer=cus_PyekV1ShGBjY8G&setup_future_usage=off_session
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_GVnMFgqWxAysaQ","request_duration_ms":429}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:23:00 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1368'
+ 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_intents; 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:
+ - 162743d2-74b2-4292-a1ee-0bc2bb6a4801
+ Original-Request:
+ - req_zlPjMc54Tkbu9m
+ 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_zlPjMc54Tkbu9m
+ 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": "pi_3P8hR9KuuB1fWySn1nJd2Z0s",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 0,
+ "amount_details": {
+ "tip": {}
+ },
+ "amount_received": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871379,
+ "currency": "eur",
+ "customer": "cus_PyekV1ShGBjY8G",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": null,
+ "latest_charge": null,
+ "livemode": false,
+ "metadata": {},
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": "pm_1P8hR9KuuB1fWySnujBh02U7",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "requires_confirmation",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ recorded_at: Tue, 23 Apr 2024 11:23:00 GMT
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_intents/pi_3P8hR9KuuB1fWySn1nJd2Z0s/confirm
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_zlPjMc54Tkbu9m","request_duration_ms":487}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-User-Agent:
+ - ""
+ Accept-Encoding:
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
+ Accept:
+ - "*/*"
+ response:
+ status:
+ code: 402
+ message: Payment Required
+ headers:
+ Server:
+ - nginx
+ Date:
+ - Tue, 23 Apr 2024 11:23:01 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '5051'
+ 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_intents%2F%3Aintent%2Fconfirm;
+ 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:
+ - 5a61ef34-70b9-4d94-a0d7-47616a39b2b4
+ Original-Request:
+ - req_fyMzG745GeHI6Y
+ 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_fyMzG745GeHI6Y
+ 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: |
+ {
+ "error": {
+ "charge": "ch_3P8hR9KuuB1fWySn1n33UgF4",
+ "code": "card_declined",
+ "decline_code": "card_velocity_exceeded",
+ "doc_url": "https://stripe.com/docs/error-codes/card-declined",
+ "message": "Your card was declined for making repeated attempts too frequently or exceeding its amount limit.",
+ "payment_intent": {
+ "id": "pi_3P8hR9KuuB1fWySn1nJd2Z0s",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 0,
+ "amount_details": {
+ "tip": {
+ }
+ },
+ "amount_received": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871379,
+ "currency": "eur",
+ "customer": "cus_PyekV1ShGBjY8G",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": {
+ "charge": "ch_3P8hR9KuuB1fWySn1n33UgF4",
+ "code": "card_declined",
+ "decline_code": "card_velocity_exceeded",
+ "doc_url": "https://stripe.com/docs/error-codes/card-declined",
+ "message": "Your card was declined for making repeated attempts too frequently or exceeding its amount limit.",
+ "payment_method": {
+ "id": "pm_1P8hR9KuuB1fWySnujBh02U7",
+ "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": "WoxwxVPUPcg0EjXW",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "6975",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1713871379,
+ "customer": null,
+ "livemode": false,
+ "metadata": {
+ },
+ "type": "card"
+ },
+ "type": "card_error"
+ },
+ "latest_charge": "ch_3P8hR9KuuB1fWySn1n33UgF4",
+ "livemode": false,
+ "metadata": {
+ },
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": null,
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "requires_payment_method",
+ "transfer_data": null,
+ "transfer_group": null
+ },
+ "payment_method": {
+ "id": "pm_1P8hR9KuuB1fWySnujBh02U7",
+ "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": "WoxwxVPUPcg0EjXW",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "6975",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1713871379,
+ "customer": null,
+ "livemode": false,
+ "metadata": {
+ },
+ "type": "card"
+ },
+ "request_log_url": "https://dashboard.stripe.com/test/logs/req_fyMzG745GeHI6Y?t=1713871380",
+ "type": "card_error"
+ }
+ }
+ recorded_at: Tue, 23 Apr 2024 11:23:01 GMT
+recorded_with: VCR 6.2.0
diff --git a/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_invalid/invalid_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Expired_card_decline/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml b/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_invalid/invalid_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Expired_card_decline/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml
new file mode 100644
index 0000000000..077dc39ebc
--- /dev/null
+++ b/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_invalid/invalid_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Expired_card_decline/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml
@@ -0,0 +1,632 @@
+---
+http_interactions:
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_methods
+ body:
+ encoding: UTF-8
+ string: type=card&card[number]=4000000000000069&card[exp_month]=12&card[exp_year]=2025&card[cvc]=314
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_M2EjGTJOmFPvjA","request_duration_ms":413}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:22:51 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:
+ - 178dad88-b557-4875-bbfa-d9ecfdfb98b5
+ Original-Request:
+ - req_bqKC4w4oOMZvSc
+ 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_bqKC4w4oOMZvSc
+ 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_1P8hR1KuuB1fWySnbxi4nn24",
+ "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": "qpQikrTL7IyNA2rE",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "0069",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1713871371,
+ "customer": null,
+ "livemode": false,
+ "metadata": {},
+ "type": "card"
+ }
+ recorded_at: Tue, 23 Apr 2024 11:22:51 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:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_bqKC4w4oOMZvSc","request_duration_ms":533}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:22:52 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:
+ - 5835fb77-1637-4a76-ad9d-792b3db11f50
+ Original-Request:
+ - req_SfQyNVeNfePrtc
+ 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_SfQyNVeNfePrtc
+ 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_PyekuTW9G8teWh",
+ "object": "customer",
+ "address": null,
+ "balance": 0,
+ "created": 1713871371,
+ "currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": null,
+ "discount": null,
+ "email": "applecustomer@example.com",
+ "invoice_prefix": "0A1B36ED",
+ "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: Tue, 23 Apr 2024 11:22:52 GMT
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_intents
+ body:
+ encoding: UTF-8
+ string: amount=100¤cy=eur&payment_method=pm_1P8hR1KuuB1fWySnbxi4nn24&payment_method_types[0]=card&capture_method=manual&customer=cus_PyekuTW9G8teWh&setup_future_usage=off_session
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_SfQyNVeNfePrtc","request_duration_ms":509}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:22:52 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1368'
+ 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_intents; 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:
+ - 0a884fa9-98f8-4aa7-baaf-0c03ef7042ea
+ Original-Request:
+ - req_YNJjarvaZJsYcl
+ 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_YNJjarvaZJsYcl
+ 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": "pi_3P8hR2KuuB1fWySn2lcIMkzA",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 0,
+ "amount_details": {
+ "tip": {}
+ },
+ "amount_received": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871372,
+ "currency": "eur",
+ "customer": "cus_PyekuTW9G8teWh",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": null,
+ "latest_charge": null,
+ "livemode": false,
+ "metadata": {},
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": "pm_1P8hR1KuuB1fWySnbxi4nn24",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "requires_confirmation",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ recorded_at: Tue, 23 Apr 2024 11:22:52 GMT
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_intents/pi_3P8hR2KuuB1fWySn2lcIMkzA/confirm
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_YNJjarvaZJsYcl","request_duration_ms":510}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-User-Agent:
+ - ""
+ Accept-Encoding:
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
+ Accept:
+ - "*/*"
+ response:
+ status:
+ code: 402
+ message: Payment Required
+ headers:
+ Server:
+ - nginx
+ Date:
+ - Tue, 23 Apr 2024 11:22:53 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '4857'
+ 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_intents%2F%3Aintent%2Fconfirm;
+ 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:
+ - f6345948-00a4-4462-a7ad-6b2c14710441
+ Original-Request:
+ - req_a226IErp01tmAg
+ 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_a226IErp01tmAg
+ 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: |
+ {
+ "error": {
+ "charge": "ch_3P8hR2KuuB1fWySn2Q4UrurZ",
+ "code": "expired_card",
+ "doc_url": "https://stripe.com/docs/error-codes/expired-card",
+ "message": "Your card has expired.",
+ "param": "exp_month",
+ "payment_intent": {
+ "id": "pi_3P8hR2KuuB1fWySn2lcIMkzA",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 0,
+ "amount_details": {
+ "tip": {
+ }
+ },
+ "amount_received": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871372,
+ "currency": "eur",
+ "customer": "cus_PyekuTW9G8teWh",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": {
+ "charge": "ch_3P8hR2KuuB1fWySn2Q4UrurZ",
+ "code": "expired_card",
+ "doc_url": "https://stripe.com/docs/error-codes/expired-card",
+ "message": "Your card has expired.",
+ "param": "exp_month",
+ "payment_method": {
+ "id": "pm_1P8hR1KuuB1fWySnbxi4nn24",
+ "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": "qpQikrTL7IyNA2rE",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "0069",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1713871371,
+ "customer": null,
+ "livemode": false,
+ "metadata": {
+ },
+ "type": "card"
+ },
+ "type": "card_error"
+ },
+ "latest_charge": "ch_3P8hR2KuuB1fWySn2Q4UrurZ",
+ "livemode": false,
+ "metadata": {
+ },
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": null,
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "requires_payment_method",
+ "transfer_data": null,
+ "transfer_group": null
+ },
+ "payment_method": {
+ "id": "pm_1P8hR1KuuB1fWySnbxi4nn24",
+ "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": "qpQikrTL7IyNA2rE",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "0069",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1713871371,
+ "customer": null,
+ "livemode": false,
+ "metadata": {
+ },
+ "type": "card"
+ },
+ "request_log_url": "https://dashboard.stripe.com/test/logs/req_a226IErp01tmAg?t=1713871372",
+ "type": "card_error"
+ }
+ }
+ recorded_at: Tue, 23 Apr 2024 11:22:53 GMT
+recorded_with: VCR 6.2.0
diff --git a/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_invalid/invalid_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Generic_decline/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml b/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_invalid/invalid_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Generic_decline/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml
new file mode 100644
index 0000000000..c1529614fc
--- /dev/null
+++ b/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_invalid/invalid_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Generic_decline/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml
@@ -0,0 +1,632 @@
+---
+http_interactions:
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_methods
+ body:
+ encoding: UTF-8
+ string: type=card&card[number]=4000000000000002&card[exp_month]=12&card[exp_year]=2025&card[cvc]=314
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_jw6WIU0GBeVnT2","request_duration_ms":406}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:22:41 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:
+ - b7635034-0538-409f-8de4-029495aa738e
+ Original-Request:
+ - req_17rocy9XEkwQk7
+ 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_17rocy9XEkwQk7
+ 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_1P8hQrKuuB1fWySnoJXDVbMV",
+ "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": "IKC2ubfpSLuZKsVs",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "0002",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1713871361,
+ "customer": null,
+ "livemode": false,
+ "metadata": {},
+ "type": "card"
+ }
+ recorded_at: Tue, 23 Apr 2024 11:22:41 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:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_17rocy9XEkwQk7","request_duration_ms":445}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:22:41 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:
+ - ac92f435-bad8-453d-a832-6b6b01ea665d
+ Original-Request:
+ - req_hmFNjhNpTLnsD2
+ 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_hmFNjhNpTLnsD2
+ 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_Pyek1w8BYYKnV9",
+ "object": "customer",
+ "address": null,
+ "balance": 0,
+ "created": 1713871361,
+ "currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": null,
+ "discount": null,
+ "email": "applecustomer@example.com",
+ "invoice_prefix": "8824622E",
+ "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: Tue, 23 Apr 2024 11:22:41 GMT
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_intents
+ body:
+ encoding: UTF-8
+ string: amount=100¤cy=eur&payment_method=pm_1P8hQrKuuB1fWySnoJXDVbMV&payment_method_types[0]=card&capture_method=manual&customer=cus_Pyek1w8BYYKnV9&setup_future_usage=off_session
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_hmFNjhNpTLnsD2","request_duration_ms":503}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:22:42 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1368'
+ 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_intents; 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:
+ - 24277f63-f991-44e9-a545-04e748071bf9
+ Original-Request:
+ - req_9auOceZoxHo5tE
+ 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_9auOceZoxHo5tE
+ 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": "pi_3P8hQsKuuB1fWySn0dRsCAlk",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 0,
+ "amount_details": {
+ "tip": {}
+ },
+ "amount_received": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871362,
+ "currency": "eur",
+ "customer": "cus_Pyek1w8BYYKnV9",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": null,
+ "latest_charge": null,
+ "livemode": false,
+ "metadata": {},
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": "pm_1P8hQrKuuB1fWySnoJXDVbMV",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "requires_confirmation",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ recorded_at: Tue, 23 Apr 2024 11:22:42 GMT
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_intents/pi_3P8hQsKuuB1fWySn0dRsCAlk/confirm
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_9auOceZoxHo5tE","request_duration_ms":509}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-User-Agent:
+ - ""
+ Accept-Encoding:
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
+ Accept:
+ - "*/*"
+ response:
+ status:
+ code: 402
+ message: Payment Required
+ headers:
+ Server:
+ - nginx
+ Date:
+ - Tue, 23 Apr 2024 11:22:43 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '4889'
+ 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_intents%2F%3Aintent%2Fconfirm;
+ 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:
+ - df30ad1c-4cf2-4fef-a887-03a948f403da
+ Original-Request:
+ - req_d5nQ4wPD4E7f6U
+ 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_d5nQ4wPD4E7f6U
+ 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: |
+ {
+ "error": {
+ "charge": "ch_3P8hQsKuuB1fWySn02qML9H0",
+ "code": "card_declined",
+ "decline_code": "generic_decline",
+ "doc_url": "https://stripe.com/docs/error-codes/card-declined",
+ "message": "Your card was declined.",
+ "payment_intent": {
+ "id": "pi_3P8hQsKuuB1fWySn0dRsCAlk",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 0,
+ "amount_details": {
+ "tip": {
+ }
+ },
+ "amount_received": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871362,
+ "currency": "eur",
+ "customer": "cus_Pyek1w8BYYKnV9",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": {
+ "charge": "ch_3P8hQsKuuB1fWySn02qML9H0",
+ "code": "card_declined",
+ "decline_code": "generic_decline",
+ "doc_url": "https://stripe.com/docs/error-codes/card-declined",
+ "message": "Your card was declined.",
+ "payment_method": {
+ "id": "pm_1P8hQrKuuB1fWySnoJXDVbMV",
+ "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": "IKC2ubfpSLuZKsVs",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "0002",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1713871361,
+ "customer": null,
+ "livemode": false,
+ "metadata": {
+ },
+ "type": "card"
+ },
+ "type": "card_error"
+ },
+ "latest_charge": "ch_3P8hQsKuuB1fWySn02qML9H0",
+ "livemode": false,
+ "metadata": {
+ },
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": null,
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "requires_payment_method",
+ "transfer_data": null,
+ "transfer_group": null
+ },
+ "payment_method": {
+ "id": "pm_1P8hQrKuuB1fWySnoJXDVbMV",
+ "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": "IKC2ubfpSLuZKsVs",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "0002",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1713871361,
+ "customer": null,
+ "livemode": false,
+ "metadata": {
+ },
+ "type": "card"
+ },
+ "request_log_url": "https://dashboard.stripe.com/test/logs/req_d5nQ4wPD4E7f6U?t=1713871362",
+ "type": "card_error"
+ }
+ }
+ recorded_at: Tue, 23 Apr 2024 11:22:43 GMT
+recorded_with: VCR 6.2.0
diff --git a/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_invalid/invalid_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Incorrect_CVC_decline/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml b/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_invalid/invalid_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Incorrect_CVC_decline/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml
new file mode 100644
index 0000000000..20386adda1
--- /dev/null
+++ b/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_invalid/invalid_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Incorrect_CVC_decline/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml
@@ -0,0 +1,632 @@
+---
+http_interactions:
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_methods
+ body:
+ encoding: UTF-8
+ string: type=card&card[number]=4000000000000127&card[exp_month]=12&card[exp_year]=2025&card[cvc]=314
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_YNJjarvaZJsYcl","request_duration_ms":510}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:22:54 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:
+ - 5be022b2-592a-457f-823e-4222727e3646
+ Original-Request:
+ - req_SogiZHLOYlhFRn
+ 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_SogiZHLOYlhFRn
+ 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_1P8hR3KuuB1fWySnQyTSkSEY",
+ "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": "eWmxEL5j3bNdPnK5",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "0127",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1713871374,
+ "customer": null,
+ "livemode": false,
+ "metadata": {},
+ "type": "card"
+ }
+ recorded_at: Tue, 23 Apr 2024 11:22:54 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:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_SogiZHLOYlhFRn","request_duration_ms":443}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:22:54 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:
+ - d5888172-b4f9-4931-804d-a9e0743066f3
+ Original-Request:
+ - req_6VS5p3Zquah6Lb
+ 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_6VS5p3Zquah6Lb
+ 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_Pyek0DFHdMA6i4",
+ "object": "customer",
+ "address": null,
+ "balance": 0,
+ "created": 1713871374,
+ "currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": null,
+ "discount": null,
+ "email": "applecustomer@example.com",
+ "invoice_prefix": "95A6066A",
+ "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: Tue, 23 Apr 2024 11:22:54 GMT
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_intents
+ body:
+ encoding: UTF-8
+ string: amount=100¤cy=eur&payment_method=pm_1P8hR3KuuB1fWySnQyTSkSEY&payment_method_types[0]=card&capture_method=manual&customer=cus_Pyek0DFHdMA6i4&setup_future_usage=off_session
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_6VS5p3Zquah6Lb","request_duration_ms":480}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:22:55 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1368'
+ 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_intents; 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:
+ - cf247e80-4e3b-444d-b26a-74c85e463dae
+ Original-Request:
+ - req_XZhN6FLRgLDom3
+ 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_XZhN6FLRgLDom3
+ 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": "pi_3P8hR4KuuB1fWySn1FYBXndE",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 0,
+ "amount_details": {
+ "tip": {}
+ },
+ "amount_received": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871374,
+ "currency": "eur",
+ "customer": "cus_Pyek0DFHdMA6i4",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": null,
+ "latest_charge": null,
+ "livemode": false,
+ "metadata": {},
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": "pm_1P8hR3KuuB1fWySnQyTSkSEY",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "requires_confirmation",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ recorded_at: Tue, 23 Apr 2024 11:22:55 GMT
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_intents/pi_3P8hR4KuuB1fWySn1FYBXndE/confirm
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_XZhN6FLRgLDom3","request_duration_ms":509}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-User-Agent:
+ - ""
+ Accept-Encoding:
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
+ Accept:
+ - "*/*"
+ response:
+ status:
+ code: 402
+ message: Payment Required
+ headers:
+ Server:
+ - nginx
+ Date:
+ - Tue, 23 Apr 2024 11:22:56 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '4883'
+ 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_intents%2F%3Aintent%2Fconfirm;
+ 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:
+ - 856d1ab8-1e63-4ee5-8037-4b8ff021ddda
+ Original-Request:
+ - req_FXCmu1rrYkWjml
+ 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_FXCmu1rrYkWjml
+ 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: |
+ {
+ "error": {
+ "charge": "ch_3P8hR4KuuB1fWySn1ONLa92O",
+ "code": "incorrect_cvc",
+ "doc_url": "https://stripe.com/docs/error-codes/incorrect-cvc",
+ "message": "Your card's security code is incorrect.",
+ "param": "cvc",
+ "payment_intent": {
+ "id": "pi_3P8hR4KuuB1fWySn1FYBXndE",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 0,
+ "amount_details": {
+ "tip": {
+ }
+ },
+ "amount_received": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871374,
+ "currency": "eur",
+ "customer": "cus_Pyek0DFHdMA6i4",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": {
+ "charge": "ch_3P8hR4KuuB1fWySn1ONLa92O",
+ "code": "incorrect_cvc",
+ "doc_url": "https://stripe.com/docs/error-codes/incorrect-cvc",
+ "message": "Your card's security code is incorrect.",
+ "param": "cvc",
+ "payment_method": {
+ "id": "pm_1P8hR3KuuB1fWySnQyTSkSEY",
+ "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": "fail"
+ },
+ "country": "US",
+ "display_brand": "visa",
+ "exp_month": 12,
+ "exp_year": 2025,
+ "fingerprint": "eWmxEL5j3bNdPnK5",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "0127",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1713871374,
+ "customer": null,
+ "livemode": false,
+ "metadata": {
+ },
+ "type": "card"
+ },
+ "type": "card_error"
+ },
+ "latest_charge": "ch_3P8hR4KuuB1fWySn1ONLa92O",
+ "livemode": false,
+ "metadata": {
+ },
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": null,
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "requires_payment_method",
+ "transfer_data": null,
+ "transfer_group": null
+ },
+ "payment_method": {
+ "id": "pm_1P8hR3KuuB1fWySnQyTSkSEY",
+ "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": "fail"
+ },
+ "country": "US",
+ "display_brand": "visa",
+ "exp_month": 12,
+ "exp_year": 2025,
+ "fingerprint": "eWmxEL5j3bNdPnK5",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "0127",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1713871374,
+ "customer": null,
+ "livemode": false,
+ "metadata": {
+ },
+ "type": "card"
+ },
+ "request_log_url": "https://dashboard.stripe.com/test/logs/req_FXCmu1rrYkWjml?t=1713871375",
+ "type": "card_error"
+ }
+ }
+ recorded_at: Tue, 23 Apr 2024 11:22:56 GMT
+recorded_with: VCR 6.2.0
diff --git a/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_invalid/invalid_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Insufficient_funds_decline/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml b/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_invalid/invalid_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Insufficient_funds_decline/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml
new file mode 100644
index 0000000000..23a3cf8bfa
--- /dev/null
+++ b/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_invalid/invalid_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Insufficient_funds_decline/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml
@@ -0,0 +1,632 @@
+---
+http_interactions:
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_methods
+ body:
+ encoding: UTF-8
+ string: type=card&card[number]=4000000000009995&card[exp_month]=12&card[exp_year]=2025&card[cvc]=314
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_9auOceZoxHo5tE","request_duration_ms":509}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:22:43 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:
+ - efb26086-55ca-4fed-96f9-712e811983b5
+ Original-Request:
+ - req_JFuZ8mpCSSE39O
+ 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_JFuZ8mpCSSE39O
+ 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_1P8hQtKuuB1fWySnkWg8Yi12",
+ "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": "O0I0muUGQBJy3p73",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "9995",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1713871363,
+ "customer": null,
+ "livemode": false,
+ "metadata": {},
+ "type": "card"
+ }
+ recorded_at: Tue, 23 Apr 2024 11:22:43 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:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_JFuZ8mpCSSE39O","request_duration_ms":485}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:22:44 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:
+ - d6655148-6ed2-47b6-ba01-38b8bb4a198d
+ Original-Request:
+ - req_f8LoVSm6ehzIOQ
+ 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_f8LoVSm6ehzIOQ
+ 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_Pyekp6fXoSyo4f",
+ "object": "customer",
+ "address": null,
+ "balance": 0,
+ "created": 1713871364,
+ "currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": null,
+ "discount": null,
+ "email": "applecustomer@example.com",
+ "invoice_prefix": "B923F253",
+ "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: Tue, 23 Apr 2024 11:22:44 GMT
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_intents
+ body:
+ encoding: UTF-8
+ string: amount=100¤cy=eur&payment_method=pm_1P8hQtKuuB1fWySnkWg8Yi12&payment_method_types[0]=card&capture_method=manual&customer=cus_Pyekp6fXoSyo4f&setup_future_usage=off_session
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_f8LoVSm6ehzIOQ","request_duration_ms":509}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:22:44 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1368'
+ 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_intents; 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:
+ - d797d3c9-2865-44b3-bf91-76176a96bf24
+ Original-Request:
+ - req_7nTlJ3fHIjzIPN
+ 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_7nTlJ3fHIjzIPN
+ 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": "pi_3P8hQuKuuB1fWySn2YcCudO4",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 0,
+ "amount_details": {
+ "tip": {}
+ },
+ "amount_received": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871364,
+ "currency": "eur",
+ "customer": "cus_Pyekp6fXoSyo4f",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": null,
+ "latest_charge": null,
+ "livemode": false,
+ "metadata": {},
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": "pm_1P8hQtKuuB1fWySnkWg8Yi12",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "requires_confirmation",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ recorded_at: Tue, 23 Apr 2024 11:22:44 GMT
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_intents/pi_3P8hQuKuuB1fWySn2YcCudO4/confirm
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_7nTlJ3fHIjzIPN","request_duration_ms":510}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-User-Agent:
+ - ""
+ Accept-Encoding:
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
+ Accept:
+ - "*/*"
+ response:
+ status:
+ code: 402
+ message: Payment Required
+ headers:
+ Server:
+ - nginx
+ Date:
+ - Tue, 23 Apr 2024 11:22:45 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '4915'
+ 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_intents%2F%3Aintent%2Fconfirm;
+ 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:
+ - f0b1f823-2b28-4b51-829e-030893bb1ce9
+ Original-Request:
+ - req_Ua7pnZevBRWYWv
+ 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_Ua7pnZevBRWYWv
+ 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: |
+ {
+ "error": {
+ "charge": "ch_3P8hQuKuuB1fWySn2WZGczKx",
+ "code": "card_declined",
+ "decline_code": "insufficient_funds",
+ "doc_url": "https://stripe.com/docs/error-codes/card-declined",
+ "message": "Your card has insufficient funds.",
+ "payment_intent": {
+ "id": "pi_3P8hQuKuuB1fWySn2YcCudO4",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 0,
+ "amount_details": {
+ "tip": {
+ }
+ },
+ "amount_received": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871364,
+ "currency": "eur",
+ "customer": "cus_Pyekp6fXoSyo4f",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": {
+ "charge": "ch_3P8hQuKuuB1fWySn2WZGczKx",
+ "code": "card_declined",
+ "decline_code": "insufficient_funds",
+ "doc_url": "https://stripe.com/docs/error-codes/card-declined",
+ "message": "Your card has insufficient funds.",
+ "payment_method": {
+ "id": "pm_1P8hQtKuuB1fWySnkWg8Yi12",
+ "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": "O0I0muUGQBJy3p73",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "9995",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1713871363,
+ "customer": null,
+ "livemode": false,
+ "metadata": {
+ },
+ "type": "card"
+ },
+ "type": "card_error"
+ },
+ "latest_charge": "ch_3P8hQuKuuB1fWySn2WZGczKx",
+ "livemode": false,
+ "metadata": {
+ },
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": null,
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "requires_payment_method",
+ "transfer_data": null,
+ "transfer_group": null
+ },
+ "payment_method": {
+ "id": "pm_1P8hQtKuuB1fWySnkWg8Yi12",
+ "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": "O0I0muUGQBJy3p73",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "9995",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1713871363,
+ "customer": null,
+ "livemode": false,
+ "metadata": {
+ },
+ "type": "card"
+ },
+ "request_log_url": "https://dashboard.stripe.com/test/logs/req_Ua7pnZevBRWYWv?t=1713871364",
+ "type": "card_error"
+ }
+ }
+ recorded_at: Tue, 23 Apr 2024 11:22:45 GMT
+recorded_with: VCR 6.2.0
diff --git a/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_invalid/invalid_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Lost_card_decline/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml b/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_invalid/invalid_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Lost_card_decline/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml
new file mode 100644
index 0000000000..ace8a4fe2d
--- /dev/null
+++ b/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_invalid/invalid_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Lost_card_decline/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml
@@ -0,0 +1,632 @@
+---
+http_interactions:
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_methods
+ body:
+ encoding: UTF-8
+ string: type=card&card[number]=4000000000009987&card[exp_month]=12&card[exp_year]=2025&card[cvc]=314
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_7nTlJ3fHIjzIPN","request_duration_ms":510}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:22:46 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:
+ - dd89d6d5-1928-425b-9e41-0d0ddbaabd66
+ Original-Request:
+ - req_qPbK8GWnufeusA
+ 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_qPbK8GWnufeusA
+ 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_1P8hQwKuuB1fWySnnXjxt2Q5",
+ "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": "hMDekBwrnWL1oLxe",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "9987",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1713871366,
+ "customer": null,
+ "livemode": false,
+ "metadata": {},
+ "type": "card"
+ }
+ recorded_at: Tue, 23 Apr 2024 11:22:46 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:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_qPbK8GWnufeusA","request_duration_ms":446}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:22:46 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:
+ - 8fa0ce75-bb64-4ed0-be30-0937ff2b8d3e
+ Original-Request:
+ - req_29DQjMmwvNd48X
+ 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_29DQjMmwvNd48X
+ 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_PyekDsErN9ufoM",
+ "object": "customer",
+ "address": null,
+ "balance": 0,
+ "created": 1713871366,
+ "currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": null,
+ "discount": null,
+ "email": "applecustomer@example.com",
+ "invoice_prefix": "1AB5687C",
+ "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: Tue, 23 Apr 2024 11:22:46 GMT
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_intents
+ body:
+ encoding: UTF-8
+ string: amount=100¤cy=eur&payment_method=pm_1P8hQwKuuB1fWySnnXjxt2Q5&payment_method_types[0]=card&capture_method=manual&customer=cus_PyekDsErN9ufoM&setup_future_usage=off_session
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_29DQjMmwvNd48X","request_duration_ms":508}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:22:47 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1368'
+ 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_intents; 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:
+ - c99be1bc-4a15-4ef0-9097-fd46b3b284f1
+ Original-Request:
+ - req_aGW6Vn9eCXjmi7
+ 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_aGW6Vn9eCXjmi7
+ 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": "pi_3P8hQxKuuB1fWySn1iZusZS1",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 0,
+ "amount_details": {
+ "tip": {}
+ },
+ "amount_received": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871367,
+ "currency": "eur",
+ "customer": "cus_PyekDsErN9ufoM",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": null,
+ "latest_charge": null,
+ "livemode": false,
+ "metadata": {},
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": "pm_1P8hQwKuuB1fWySnnXjxt2Q5",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "requires_confirmation",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ recorded_at: Tue, 23 Apr 2024 11:22:47 GMT
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_intents/pi_3P8hQxKuuB1fWySn1iZusZS1/confirm
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_aGW6Vn9eCXjmi7","request_duration_ms":498}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-User-Agent:
+ - ""
+ Accept-Encoding:
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
+ Accept:
+ - "*/*"
+ response:
+ status:
+ code: 402
+ message: Payment Required
+ headers:
+ Server:
+ - nginx
+ Date:
+ - Tue, 23 Apr 2024 11:22:48 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '4877'
+ 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_intents%2F%3Aintent%2Fconfirm;
+ 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:
+ - 2ee34069-f3f4-4ff7-b5dc-51348b21ddef
+ Original-Request:
+ - req_tE5NggyuH84Bwp
+ 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_tE5NggyuH84Bwp
+ 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: |
+ {
+ "error": {
+ "charge": "ch_3P8hQxKuuB1fWySn1mkDmi3i",
+ "code": "card_declined",
+ "decline_code": "lost_card",
+ "doc_url": "https://stripe.com/docs/error-codes/card-declined",
+ "message": "Your card was declined.",
+ "payment_intent": {
+ "id": "pi_3P8hQxKuuB1fWySn1iZusZS1",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 0,
+ "amount_details": {
+ "tip": {
+ }
+ },
+ "amount_received": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871367,
+ "currency": "eur",
+ "customer": "cus_PyekDsErN9ufoM",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": {
+ "charge": "ch_3P8hQxKuuB1fWySn1mkDmi3i",
+ "code": "card_declined",
+ "decline_code": "lost_card",
+ "doc_url": "https://stripe.com/docs/error-codes/card-declined",
+ "message": "Your card was declined.",
+ "payment_method": {
+ "id": "pm_1P8hQwKuuB1fWySnnXjxt2Q5",
+ "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": "hMDekBwrnWL1oLxe",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "9987",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1713871366,
+ "customer": null,
+ "livemode": false,
+ "metadata": {
+ },
+ "type": "card"
+ },
+ "type": "card_error"
+ },
+ "latest_charge": "ch_3P8hQxKuuB1fWySn1mkDmi3i",
+ "livemode": false,
+ "metadata": {
+ },
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": null,
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "requires_payment_method",
+ "transfer_data": null,
+ "transfer_group": null
+ },
+ "payment_method": {
+ "id": "pm_1P8hQwKuuB1fWySnnXjxt2Q5",
+ "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": "hMDekBwrnWL1oLxe",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "9987",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1713871366,
+ "customer": null,
+ "livemode": false,
+ "metadata": {
+ },
+ "type": "card"
+ },
+ "request_log_url": "https://dashboard.stripe.com/test/logs/req_tE5NggyuH84Bwp?t=1713871367",
+ "type": "card_error"
+ }
+ }
+ recorded_at: Tue, 23 Apr 2024 11:22:48 GMT
+recorded_with: VCR 6.2.0
diff --git a/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_invalid/invalid_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Processing_error_decline/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml b/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_invalid/invalid_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Processing_error_decline/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml
new file mode 100644
index 0000000000..df960e5ab8
--- /dev/null
+++ b/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_invalid/invalid_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Processing_error_decline/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml
@@ -0,0 +1,630 @@
+---
+http_interactions:
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_methods
+ body:
+ encoding: UTF-8
+ string: type=card&card[number]=4000000000000119&card[exp_month]=12&card[exp_year]=2025&card[cvc]=314
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_XZhN6FLRgLDom3","request_duration_ms":509}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:22:56 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:
+ - 4fde0975-18cb-4a02-9522-870f259bb1da
+ Original-Request:
+ - req_gd1J4ZPBCCug9x
+ 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_gd1J4ZPBCCug9x
+ 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_1P8hR6KuuB1fWySnbrsC9UJ6",
+ "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": "9HWWxe4EyniQy61z",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "0119",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1713871376,
+ "customer": null,
+ "livemode": false,
+ "metadata": {},
+ "type": "card"
+ }
+ recorded_at: Tue, 23 Apr 2024 11:22:56 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:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_gd1J4ZPBCCug9x","request_duration_ms":535}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:22:57 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:
+ - d325710f-8b58-405e-9f71-bf77f88ab4b8
+ Original-Request:
+ - req_2YAwLlhn1Wwsms
+ 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_2YAwLlhn1Wwsms
+ 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_PyekmaUZEsfvMy",
+ "object": "customer",
+ "address": null,
+ "balance": 0,
+ "created": 1713871377,
+ "currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": null,
+ "discount": null,
+ "email": "applecustomer@example.com",
+ "invoice_prefix": "E9D00917",
+ "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: Tue, 23 Apr 2024 11:22:57 GMT
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_intents
+ body:
+ encoding: UTF-8
+ string: amount=100¤cy=eur&payment_method=pm_1P8hR6KuuB1fWySnbrsC9UJ6&payment_method_types[0]=card&capture_method=manual&customer=cus_PyekmaUZEsfvMy&setup_future_usage=off_session
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_2YAwLlhn1Wwsms","request_duration_ms":509}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:22:57 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1368'
+ 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_intents; 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:
+ - c9d7fb8c-89f1-4453-bf7b-8d895ae3db51
+ Original-Request:
+ - req_sojXClxhQQaFbW
+ 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_sojXClxhQQaFbW
+ 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": "pi_3P8hR7KuuB1fWySn1TR0go8r",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 0,
+ "amount_details": {
+ "tip": {}
+ },
+ "amount_received": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871377,
+ "currency": "eur",
+ "customer": "cus_PyekmaUZEsfvMy",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": null,
+ "latest_charge": null,
+ "livemode": false,
+ "metadata": {},
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": "pm_1P8hR6KuuB1fWySnbrsC9UJ6",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "requires_confirmation",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ recorded_at: Tue, 23 Apr 2024 11:22:57 GMT
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_intents/pi_3P8hR7KuuB1fWySn1TR0go8r/confirm
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_sojXClxhQQaFbW","request_duration_ms":394}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-User-Agent:
+ - ""
+ Accept-Encoding:
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
+ Accept:
+ - "*/*"
+ response:
+ status:
+ code: 402
+ message: Payment Required
+ headers:
+ Server:
+ - nginx
+ Date:
+ - Tue, 23 Apr 2024 11:22:58 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '4917'
+ 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_intents%2F%3Aintent%2Fconfirm;
+ 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:
+ - 58fced99-2bea-4f22-aeff-3c29242fc17c
+ Original-Request:
+ - req_D19RydovrPMO35
+ 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_D19RydovrPMO35
+ 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: |
+ {
+ "error": {
+ "charge": "ch_3P8hR7KuuB1fWySn1QTbIwTK",
+ "code": "processing_error",
+ "doc_url": "https://stripe.com/docs/error-codes/processing-error",
+ "message": "An error occurred while processing your card. Try again in a little bit.",
+ "payment_intent": {
+ "id": "pi_3P8hR7KuuB1fWySn1TR0go8r",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 0,
+ "amount_details": {
+ "tip": {
+ }
+ },
+ "amount_received": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871377,
+ "currency": "eur",
+ "customer": "cus_PyekmaUZEsfvMy",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": {
+ "charge": "ch_3P8hR7KuuB1fWySn1QTbIwTK",
+ "code": "processing_error",
+ "doc_url": "https://stripe.com/docs/error-codes/processing-error",
+ "message": "An error occurred while processing your card. Try again in a little bit.",
+ "payment_method": {
+ "id": "pm_1P8hR6KuuB1fWySnbrsC9UJ6",
+ "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": "9HWWxe4EyniQy61z",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "0119",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1713871376,
+ "customer": null,
+ "livemode": false,
+ "metadata": {
+ },
+ "type": "card"
+ },
+ "type": "card_error"
+ },
+ "latest_charge": "ch_3P8hR7KuuB1fWySn1QTbIwTK",
+ "livemode": false,
+ "metadata": {
+ },
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": null,
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "requires_payment_method",
+ "transfer_data": null,
+ "transfer_group": null
+ },
+ "payment_method": {
+ "id": "pm_1P8hR6KuuB1fWySnbrsC9UJ6",
+ "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": "9HWWxe4EyniQy61z",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "0119",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1713871376,
+ "customer": null,
+ "livemode": false,
+ "metadata": {
+ },
+ "type": "card"
+ },
+ "request_log_url": "https://dashboard.stripe.com/test/logs/req_D19RydovrPMO35?t=1713871377",
+ "type": "card_error"
+ }
+ }
+ recorded_at: Tue, 23 Apr 2024 11:22:58 GMT
+recorded_with: VCR 6.2.0
diff --git a/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_invalid/invalid_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Stolen_card_decline/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml b/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_invalid/invalid_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Stolen_card_decline/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml
new file mode 100644
index 0000000000..151fd5e6ce
--- /dev/null
+++ b/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_invalid/invalid_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Stolen_card_decline/raises_Stripe_error_with_payment_intent_last_payment_error_as_message.yml
@@ -0,0 +1,632 @@
+---
+http_interactions:
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_methods
+ body:
+ encoding: UTF-8
+ string: type=card&card[number]=4000000000009979&card[exp_month]=12&card[exp_year]=2025&card[cvc]=314
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_aGW6Vn9eCXjmi7","request_duration_ms":498}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:22:48 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:
+ - 517ec7db-a996-4cba-9172-f86e41046730
+ Original-Request:
+ - req_h1DaNRQAhqFgz9
+ 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_h1DaNRQAhqFgz9
+ 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_1P8hQyKuuB1fWySnCgvttCSO",
+ "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": "1pjhEFFOW1eCi1AB",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "9979",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1713871368,
+ "customer": null,
+ "livemode": false,
+ "metadata": {},
+ "type": "card"
+ }
+ recorded_at: Tue, 23 Apr 2024 11:22:48 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:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_h1DaNRQAhqFgz9","request_duration_ms":413}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:22:49 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:
+ - cb7724a0-993d-47f7-960f-f63acaac72e2
+ Original-Request:
+ - req_sIi1TlK5XDpKSt
+ 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_sIi1TlK5XDpKSt
+ 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_PyekDa34UUgaBy",
+ "object": "customer",
+ "address": null,
+ "balance": 0,
+ "created": 1713871369,
+ "currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": null,
+ "discount": null,
+ "email": "applecustomer@example.com",
+ "invoice_prefix": "542CB18D",
+ "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: Tue, 23 Apr 2024 11:22:49 GMT
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_intents
+ body:
+ encoding: UTF-8
+ string: amount=100¤cy=eur&payment_method=pm_1P8hQyKuuB1fWySnCgvttCSO&payment_method_types[0]=card&capture_method=manual&customer=cus_PyekDa34UUgaBy&setup_future_usage=off_session
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_sIi1TlK5XDpKSt","request_duration_ms":522}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:22:49 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1368'
+ 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_intents; 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:
+ - e9749b76-4a91-4707-be17-a771d0f94596
+ Original-Request:
+ - req_M2EjGTJOmFPvjA
+ 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_M2EjGTJOmFPvjA
+ 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": "pi_3P8hQzKuuB1fWySn2Tv4Uyhb",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 0,
+ "amount_details": {
+ "tip": {}
+ },
+ "amount_received": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871369,
+ "currency": "eur",
+ "customer": "cus_PyekDa34UUgaBy",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": null,
+ "latest_charge": null,
+ "livemode": false,
+ "metadata": {},
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": "pm_1P8hQyKuuB1fWySnCgvttCSO",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "requires_confirmation",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ recorded_at: Tue, 23 Apr 2024 11:22:49 GMT
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_intents/pi_3P8hQzKuuB1fWySn2Tv4Uyhb/confirm
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_M2EjGTJOmFPvjA","request_duration_ms":413}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-User-Agent:
+ - ""
+ Accept-Encoding:
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
+ Accept:
+ - "*/*"
+ response:
+ status:
+ code: 402
+ message: Payment Required
+ headers:
+ Server:
+ - nginx
+ Date:
+ - Tue, 23 Apr 2024 11:22:50 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '4881'
+ 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_intents%2F%3Aintent%2Fconfirm;
+ 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:
+ - 204e1661-6051-4cd8-a5e2-e8c923a871d0
+ Original-Request:
+ - req_SMrYdbWXABS1Ya
+ 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_SMrYdbWXABS1Ya
+ 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: |
+ {
+ "error": {
+ "charge": "ch_3P8hQzKuuB1fWySn2DGsgH8G",
+ "code": "card_declined",
+ "decline_code": "stolen_card",
+ "doc_url": "https://stripe.com/docs/error-codes/card-declined",
+ "message": "Your card was declined.",
+ "payment_intent": {
+ "id": "pi_3P8hQzKuuB1fWySn2Tv4Uyhb",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 0,
+ "amount_details": {
+ "tip": {
+ }
+ },
+ "amount_received": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871369,
+ "currency": "eur",
+ "customer": "cus_PyekDa34UUgaBy",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": {
+ "charge": "ch_3P8hQzKuuB1fWySn2DGsgH8G",
+ "code": "card_declined",
+ "decline_code": "stolen_card",
+ "doc_url": "https://stripe.com/docs/error-codes/card-declined",
+ "message": "Your card was declined.",
+ "payment_method": {
+ "id": "pm_1P8hQyKuuB1fWySnCgvttCSO",
+ "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": "1pjhEFFOW1eCi1AB",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "9979",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1713871368,
+ "customer": null,
+ "livemode": false,
+ "metadata": {
+ },
+ "type": "card"
+ },
+ "type": "card_error"
+ },
+ "latest_charge": "ch_3P8hQzKuuB1fWySn2DGsgH8G",
+ "livemode": false,
+ "metadata": {
+ },
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": null,
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "requires_payment_method",
+ "transfer_data": null,
+ "transfer_group": null
+ },
+ "payment_method": {
+ "id": "pm_1P8hQyKuuB1fWySnCgvttCSO",
+ "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": "1pjhEFFOW1eCi1AB",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "9979",
+ "networks": {
+ "available": [
+ "visa"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1713871368,
+ "customer": null,
+ "livemode": false,
+ "metadata": {
+ },
+ "type": "card"
+ },
+ "request_log_url": "https://dashboard.stripe.com/test/logs/req_SMrYdbWXABS1Ya?t=1713871370",
+ "type": "card_error"
+ }
+ }
+ recorded_at: Tue, 23 Apr 2024 11:22:51 GMT
+recorded_with: VCR 6.2.0
diff --git a/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_American_Express/captures_the_payment.yml b/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_American_Express/captures_the_payment.yml
new file mode 100644
index 0000000000..3f6c536730
--- /dev/null
+++ b/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_American_Express/captures_the_payment.yml
@@ -0,0 +1,905 @@
+---
+http_interactions:
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_methods
+ body:
+ encoding: UTF-8
+ string: type=card&card[number]=378282246310005&card[exp_month]=12&card[exp_year]=2025&card[cvc]=314
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_WWwLrQp4sVqJV4","request_duration_ms":1003}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:21:34 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1009'
+ 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:
+ - 4bd1d110-3526-486a-8c1f-e9deec2604d3
+ Original-Request:
+ - req_q3SMRET2pdEU3x
+ 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_q3SMRET2pdEU3x
+ 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_1P8hPlKuuB1fWySnRO8H7pVp",
+ "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": "amex",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "unchecked"
+ },
+ "country": "US",
+ "display_brand": "american_express",
+ "exp_month": 12,
+ "exp_year": 2025,
+ "fingerprint": "zYCOiuhqkk4w2g2M",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "0005",
+ "networks": {
+ "available": [
+ "amex"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": false
+ },
+ "wallet": null
+ },
+ "created": 1713871294,
+ "customer": null,
+ "livemode": false,
+ "metadata": {},
+ "type": "card"
+ }
+ recorded_at: Tue, 23 Apr 2024 11:21:34 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:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_q3SMRET2pdEU3x","request_duration_ms":519}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:21:34 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:
+ - 0f4ad5da-12eb-46f3-93f9-27728fff5b96
+ Original-Request:
+ - req_sO5qBMluUDTjVx
+ 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_sO5qBMluUDTjVx
+ 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_PyejlhPSbHpRU7",
+ "object": "customer",
+ "address": null,
+ "balance": 0,
+ "created": 1713871294,
+ "currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": null,
+ "discount": null,
+ "email": "applecustomer@example.com",
+ "invoice_prefix": "1FD8C6AE",
+ "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: Tue, 23 Apr 2024 11:21:34 GMT
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_intents
+ body:
+ encoding: UTF-8
+ string: amount=100¤cy=eur&payment_method=pm_1P8hPlKuuB1fWySnRO8H7pVp&payment_method_types[0]=card&capture_method=manual&customer=cus_PyejlhPSbHpRU7&setup_future_usage=off_session
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_sO5qBMluUDTjVx","request_duration_ms":410}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:21:35 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1368'
+ 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_intents; 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:
+ - 30d95687-1376-4eb3-890c-9becd6c87be8
+ Original-Request:
+ - req_swH0esqzotIIDC
+ 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_swH0esqzotIIDC
+ 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": "pi_3P8hPmKuuB1fWySn0I96SqZc",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 0,
+ "amount_details": {
+ "tip": {}
+ },
+ "amount_received": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871294,
+ "currency": "eur",
+ "customer": "cus_PyejlhPSbHpRU7",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": null,
+ "latest_charge": null,
+ "livemode": false,
+ "metadata": {},
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": "pm_1P8hPlKuuB1fWySnRO8H7pVp",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "requires_confirmation",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ recorded_at: Tue, 23 Apr 2024 11:21:35 GMT
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_intents/pi_3P8hPmKuuB1fWySn0I96SqZc/confirm
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_swH0esqzotIIDC","request_duration_ms":404}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:21:36 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1390'
+ 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_intents%2F%3Aintent%2Fconfirm;
+ 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:
+ - ce2ff524-3c64-4512-94eb-e683354019be
+ Original-Request:
+ - req_GtduzogqOBxFuM
+ 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_GtduzogqOBxFuM
+ 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": "pi_3P8hPmKuuB1fWySn0I96SqZc",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 100,
+ "amount_details": {
+ "tip": {}
+ },
+ "amount_received": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871294,
+ "currency": "eur",
+ "customer": "cus_PyejlhPSbHpRU7",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": null,
+ "latest_charge": "ch_3P8hPmKuuB1fWySn0TCXtFhe",
+ "livemode": false,
+ "metadata": {},
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": "pm_1P8hPlKuuB1fWySnRO8H7pVp",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "requires_capture",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ recorded_at: Tue, 23 Apr 2024 11:21:36 GMT
+- request:
+ method: get
+ uri: https://api.stripe.com/v1/payment_intents/pi_3P8hPmKuuB1fWySn0I96SqZc
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_GtduzogqOBxFuM","request_duration_ms":1107}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:21:36 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1390'
+ 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_intents%2F%3Aintent;
+ 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"
+ 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_KxAzk5rtNpzTnE
+ 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": "pi_3P8hPmKuuB1fWySn0I96SqZc",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 100,
+ "amount_details": {
+ "tip": {}
+ },
+ "amount_received": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871294,
+ "currency": "eur",
+ "customer": "cus_PyejlhPSbHpRU7",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": null,
+ "latest_charge": "ch_3P8hPmKuuB1fWySn0TCXtFhe",
+ "livemode": false,
+ "metadata": {},
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": "pm_1P8hPlKuuB1fWySnRO8H7pVp",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "requires_capture",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ recorded_at: Tue, 23 Apr 2024 11:21:36 GMT
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_intents/pi_3P8hPmKuuB1fWySn0I96SqZc/capture
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_KxAzk5rtNpzTnE","request_duration_ms":340}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:21:37 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1383'
+ 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_intents%2F%3Aintent%2Fcapture;
+ 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:
+ - dbae392b-f0f0-4340-8072-bcd42a6f6be2
+ Original-Request:
+ - req_rQgUbXQNdBUTkf
+ 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_rQgUbXQNdBUTkf
+ 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": "pi_3P8hPmKuuB1fWySn0I96SqZc",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 0,
+ "amount_details": {
+ "tip": {}
+ },
+ "amount_received": 100,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871294,
+ "currency": "eur",
+ "customer": "cus_PyejlhPSbHpRU7",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": null,
+ "latest_charge": "ch_3P8hPmKuuB1fWySn0TCXtFhe",
+ "livemode": false,
+ "metadata": {},
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": "pm_1P8hPlKuuB1fWySnRO8H7pVp",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "succeeded",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ recorded_at: Tue, 23 Apr 2024 11:21:37 GMT
+- request:
+ method: get
+ uri: https://api.stripe.com/v1/payment_intents/pi_3P8hPmKuuB1fWySn0I96SqZc
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_rQgUbXQNdBUTkf","request_duration_ms":1188}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:21:38 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1383'
+ 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_intents%2F%3Aintent;
+ 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"
+ 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_UddWo6oZ6xRVWD
+ 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": "pi_3P8hPmKuuB1fWySn0I96SqZc",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 0,
+ "amount_details": {
+ "tip": {}
+ },
+ "amount_received": 100,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871294,
+ "currency": "eur",
+ "customer": "cus_PyejlhPSbHpRU7",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": null,
+ "latest_charge": "ch_3P8hPmKuuB1fWySn0TCXtFhe",
+ "livemode": false,
+ "metadata": {},
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": "pm_1P8hPlKuuB1fWySnRO8H7pVp",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "succeeded",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ recorded_at: Tue, 23 Apr 2024 11:21:38 GMT
+recorded_with: VCR 6.2.0
diff --git a/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_American_Express/returns_payment_intent_id_and_does_not_raise.yml b/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_American_Express/returns_payment_intent_id_and_does_not_raise.yml
new file mode 100644
index 0000000000..89dcaddff6
--- /dev/null
+++ b/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_American_Express/returns_payment_intent_id_and_does_not_raise.yml
@@ -0,0 +1,512 @@
+---
+http_interactions:
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_methods
+ body:
+ encoding: UTF-8
+ string: type=card&card[number]=378282246310005&card[exp_month]=12&card[exp_year]=2025&card[cvc]=314
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_ZmshM8deU5LJ8a","request_duration_ms":394}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:21:31 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1009'
+ 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:
+ - e5a0531c-6e6e-44c8-8f5f-b20454feb897
+ Original-Request:
+ - req_zp9rWUux4NmCmn
+ 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_zp9rWUux4NmCmn
+ 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_1P8hPjKuuB1fWySnB1rKwJD0",
+ "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": "amex",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "unchecked"
+ },
+ "country": "US",
+ "display_brand": "american_express",
+ "exp_month": 12,
+ "exp_year": 2025,
+ "fingerprint": "zYCOiuhqkk4w2g2M",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "0005",
+ "networks": {
+ "available": [
+ "amex"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": false
+ },
+ "wallet": null
+ },
+ "created": 1713871291,
+ "customer": null,
+ "livemode": false,
+ "metadata": {},
+ "type": "card"
+ }
+ recorded_at: Tue, 23 Apr 2024 11:21:31 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:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_zp9rWUux4NmCmn","request_duration_ms":438}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:21:31 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:
+ - a7047b65-30fd-4a71-afe8-8f3e8dbeed4f
+ Original-Request:
+ - req_VvION4praYlJd6
+ 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_VvION4praYlJd6
+ 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_Pyej8RAVLLQG5C",
+ "object": "customer",
+ "address": null,
+ "balance": 0,
+ "created": 1713871291,
+ "currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": null,
+ "discount": null,
+ "email": "applecustomer@example.com",
+ "invoice_prefix": "645B7506",
+ "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: Tue, 23 Apr 2024 11:21:31 GMT
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_intents
+ body:
+ encoding: UTF-8
+ string: amount=100¤cy=eur&payment_method=pm_1P8hPjKuuB1fWySnB1rKwJD0&payment_method_types[0]=card&capture_method=manual&customer=cus_Pyej8RAVLLQG5C&setup_future_usage=off_session
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_VvION4praYlJd6","request_duration_ms":508}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:21:32 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1368'
+ 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_intents; 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:
+ - 0174c247-8161-42c0-bf3f-877cd2f644f8
+ Original-Request:
+ - req_knV0kmLqcT8rO2
+ 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_knV0kmLqcT8rO2
+ 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": "pi_3P8hPkKuuB1fWySn2fu1bxGF",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 0,
+ "amount_details": {
+ "tip": {}
+ },
+ "amount_received": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871292,
+ "currency": "eur",
+ "customer": "cus_Pyej8RAVLLQG5C",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": null,
+ "latest_charge": null,
+ "livemode": false,
+ "metadata": {},
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": "pm_1P8hPjKuuB1fWySnB1rKwJD0",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "requires_confirmation",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ recorded_at: Tue, 23 Apr 2024 11:21:32 GMT
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_intents/pi_3P8hPkKuuB1fWySn2fu1bxGF/confirm
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_knV0kmLqcT8rO2","request_duration_ms":407}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:21:33 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1390'
+ 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_intents%2F%3Aintent%2Fconfirm;
+ 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:
+ - 4efb4540-e365-4044-8eb2-784ae473d9e1
+ Original-Request:
+ - req_WWwLrQp4sVqJV4
+ 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_WWwLrQp4sVqJV4
+ 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": "pi_3P8hPkKuuB1fWySn2fu1bxGF",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 100,
+ "amount_details": {
+ "tip": {}
+ },
+ "amount_received": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871292,
+ "currency": "eur",
+ "customer": "cus_Pyej8RAVLLQG5C",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": null,
+ "latest_charge": "ch_3P8hPkKuuB1fWySn2NxNRLd1",
+ "livemode": false,
+ "metadata": {},
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": "pm_1P8hPjKuuB1fWySnB1rKwJD0",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "requires_capture",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ recorded_at: Tue, 23 Apr 2024 11:21:33 GMT
+recorded_with: VCR 6.2.0
diff --git a/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_BCcard_and_DinaCard/captures_the_payment.yml b/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_BCcard_and_DinaCard/captures_the_payment.yml
new file mode 100644
index 0000000000..d14e8d7e58
--- /dev/null
+++ b/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_BCcard_and_DinaCard/captures_the_payment.yml
@@ -0,0 +1,905 @@
+---
+http_interactions:
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_methods
+ body:
+ encoding: UTF-8
+ string: type=card&card[number]=6555900000604105&card[exp_month]=12&card[exp_year]=2025&card[cvc]=314
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_nanZFhzRIre71v","request_duration_ms":1077}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:22:13 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1008'
+ 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:
+ - 07fd64c4-4b06-4b4d-83fb-9a6c5b1b21a5
+ Original-Request:
+ - req_h4FbCjxiOZzc6u
+ 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_h4FbCjxiOZzc6u
+ 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_1P8hQOKuuB1fWySnId2Mzj5C",
+ "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": "discover",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "unchecked"
+ },
+ "country": "US",
+ "display_brand": "discover",
+ "exp_month": 12,
+ "exp_year": 2025,
+ "fingerprint": "7NZ8adObS8Rw8HOq",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4105",
+ "networks": {
+ "available": [
+ "discover"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1713871333,
+ "customer": null,
+ "livemode": false,
+ "metadata": {},
+ "type": "card"
+ }
+ recorded_at: Tue, 23 Apr 2024 11:22:13 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:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_h4FbCjxiOZzc6u","request_duration_ms":521}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:22:13 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:
+ - 30499760-19e8-4a21-b9ef-40b16c04b75d
+ Original-Request:
+ - req_u5y0Bhoihunvpp
+ 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_u5y0Bhoihunvpp
+ 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_PyejGREjSBtXbR",
+ "object": "customer",
+ "address": null,
+ "balance": 0,
+ "created": 1713871333,
+ "currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": null,
+ "discount": null,
+ "email": "applecustomer@example.com",
+ "invoice_prefix": "F625C654",
+ "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: Tue, 23 Apr 2024 11:22:13 GMT
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_intents
+ body:
+ encoding: UTF-8
+ string: amount=100¤cy=eur&payment_method=pm_1P8hQOKuuB1fWySnId2Mzj5C&payment_method_types[0]=card&capture_method=manual&customer=cus_PyejGREjSBtXbR&setup_future_usage=off_session
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_u5y0Bhoihunvpp","request_duration_ms":428}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:22:14 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1368'
+ 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_intents; 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:
+ - 79383762-a38a-4a9d-abf2-f770269aed52
+ Original-Request:
+ - req_nFRDi5kuAQt46x
+ 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_nFRDi5kuAQt46x
+ 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": "pi_3P8hQPKuuB1fWySn2NE05rrF",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 0,
+ "amount_details": {
+ "tip": {}
+ },
+ "amount_received": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871333,
+ "currency": "eur",
+ "customer": "cus_PyejGREjSBtXbR",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": null,
+ "latest_charge": null,
+ "livemode": false,
+ "metadata": {},
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": "pm_1P8hQOKuuB1fWySnId2Mzj5C",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "requires_confirmation",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ recorded_at: Tue, 23 Apr 2024 11:22:14 GMT
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_intents/pi_3P8hQPKuuB1fWySn2NE05rrF/confirm
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_nFRDi5kuAQt46x","request_duration_ms":421}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:22:15 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1390'
+ 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_intents%2F%3Aintent%2Fconfirm;
+ 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:
+ - e6b09ac4-d1fe-4409-a3d6-3fdd579d36eb
+ Original-Request:
+ - req_063fZXRL9juaTV
+ 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_063fZXRL9juaTV
+ 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": "pi_3P8hQPKuuB1fWySn2NE05rrF",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 100,
+ "amount_details": {
+ "tip": {}
+ },
+ "amount_received": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871333,
+ "currency": "eur",
+ "customer": "cus_PyejGREjSBtXbR",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": null,
+ "latest_charge": "ch_3P8hQPKuuB1fWySn2lFq97s5",
+ "livemode": false,
+ "metadata": {},
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": "pm_1P8hQOKuuB1fWySnId2Mzj5C",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "requires_capture",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ recorded_at: Tue, 23 Apr 2024 11:22:15 GMT
+- request:
+ method: get
+ uri: https://api.stripe.com/v1/payment_intents/pi_3P8hQPKuuB1fWySn2NE05rrF
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_063fZXRL9juaTV","request_duration_ms":1167}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:22:15 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1390'
+ 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_intents%2F%3Aintent;
+ 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"
+ 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_PDviclwoOQJWDY
+ 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": "pi_3P8hQPKuuB1fWySn2NE05rrF",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 100,
+ "amount_details": {
+ "tip": {}
+ },
+ "amount_received": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871333,
+ "currency": "eur",
+ "customer": "cus_PyejGREjSBtXbR",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": null,
+ "latest_charge": "ch_3P8hQPKuuB1fWySn2lFq97s5",
+ "livemode": false,
+ "metadata": {},
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": "pm_1P8hQOKuuB1fWySnId2Mzj5C",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "requires_capture",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ recorded_at: Tue, 23 Apr 2024 11:22:15 GMT
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_intents/pi_3P8hQPKuuB1fWySn2NE05rrF/capture
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_PDviclwoOQJWDY","request_duration_ms":406}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:22:17 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1383'
+ 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_intents%2F%3Aintent%2Fcapture;
+ 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:
+ - dab6f1ca-f281-4ed8-8539-b77a10083c01
+ Original-Request:
+ - req_TAyOFJqtk0XY4h
+ 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_TAyOFJqtk0XY4h
+ 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": "pi_3P8hQPKuuB1fWySn2NE05rrF",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 0,
+ "amount_details": {
+ "tip": {}
+ },
+ "amount_received": 100,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871333,
+ "currency": "eur",
+ "customer": "cus_PyejGREjSBtXbR",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": null,
+ "latest_charge": "ch_3P8hQPKuuB1fWySn2lFq97s5",
+ "livemode": false,
+ "metadata": {},
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": "pm_1P8hQOKuuB1fWySnId2Mzj5C",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "succeeded",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ recorded_at: Tue, 23 Apr 2024 11:22:17 GMT
+- request:
+ method: get
+ uri: https://api.stripe.com/v1/payment_intents/pi_3P8hQPKuuB1fWySn2NE05rrF
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_TAyOFJqtk0XY4h","request_duration_ms":1635}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:22:17 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1383'
+ 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_intents%2F%3Aintent;
+ 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"
+ 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_3Dn9T1aixPSePK
+ 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": "pi_3P8hQPKuuB1fWySn2NE05rrF",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 0,
+ "amount_details": {
+ "tip": {}
+ },
+ "amount_received": 100,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871333,
+ "currency": "eur",
+ "customer": "cus_PyejGREjSBtXbR",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": null,
+ "latest_charge": "ch_3P8hQPKuuB1fWySn2lFq97s5",
+ "livemode": false,
+ "metadata": {},
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": "pm_1P8hQOKuuB1fWySnId2Mzj5C",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "succeeded",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ recorded_at: Tue, 23 Apr 2024 11:22:17 GMT
+recorded_with: VCR 6.2.0
diff --git a/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_BCcard_and_DinaCard/returns_payment_intent_id_and_does_not_raise.yml b/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_BCcard_and_DinaCard/returns_payment_intent_id_and_does_not_raise.yml
new file mode 100644
index 0000000000..2a07f9971a
--- /dev/null
+++ b/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_BCcard_and_DinaCard/returns_payment_intent_id_and_does_not_raise.yml
@@ -0,0 +1,512 @@
+---
+http_interactions:
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_methods
+ body:
+ encoding: UTF-8
+ string: type=card&card[number]=6555900000604105&card[exp_month]=12&card[exp_year]=2025&card[cvc]=314
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_wFzCMoF0mQD3Eo","request_duration_ms":315}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:22:10 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1008'
+ 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:
+ - d0482a80-5afc-44e9-9508-69dba3a1dd84
+ Original-Request:
+ - req_HfCWuNBUeFJHJ5
+ 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_HfCWuNBUeFJHJ5
+ 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_1P8hQMKuuB1fWySnN4KTfpDk",
+ "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": "discover",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "unchecked"
+ },
+ "country": "US",
+ "display_brand": "discover",
+ "exp_month": 12,
+ "exp_year": 2025,
+ "fingerprint": "7NZ8adObS8Rw8HOq",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "4105",
+ "networks": {
+ "available": [
+ "discover"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1713871330,
+ "customer": null,
+ "livemode": false,
+ "metadata": {},
+ "type": "card"
+ }
+ recorded_at: Tue, 23 Apr 2024 11:22:10 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:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_HfCWuNBUeFJHJ5","request_duration_ms":415}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:22:10 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:
+ - ea256470-3297-4e6b-9052-5efcae4a7ffd
+ Original-Request:
+ - req_3gAE50rFEVax5i
+ 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_3gAE50rFEVax5i
+ 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_PyejoBfFWODSMx",
+ "object": "customer",
+ "address": null,
+ "balance": 0,
+ "created": 1713871330,
+ "currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": null,
+ "discount": null,
+ "email": "applecustomer@example.com",
+ "invoice_prefix": "4A967218",
+ "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: Tue, 23 Apr 2024 11:22:10 GMT
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_intents
+ body:
+ encoding: UTF-8
+ string: amount=100¤cy=eur&payment_method=pm_1P8hQMKuuB1fWySnN4KTfpDk&payment_method_types[0]=card&capture_method=manual&customer=cus_PyejoBfFWODSMx&setup_future_usage=off_session
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_3gAE50rFEVax5i","request_duration_ms":524}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:22:11 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1368'
+ 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_intents; 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:
+ - 17e39583-5976-4667-9d1a-223dedd14257
+ Original-Request:
+ - req_JJ9t7V8lKdZpqY
+ 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_JJ9t7V8lKdZpqY
+ 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": "pi_3P8hQNKuuB1fWySn0piyeLve",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 0,
+ "amount_details": {
+ "tip": {}
+ },
+ "amount_received": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871331,
+ "currency": "eur",
+ "customer": "cus_PyejoBfFWODSMx",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": null,
+ "latest_charge": null,
+ "livemode": false,
+ "metadata": {},
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": "pm_1P8hQMKuuB1fWySnN4KTfpDk",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "requires_confirmation",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ recorded_at: Tue, 23 Apr 2024 11:22:11 GMT
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_intents/pi_3P8hQNKuuB1fWySn0piyeLve/confirm
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_JJ9t7V8lKdZpqY","request_duration_ms":424}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:22:12 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1390'
+ 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_intents%2F%3Aintent%2Fconfirm;
+ 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:
+ - 412cb586-8cff-44a6-b60b-3c9a0d6520ce
+ Original-Request:
+ - req_nanZFhzRIre71v
+ 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_nanZFhzRIre71v
+ 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": "pi_3P8hQNKuuB1fWySn0piyeLve",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 100,
+ "amount_details": {
+ "tip": {}
+ },
+ "amount_received": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871331,
+ "currency": "eur",
+ "customer": "cus_PyejoBfFWODSMx",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": null,
+ "latest_charge": "ch_3P8hQNKuuB1fWySn0Ub9RO8K",
+ "livemode": false,
+ "metadata": {},
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": "pm_1P8hQMKuuB1fWySnN4KTfpDk",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "requires_capture",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ recorded_at: Tue, 23 Apr 2024 11:22:12 GMT
+recorded_with: VCR 6.2.0
diff --git a/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Diners_Club/captures_the_payment.yml b/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Diners_Club/captures_the_payment.yml
new file mode 100644
index 0000000000..755b43fc3e
--- /dev/null
+++ b/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Diners_Club/captures_the_payment.yml
@@ -0,0 +1,905 @@
+---
+http_interactions:
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_methods
+ body:
+ encoding: UTF-8
+ string: type=card&card[number]=3056930009020004&card[exp_month]=12&card[exp_year]=2025&card[cvc]=314
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_F0PIDyr31udtJ2","request_duration_ms":1001}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:21:58 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1008'
+ 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:
+ - 699acfe0-14ca-4d60-bf0e-95f24bb5dbe9
+ Original-Request:
+ - req_aMcxa09ry3qzsw
+ 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_aMcxa09ry3qzsw
+ 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_1P8hQ9KuuB1fWySnYVsRisH4",
+ "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": "diners",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "unchecked"
+ },
+ "country": "US",
+ "display_brand": "diners_club",
+ "exp_month": 12,
+ "exp_year": 2025,
+ "fingerprint": "8CvV2XFCUY7eGw6O",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "0004",
+ "networks": {
+ "available": [
+ "diners"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": false
+ },
+ "wallet": null
+ },
+ "created": 1713871318,
+ "customer": null,
+ "livemode": false,
+ "metadata": {},
+ "type": "card"
+ }
+ recorded_at: Tue, 23 Apr 2024 11:21:58 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:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_aMcxa09ry3qzsw","request_duration_ms":441}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:21:58 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:
+ - 4a72f8a7-096b-4828-9483-fbeea0e6f79d
+ Original-Request:
+ - req_Y5bjaH6gkAKoVc
+ 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_Y5bjaH6gkAKoVc
+ 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_PyejqoGIrbSloY",
+ "object": "customer",
+ "address": null,
+ "balance": 0,
+ "created": 1713871318,
+ "currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": null,
+ "discount": null,
+ "email": "applecustomer@example.com",
+ "invoice_prefix": "BCF7C75E",
+ "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: Tue, 23 Apr 2024 11:21:58 GMT
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_intents
+ body:
+ encoding: UTF-8
+ string: amount=100¤cy=eur&payment_method=pm_1P8hQ9KuuB1fWySnYVsRisH4&payment_method_types[0]=card&capture_method=manual&customer=cus_PyejqoGIrbSloY&setup_future_usage=off_session
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_Y5bjaH6gkAKoVc","request_duration_ms":500}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:21:59 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1368'
+ 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_intents; 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:
+ - b098ddc0-7aec-4d60-a9f6-b39e167e46e2
+ Original-Request:
+ - req_JvotoTPIJvFb62
+ 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_JvotoTPIJvFb62
+ 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": "pi_3P8hQAKuuB1fWySn2Gw633z1",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 0,
+ "amount_details": {
+ "tip": {}
+ },
+ "amount_received": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871318,
+ "currency": "eur",
+ "customer": "cus_PyejqoGIrbSloY",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": null,
+ "latest_charge": null,
+ "livemode": false,
+ "metadata": {},
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": "pm_1P8hQ9KuuB1fWySnYVsRisH4",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "requires_confirmation",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ recorded_at: Tue, 23 Apr 2024 11:21:59 GMT
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_intents/pi_3P8hQAKuuB1fWySn2Gw633z1/confirm
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_JvotoTPIJvFb62","request_duration_ms":510}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:22:00 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1390'
+ 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_intents%2F%3Aintent%2Fconfirm;
+ 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:
+ - d49d4520-df0d-4f17-9539-e1a9f2497be8
+ Original-Request:
+ - req_MZZk8A3FLOZ2cj
+ 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_MZZk8A3FLOZ2cj
+ 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": "pi_3P8hQAKuuB1fWySn2Gw633z1",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 100,
+ "amount_details": {
+ "tip": {}
+ },
+ "amount_received": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871318,
+ "currency": "eur",
+ "customer": "cus_PyejqoGIrbSloY",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": null,
+ "latest_charge": "ch_3P8hQAKuuB1fWySn27CF3HHg",
+ "livemode": false,
+ "metadata": {},
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": "pm_1P8hQ9KuuB1fWySnYVsRisH4",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "requires_capture",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ recorded_at: Tue, 23 Apr 2024 11:22:00 GMT
+- request:
+ method: get
+ uri: https://api.stripe.com/v1/payment_intents/pi_3P8hQAKuuB1fWySn2Gw633z1
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_MZZk8A3FLOZ2cj","request_duration_ms":1102}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:22:00 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1390'
+ 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_intents%2F%3Aintent;
+ 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"
+ 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_dWgYeF8wvQey17
+ 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": "pi_3P8hQAKuuB1fWySn2Gw633z1",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 100,
+ "amount_details": {
+ "tip": {}
+ },
+ "amount_received": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871318,
+ "currency": "eur",
+ "customer": "cus_PyejqoGIrbSloY",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": null,
+ "latest_charge": "ch_3P8hQAKuuB1fWySn27CF3HHg",
+ "livemode": false,
+ "metadata": {},
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": "pm_1P8hQ9KuuB1fWySnYVsRisH4",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "requires_capture",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ recorded_at: Tue, 23 Apr 2024 11:22:00 GMT
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_intents/pi_3P8hQAKuuB1fWySn2Gw633z1/capture
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_dWgYeF8wvQey17","request_duration_ms":407}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:22:01 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1383'
+ 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_intents%2F%3Aintent%2Fcapture;
+ 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:
+ - ea0e4c9f-d5ad-442f-b105-3c30b9a77760
+ Original-Request:
+ - req_rbJH0wjaebh0ma
+ 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_rbJH0wjaebh0ma
+ 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": "pi_3P8hQAKuuB1fWySn2Gw633z1",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 0,
+ "amount_details": {
+ "tip": {}
+ },
+ "amount_received": 100,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871318,
+ "currency": "eur",
+ "customer": "cus_PyejqoGIrbSloY",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": null,
+ "latest_charge": "ch_3P8hQAKuuB1fWySn27CF3HHg",
+ "livemode": false,
+ "metadata": {},
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": "pm_1P8hQ9KuuB1fWySnYVsRisH4",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "succeeded",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ recorded_at: Tue, 23 Apr 2024 11:22:01 GMT
+- request:
+ method: get
+ uri: https://api.stripe.com/v1/payment_intents/pi_3P8hQAKuuB1fWySn2Gw633z1
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_rbJH0wjaebh0ma","request_duration_ms":1225}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:22:02 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1383'
+ 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_intents%2F%3Aintent;
+ 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"
+ 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_xmdIy0xcA8ttbI
+ 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": "pi_3P8hQAKuuB1fWySn2Gw633z1",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 0,
+ "amount_details": {
+ "tip": {}
+ },
+ "amount_received": 100,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871318,
+ "currency": "eur",
+ "customer": "cus_PyejqoGIrbSloY",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": null,
+ "latest_charge": "ch_3P8hQAKuuB1fWySn27CF3HHg",
+ "livemode": false,
+ "metadata": {},
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": "pm_1P8hQ9KuuB1fWySnYVsRisH4",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "succeeded",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ recorded_at: Tue, 23 Apr 2024 11:22:02 GMT
+recorded_with: VCR 6.2.0
diff --git a/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Diners_Club/returns_payment_intent_id_and_does_not_raise.yml b/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Diners_Club/returns_payment_intent_id_and_does_not_raise.yml
new file mode 100644
index 0000000000..6d81c41bc1
--- /dev/null
+++ b/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Diners_Club/returns_payment_intent_id_and_does_not_raise.yml
@@ -0,0 +1,512 @@
+---
+http_interactions:
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_methods
+ body:
+ encoding: UTF-8
+ string: type=card&card[number]=3056930009020004&card[exp_month]=12&card[exp_year]=2025&card[cvc]=314
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_p4PeKqmC2GcoAk","request_duration_ms":407}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:21:55 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1008'
+ 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:
+ - 7fdcd9a1-34ee-4ce6-bbe0-759b5d7adf3a
+ Original-Request:
+ - req_ez8SRoPdvB73xw
+ 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_ez8SRoPdvB73xw
+ 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_1P8hQ7KuuB1fWySnSVV0shzQ",
+ "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": "diners",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "unchecked"
+ },
+ "country": "US",
+ "display_brand": "diners_club",
+ "exp_month": 12,
+ "exp_year": 2025,
+ "fingerprint": "8CvV2XFCUY7eGw6O",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "0004",
+ "networks": {
+ "available": [
+ "diners"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": false
+ },
+ "wallet": null
+ },
+ "created": 1713871315,
+ "customer": null,
+ "livemode": false,
+ "metadata": {},
+ "type": "card"
+ }
+ recorded_at: Tue, 23 Apr 2024 11:21:55 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:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_ez8SRoPdvB73xw","request_duration_ms":434}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:21:55 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:
+ - 3da20bb0-4fdd-4457-aa5a-c0482452f61d
+ Original-Request:
+ - req_DTfU4F1qwYuKyu
+ 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_DTfU4F1qwYuKyu
+ 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_PyejNRkCBsUcCT",
+ "object": "customer",
+ "address": null,
+ "balance": 0,
+ "created": 1713871315,
+ "currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": null,
+ "discount": null,
+ "email": "applecustomer@example.com",
+ "invoice_prefix": "3BD04305",
+ "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: Tue, 23 Apr 2024 11:21:55 GMT
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_intents
+ body:
+ encoding: UTF-8
+ string: amount=100¤cy=eur&payment_method=pm_1P8hQ7KuuB1fWySnSVV0shzQ&payment_method_types[0]=card&capture_method=manual&customer=cus_PyejNRkCBsUcCT&setup_future_usage=off_session
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_DTfU4F1qwYuKyu","request_duration_ms":509}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:21:56 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1368'
+ 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_intents; 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:
+ - d1c04eb7-242d-49e0-a4b7-ce8b4b7c86d3
+ Original-Request:
+ - req_D4aNytWyNkrU1c
+ 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_D4aNytWyNkrU1c
+ 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": "pi_3P8hQ8KuuB1fWySn0klY7sZZ",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 0,
+ "amount_details": {
+ "tip": {}
+ },
+ "amount_received": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871316,
+ "currency": "eur",
+ "customer": "cus_PyejNRkCBsUcCT",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": null,
+ "latest_charge": null,
+ "livemode": false,
+ "metadata": {},
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": "pm_1P8hQ7KuuB1fWySnSVV0shzQ",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "requires_confirmation",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ recorded_at: Tue, 23 Apr 2024 11:21:56 GMT
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_intents/pi_3P8hQ8KuuB1fWySn0klY7sZZ/confirm
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_D4aNytWyNkrU1c","request_duration_ms":407}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:21:57 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1390'
+ 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_intents%2F%3Aintent%2Fconfirm;
+ 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:
+ - 846d130a-be48-4026-9e59-8b0c31c4ca0d
+ Original-Request:
+ - req_F0PIDyr31udtJ2
+ 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_F0PIDyr31udtJ2
+ 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": "pi_3P8hQ8KuuB1fWySn0klY7sZZ",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 100,
+ "amount_details": {
+ "tip": {}
+ },
+ "amount_received": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871316,
+ "currency": "eur",
+ "customer": "cus_PyejNRkCBsUcCT",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": null,
+ "latest_charge": "ch_3P8hQ8KuuB1fWySn0sIkyJo1",
+ "livemode": false,
+ "metadata": {},
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": "pm_1P8hQ7KuuB1fWySnSVV0shzQ",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "requires_capture",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ recorded_at: Tue, 23 Apr 2024 11:21:57 GMT
+recorded_with: VCR 6.2.0
diff --git a/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Diners_Club_14-digit_card_/captures_the_payment.yml b/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Diners_Club_14-digit_card_/captures_the_payment.yml
new file mode 100644
index 0000000000..91f1d0046b
--- /dev/null
+++ b/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Diners_Club_14-digit_card_/captures_the_payment.yml
@@ -0,0 +1,905 @@
+---
+http_interactions:
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_methods
+ body:
+ encoding: UTF-8
+ string: type=card&card[number]=36227206271667&card[exp_month]=12&card[exp_year]=2025&card[cvc]=314
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_y2bfu78HhF3dGA","request_duration_ms":1107}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:22:05 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1008'
+ 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:
+ - 3148e7f5-db70-4dbb-9a75-194224932fca
+ Original-Request:
+ - req_iiefiwCR3youDU
+ 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_iiefiwCR3youDU
+ 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_1P8hQHKuuB1fWySnutfeAg3o",
+ "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": "diners",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "unchecked"
+ },
+ "country": "US",
+ "display_brand": "diners_club",
+ "exp_month": 12,
+ "exp_year": 2025,
+ "fingerprint": "gDlx6y9moRYkO83e",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "1667",
+ "networks": {
+ "available": [
+ "diners"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": false
+ },
+ "wallet": null
+ },
+ "created": 1713871325,
+ "customer": null,
+ "livemode": false,
+ "metadata": {},
+ "type": "card"
+ }
+ recorded_at: Tue, 23 Apr 2024 11:22:05 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:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_iiefiwCR3youDU","request_duration_ms":521}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:22:06 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:
+ - e3c2de6d-f8be-479d-8ecf-71a3ef0d48ca
+ Original-Request:
+ - req_cVFNyy30EQtvcC
+ 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_cVFNyy30EQtvcC
+ 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_PyejYA0TC3ECno",
+ "object": "customer",
+ "address": null,
+ "balance": 0,
+ "created": 1713871326,
+ "currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": null,
+ "discount": null,
+ "email": "applecustomer@example.com",
+ "invoice_prefix": "21AF6C51",
+ "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: Tue, 23 Apr 2024 11:22:06 GMT
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_intents
+ body:
+ encoding: UTF-8
+ string: amount=100¤cy=eur&payment_method=pm_1P8hQHKuuB1fWySnutfeAg3o&payment_method_types[0]=card&capture_method=manual&customer=cus_PyejYA0TC3ECno&setup_future_usage=off_session
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_cVFNyy30EQtvcC","request_duration_ms":448}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:22:06 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1368'
+ 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_intents; 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:
+ - 5bceb53d-e5f4-49eb-bfc2-79ed634ad8f5
+ Original-Request:
+ - req_wFibir0ga44G9t
+ 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_wFibir0ga44G9t
+ 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": "pi_3P8hQIKuuB1fWySn1V7vxE51",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 0,
+ "amount_details": {
+ "tip": {}
+ },
+ "amount_received": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871326,
+ "currency": "eur",
+ "customer": "cus_PyejYA0TC3ECno",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": null,
+ "latest_charge": null,
+ "livemode": false,
+ "metadata": {},
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": "pm_1P8hQHKuuB1fWySnutfeAg3o",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "requires_confirmation",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ recorded_at: Tue, 23 Apr 2024 11:22:06 GMT
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_intents/pi_3P8hQIKuuB1fWySn1V7vxE51/confirm
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_wFibir0ga44G9t","request_duration_ms":415}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:22:07 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1390'
+ 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_intents%2F%3Aintent%2Fconfirm;
+ 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:
+ - 77b39096-d434-42e4-a44a-1657bb9d9c30
+ Original-Request:
+ - req_NSbeTZUD4OBDv7
+ 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_NSbeTZUD4OBDv7
+ 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": "pi_3P8hQIKuuB1fWySn1V7vxE51",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 100,
+ "amount_details": {
+ "tip": {}
+ },
+ "amount_received": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871326,
+ "currency": "eur",
+ "customer": "cus_PyejYA0TC3ECno",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": null,
+ "latest_charge": "ch_3P8hQIKuuB1fWySn1R60pYt8",
+ "livemode": false,
+ "metadata": {},
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": "pm_1P8hQHKuuB1fWySnutfeAg3o",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "requires_capture",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ recorded_at: Tue, 23 Apr 2024 11:22:07 GMT
+- request:
+ method: get
+ uri: https://api.stripe.com/v1/payment_intents/pi_3P8hQIKuuB1fWySn1V7vxE51
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_NSbeTZUD4OBDv7","request_duration_ms":1055}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:22:08 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1390'
+ 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_intents%2F%3Aintent;
+ 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"
+ 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_1QKMjLvP9QmP3M
+ 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": "pi_3P8hQIKuuB1fWySn1V7vxE51",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 100,
+ "amount_details": {
+ "tip": {}
+ },
+ "amount_received": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871326,
+ "currency": "eur",
+ "customer": "cus_PyejYA0TC3ECno",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": null,
+ "latest_charge": "ch_3P8hQIKuuB1fWySn1R60pYt8",
+ "livemode": false,
+ "metadata": {},
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": "pm_1P8hQHKuuB1fWySnutfeAg3o",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "requires_capture",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ recorded_at: Tue, 23 Apr 2024 11:22:08 GMT
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_intents/pi_3P8hQIKuuB1fWySn1V7vxE51/capture
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_1QKMjLvP9QmP3M","request_duration_ms":293}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:22:09 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1383'
+ 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_intents%2F%3Aintent%2Fcapture;
+ 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:
+ - 56bdbdb0-1282-4790-b9c0-3f13314ec128
+ Original-Request:
+ - req_e6WjAta3RR7cDp
+ 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_e6WjAta3RR7cDp
+ 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": "pi_3P8hQIKuuB1fWySn1V7vxE51",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 0,
+ "amount_details": {
+ "tip": {}
+ },
+ "amount_received": 100,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871326,
+ "currency": "eur",
+ "customer": "cus_PyejYA0TC3ECno",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": null,
+ "latest_charge": "ch_3P8hQIKuuB1fWySn1R60pYt8",
+ "livemode": false,
+ "metadata": {},
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": "pm_1P8hQHKuuB1fWySnutfeAg3o",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "succeeded",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ recorded_at: Tue, 23 Apr 2024 11:22:09 GMT
+- request:
+ method: get
+ uri: https://api.stripe.com/v1/payment_intents/pi_3P8hQIKuuB1fWySn1V7vxE51
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_e6WjAta3RR7cDp","request_duration_ms":1340}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:22:09 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1383'
+ 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_intents%2F%3Aintent;
+ 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"
+ 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_wFzCMoF0mQD3Eo
+ 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": "pi_3P8hQIKuuB1fWySn1V7vxE51",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 0,
+ "amount_details": {
+ "tip": {}
+ },
+ "amount_received": 100,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871326,
+ "currency": "eur",
+ "customer": "cus_PyejYA0TC3ECno",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": null,
+ "latest_charge": "ch_3P8hQIKuuB1fWySn1R60pYt8",
+ "livemode": false,
+ "metadata": {},
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": "pm_1P8hQHKuuB1fWySnutfeAg3o",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "succeeded",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ recorded_at: Tue, 23 Apr 2024 11:22:09 GMT
+recorded_with: VCR 6.2.0
diff --git a/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Diners_Club_14-digit_card_/returns_payment_intent_id_and_does_not_raise.yml b/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Diners_Club_14-digit_card_/returns_payment_intent_id_and_does_not_raise.yml
new file mode 100644
index 0000000000..5548728a17
--- /dev/null
+++ b/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Diners_Club_14-digit_card_/returns_payment_intent_id_and_does_not_raise.yml
@@ -0,0 +1,512 @@
+---
+http_interactions:
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_methods
+ body:
+ encoding: UTF-8
+ string: type=card&card[number]=36227206271667&card[exp_month]=12&card[exp_year]=2025&card[cvc]=314
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_xmdIy0xcA8ttbI","request_duration_ms":408}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:22:02 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1008'
+ 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:
+ - 9e719516-d99d-4916-94dc-61f6f1c2fc81
+ Original-Request:
+ - req_UMNO0XHfcOP271
+ 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_UMNO0XHfcOP271
+ 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_1P8hQEKuuB1fWySnM0FueQDF",
+ "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": "diners",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "unchecked"
+ },
+ "country": "US",
+ "display_brand": "diners_club",
+ "exp_month": 12,
+ "exp_year": 2025,
+ "fingerprint": "gDlx6y9moRYkO83e",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "1667",
+ "networks": {
+ "available": [
+ "diners"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": false
+ },
+ "wallet": null
+ },
+ "created": 1713871322,
+ "customer": null,
+ "livemode": false,
+ "metadata": {},
+ "type": "card"
+ }
+ recorded_at: Tue, 23 Apr 2024 11:22:03 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:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_UMNO0XHfcOP271","request_duration_ms":536}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:22:03 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:
+ - 2181cbe0-9829-4395-89b9-3a0d98be464c
+ Original-Request:
+ - req_pzxTrEyqekgZUS
+ 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_pzxTrEyqekgZUS
+ 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_PyejNJe0cHnW15",
+ "object": "customer",
+ "address": null,
+ "balance": 0,
+ "created": 1713871323,
+ "currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": null,
+ "discount": null,
+ "email": "applecustomer@example.com",
+ "invoice_prefix": "2415657D",
+ "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: Tue, 23 Apr 2024 11:22:03 GMT
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_intents
+ body:
+ encoding: UTF-8
+ string: amount=100¤cy=eur&payment_method=pm_1P8hQEKuuB1fWySnM0FueQDF&payment_method_types[0]=card&capture_method=manual&customer=cus_PyejNJe0cHnW15&setup_future_usage=off_session
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_pzxTrEyqekgZUS","request_duration_ms":440}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:22:03 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1368'
+ 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_intents; 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:
+ - 55d32630-3ae8-4d1f-bf6a-da26931bb412
+ Original-Request:
+ - req_SNphmAy0Qmq6jg
+ 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_SNphmAy0Qmq6jg
+ 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": "pi_3P8hQFKuuB1fWySn1Fs1vGsh",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 0,
+ "amount_details": {
+ "tip": {}
+ },
+ "amount_received": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871323,
+ "currency": "eur",
+ "customer": "cus_PyejNJe0cHnW15",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": null,
+ "latest_charge": null,
+ "livemode": false,
+ "metadata": {},
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": "pm_1P8hQEKuuB1fWySnM0FueQDF",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "requires_confirmation",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ recorded_at: Tue, 23 Apr 2024 11:22:03 GMT
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_intents/pi_3P8hQFKuuB1fWySn1Fs1vGsh/confirm
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_SNphmAy0Qmq6jg","request_duration_ms":474}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:22:04 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1390'
+ 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_intents%2F%3Aintent%2Fconfirm;
+ 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:
+ - 8310a181-52c7-47b1-9d1d-13b2359eff49
+ Original-Request:
+ - req_y2bfu78HhF3dGA
+ 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_y2bfu78HhF3dGA
+ 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": "pi_3P8hQFKuuB1fWySn1Fs1vGsh",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 100,
+ "amount_details": {
+ "tip": {}
+ },
+ "amount_received": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871323,
+ "currency": "eur",
+ "customer": "cus_PyejNJe0cHnW15",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": null,
+ "latest_charge": "ch_3P8hQFKuuB1fWySn1ChVQwX4",
+ "livemode": false,
+ "metadata": {},
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": "pm_1P8hQEKuuB1fWySnM0FueQDF",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "requires_capture",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ recorded_at: Tue, 23 Apr 2024 11:22:05 GMT
+recorded_with: VCR 6.2.0
diff --git a/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Discover/captures_the_payment.yml b/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Discover/captures_the_payment.yml
new file mode 100644
index 0000000000..a700c19bfe
--- /dev/null
+++ b/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Discover/captures_the_payment.yml
@@ -0,0 +1,905 @@
+---
+http_interactions:
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_methods
+ body:
+ encoding: UTF-8
+ string: type=card&card[number]=6011111111111117&card[exp_month]=12&card[exp_year]=2025&card[cvc]=314
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_cKclt9jUdynwP8","request_duration_ms":1113}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:21:42 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1008'
+ 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:
+ - 1ffe4335-3659-40c5-ba72-4b256d9055bc
+ Original-Request:
+ - req_Etu4Q54XyJuLfH
+ 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_Etu4Q54XyJuLfH
+ 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_1P8hPtKuuB1fWySnf5blcleZ",
+ "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": "discover",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "unchecked"
+ },
+ "country": "US",
+ "display_brand": "discover",
+ "exp_month": 12,
+ "exp_year": 2025,
+ "fingerprint": "SJztPPlfyEUr9hdK",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "1117",
+ "networks": {
+ "available": [
+ "discover"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1713871302,
+ "customer": null,
+ "livemode": false,
+ "metadata": {},
+ "type": "card"
+ }
+ recorded_at: Tue, 23 Apr 2024 11:21:42 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:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_Etu4Q54XyJuLfH","request_duration_ms":500}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:21:42 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:
+ - 490666bd-00c7-483c-b2d8-a68000ecbe6c
+ Original-Request:
+ - req_SJPCUBIOA8rqPC
+ 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_SJPCUBIOA8rqPC
+ 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_PyejzDOIBybDpN",
+ "object": "customer",
+ "address": null,
+ "balance": 0,
+ "created": 1713871302,
+ "currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": null,
+ "discount": null,
+ "email": "applecustomer@example.com",
+ "invoice_prefix": "FC09F1D5",
+ "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: Tue, 23 Apr 2024 11:21:42 GMT
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_intents
+ body:
+ encoding: UTF-8
+ string: amount=100¤cy=eur&payment_method=pm_1P8hPtKuuB1fWySnf5blcleZ&payment_method_types[0]=card&capture_method=manual&customer=cus_PyejzDOIBybDpN&setup_future_usage=off_session
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_SJPCUBIOA8rqPC","request_duration_ms":502}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:21:43 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1368'
+ 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_intents; 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:
+ - 719ad88e-70b3-4d82-8274-5806dc3437d4
+ Original-Request:
+ - req_ZGRZyXCxIUXC9E
+ 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_ZGRZyXCxIUXC9E
+ 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": "pi_3P8hPuKuuB1fWySn1YuJhvuD",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 0,
+ "amount_details": {
+ "tip": {}
+ },
+ "amount_received": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871302,
+ "currency": "eur",
+ "customer": "cus_PyejzDOIBybDpN",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": null,
+ "latest_charge": null,
+ "livemode": false,
+ "metadata": {},
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": "pm_1P8hPtKuuB1fWySnf5blcleZ",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "requires_confirmation",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ recorded_at: Tue, 23 Apr 2024 11:21:43 GMT
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_intents/pi_3P8hPuKuuB1fWySn1YuJhvuD/confirm
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_ZGRZyXCxIUXC9E","request_duration_ms":405}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:21:44 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1390'
+ 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_intents%2F%3Aintent%2Fconfirm;
+ 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:
+ - cac78d53-f544-464b-8303-e84ada269640
+ Original-Request:
+ - req_KCA2UUWiEUB4HJ
+ 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_KCA2UUWiEUB4HJ
+ 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": "pi_3P8hPuKuuB1fWySn1YuJhvuD",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 100,
+ "amount_details": {
+ "tip": {}
+ },
+ "amount_received": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871302,
+ "currency": "eur",
+ "customer": "cus_PyejzDOIBybDpN",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": null,
+ "latest_charge": "ch_3P8hPuKuuB1fWySn1YV8AUSr",
+ "livemode": false,
+ "metadata": {},
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": "pm_1P8hPtKuuB1fWySnf5blcleZ",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "requires_capture",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ recorded_at: Tue, 23 Apr 2024 11:21:44 GMT
+- request:
+ method: get
+ uri: https://api.stripe.com/v1/payment_intents/pi_3P8hPuKuuB1fWySn1YuJhvuD
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_KCA2UUWiEUB4HJ","request_duration_ms":1103}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:21:44 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1390'
+ 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_intents%2F%3Aintent;
+ 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"
+ 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_Da2a3MRFBmJh64
+ 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": "pi_3P8hPuKuuB1fWySn1YuJhvuD",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 100,
+ "amount_details": {
+ "tip": {}
+ },
+ "amount_received": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871302,
+ "currency": "eur",
+ "customer": "cus_PyejzDOIBybDpN",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": null,
+ "latest_charge": "ch_3P8hPuKuuB1fWySn1YV8AUSr",
+ "livemode": false,
+ "metadata": {},
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": "pm_1P8hPtKuuB1fWySnf5blcleZ",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "requires_capture",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ recorded_at: Tue, 23 Apr 2024 11:21:44 GMT
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_intents/pi_3P8hPuKuuB1fWySn1YuJhvuD/capture
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_Da2a3MRFBmJh64","request_duration_ms":405}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:21:46 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1383'
+ 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_intents%2F%3Aintent%2Fcapture;
+ 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:
+ - a2b644d6-4fce-4089-a05b-857e4733a67b
+ Original-Request:
+ - req_qvfrJW5qxylQHr
+ 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_qvfrJW5qxylQHr
+ 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": "pi_3P8hPuKuuB1fWySn1YuJhvuD",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 0,
+ "amount_details": {
+ "tip": {}
+ },
+ "amount_received": 100,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871302,
+ "currency": "eur",
+ "customer": "cus_PyejzDOIBybDpN",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": null,
+ "latest_charge": "ch_3P8hPuKuuB1fWySn1YV8AUSr",
+ "livemode": false,
+ "metadata": {},
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": "pm_1P8hPtKuuB1fWySnf5blcleZ",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "succeeded",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ recorded_at: Tue, 23 Apr 2024 11:21:46 GMT
+- request:
+ method: get
+ uri: https://api.stripe.com/v1/payment_intents/pi_3P8hPuKuuB1fWySn1YuJhvuD
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_qvfrJW5qxylQHr","request_duration_ms":1533}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:21:46 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1383'
+ 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_intents%2F%3Aintent;
+ 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"
+ 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_SiTlYVqYvz9Aeu
+ 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": "pi_3P8hPuKuuB1fWySn1YuJhvuD",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 0,
+ "amount_details": {
+ "tip": {}
+ },
+ "amount_received": 100,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871302,
+ "currency": "eur",
+ "customer": "cus_PyejzDOIBybDpN",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": null,
+ "latest_charge": "ch_3P8hPuKuuB1fWySn1YV8AUSr",
+ "livemode": false,
+ "metadata": {},
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": "pm_1P8hPtKuuB1fWySnf5blcleZ",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "succeeded",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ recorded_at: Tue, 23 Apr 2024 11:21:46 GMT
+recorded_with: VCR 6.2.0
diff --git a/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Discover/returns_payment_intent_id_and_does_not_raise.yml b/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Discover/returns_payment_intent_id_and_does_not_raise.yml
new file mode 100644
index 0000000000..9ac6da32c5
--- /dev/null
+++ b/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Discover/returns_payment_intent_id_and_does_not_raise.yml
@@ -0,0 +1,512 @@
+---
+http_interactions:
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_methods
+ body:
+ encoding: UTF-8
+ string: type=card&card[number]=6011111111111117&card[exp_month]=12&card[exp_year]=2025&card[cvc]=314
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_UddWo6oZ6xRVWD","request_duration_ms":1}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:21:38 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1008'
+ 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:
+ - 7a037dc0-3384-4056-bc3b-7781c6e8114f
+ Original-Request:
+ - req_ruQYEyMa7HE0IL
+ 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_ruQYEyMa7HE0IL
+ 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_1P8hPqKuuB1fWySnJhvcNWbe",
+ "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": "discover",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "unchecked"
+ },
+ "country": "US",
+ "display_brand": "discover",
+ "exp_month": 12,
+ "exp_year": 2025,
+ "fingerprint": "SJztPPlfyEUr9hdK",
+ "funding": "credit",
+ "generated_from": null,
+ "last4": "1117",
+ "networks": {
+ "available": [
+ "discover"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1713871298,
+ "customer": null,
+ "livemode": false,
+ "metadata": {},
+ "type": "card"
+ }
+ recorded_at: Tue, 23 Apr 2024 11:21:39 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:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_ruQYEyMa7HE0IL","request_duration_ms":547}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:21:39 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:
+ - 047ca940-2eb5-4d2f-b864-52b2347968a1
+ Original-Request:
+ - req_RH8SZXNRYFoB3J
+ 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_RH8SZXNRYFoB3J
+ 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_PyejNxKD3I5F0r",
+ "object": "customer",
+ "address": null,
+ "balance": 0,
+ "created": 1713871299,
+ "currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": null,
+ "discount": null,
+ "email": "applecustomer@example.com",
+ "invoice_prefix": "E003F017",
+ "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: Tue, 23 Apr 2024 11:21:39 GMT
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_intents
+ body:
+ encoding: UTF-8
+ string: amount=100¤cy=eur&payment_method=pm_1P8hPqKuuB1fWySnJhvcNWbe&payment_method_types[0]=card&capture_method=manual&customer=cus_PyejNxKD3I5F0r&setup_future_usage=off_session
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_RH8SZXNRYFoB3J","request_duration_ms":508}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:21:39 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1368'
+ 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_intents; 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:
+ - 15c862de-bd7f-4165-95fe-0a6ef281ec0c
+ Original-Request:
+ - req_2BrH7w6xCebHNe
+ 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_2BrH7w6xCebHNe
+ 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": "pi_3P8hPrKuuB1fWySn1waDmlml",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 0,
+ "amount_details": {
+ "tip": {}
+ },
+ "amount_received": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871299,
+ "currency": "eur",
+ "customer": "cus_PyejNxKD3I5F0r",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": null,
+ "latest_charge": null,
+ "livemode": false,
+ "metadata": {},
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": "pm_1P8hPqKuuB1fWySnJhvcNWbe",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "requires_confirmation",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ recorded_at: Tue, 23 Apr 2024 11:21:39 GMT
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_intents/pi_3P8hPrKuuB1fWySn1waDmlml/confirm
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_2BrH7w6xCebHNe","request_duration_ms":395}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:21:40 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1390'
+ 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_intents%2F%3Aintent%2Fconfirm;
+ 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:
+ - f54fb634-6d1b-415a-94a5-755e4b51fc40
+ Original-Request:
+ - req_cKclt9jUdynwP8
+ 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_cKclt9jUdynwP8
+ 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": "pi_3P8hPrKuuB1fWySn1waDmlml",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 100,
+ "amount_details": {
+ "tip": {}
+ },
+ "amount_received": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871299,
+ "currency": "eur",
+ "customer": "cus_PyejNxKD3I5F0r",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": null,
+ "latest_charge": "ch_3P8hPrKuuB1fWySn1yoLj8wA",
+ "livemode": false,
+ "metadata": {},
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": "pm_1P8hPqKuuB1fWySnJhvcNWbe",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "requires_capture",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ recorded_at: Tue, 23 Apr 2024 11:21:41 GMT
+recorded_with: VCR 6.2.0
diff --git a/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Discover_debit_/captures_the_payment.yml b/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Discover_debit_/captures_the_payment.yml
new file mode 100644
index 0000000000..e4457b59f7
--- /dev/null
+++ b/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Discover_debit_/captures_the_payment.yml
@@ -0,0 +1,905 @@
+---
+http_interactions:
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_methods
+ body:
+ encoding: UTF-8
+ string: type=card&card[number]=6011981111111113&card[exp_month]=12&card[exp_year]=2025&card[cvc]=314
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_zrfZPH2c8XapeS","request_duration_ms":1091}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:21:50 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; 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:
+ - 732f1c45-4d19-4494-a03b-d9725780b674
+ Original-Request:
+ - req_4TC4ObnZbMHhnk
+ 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_4TC4ObnZbMHhnk
+ 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_1P8hQ2KuuB1fWySnGpLVYFPe",
+ "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": "discover",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "unchecked"
+ },
+ "country": "US",
+ "display_brand": "discover",
+ "exp_month": 12,
+ "exp_year": 2025,
+ "fingerprint": "Y3EGIoTEEuDsD8eJ",
+ "funding": "debit",
+ "generated_from": null,
+ "last4": "1113",
+ "networks": {
+ "available": [
+ "discover"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1713871310,
+ "customer": null,
+ "livemode": false,
+ "metadata": {},
+ "type": "card"
+ }
+ recorded_at: Tue, 23 Apr 2024 11:21:50 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:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_4TC4ObnZbMHhnk","request_duration_ms":562}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:21:51 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:
+ - b73a1262-166c-410f-bded-4088c4fd9ffd
+ Original-Request:
+ - req_4fHYiy7Ue9KK7M
+ 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_4fHYiy7Ue9KK7M
+ 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_PyejYzVomzn5re",
+ "object": "customer",
+ "address": null,
+ "balance": 0,
+ "created": 1713871310,
+ "currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": null,
+ "discount": null,
+ "email": "applecustomer@example.com",
+ "invoice_prefix": "2A75B94A",
+ "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: Tue, 23 Apr 2024 11:21:51 GMT
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_intents
+ body:
+ encoding: UTF-8
+ string: amount=100¤cy=eur&payment_method=pm_1P8hQ2KuuB1fWySnGpLVYFPe&payment_method_types[0]=card&capture_method=manual&customer=cus_PyejYzVomzn5re&setup_future_usage=off_session
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_4fHYiy7Ue9KK7M","request_duration_ms":507}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:21:51 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1368'
+ 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_intents; 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:
+ - 27b3483e-3f44-4ad0-b677-9f9c8aa2c3b4
+ Original-Request:
+ - req_sRjhbgcqN2bsY7
+ 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_sRjhbgcqN2bsY7
+ 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": "pi_3P8hQ3KuuB1fWySn0ZLWpymG",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 0,
+ "amount_details": {
+ "tip": {}
+ },
+ "amount_received": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871311,
+ "currency": "eur",
+ "customer": "cus_PyejYzVomzn5re",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": null,
+ "latest_charge": null,
+ "livemode": false,
+ "metadata": {},
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": "pm_1P8hQ2KuuB1fWySnGpLVYFPe",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "requires_confirmation",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ recorded_at: Tue, 23 Apr 2024 11:21:51 GMT
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_intents/pi_3P8hQ3KuuB1fWySn0ZLWpymG/confirm
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_sRjhbgcqN2bsY7","request_duration_ms":509}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:21:52 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1390'
+ 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_intents%2F%3Aintent%2Fconfirm;
+ 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:
+ - f79e14b1-a958-405c-bdd2-1d2fc538f322
+ Original-Request:
+ - req_bvdy3sBZtVigM0
+ 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_bvdy3sBZtVigM0
+ 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": "pi_3P8hQ3KuuB1fWySn0ZLWpymG",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 100,
+ "amount_details": {
+ "tip": {}
+ },
+ "amount_received": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871311,
+ "currency": "eur",
+ "customer": "cus_PyejYzVomzn5re",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": null,
+ "latest_charge": "ch_3P8hQ3KuuB1fWySn07iKNKo0",
+ "livemode": false,
+ "metadata": {},
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": "pm_1P8hQ2KuuB1fWySnGpLVYFPe",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "requires_capture",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ recorded_at: Tue, 23 Apr 2024 11:21:52 GMT
+- request:
+ method: get
+ uri: https://api.stripe.com/v1/payment_intents/pi_3P8hQ3KuuB1fWySn0ZLWpymG
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_bvdy3sBZtVigM0","request_duration_ms":1102}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:21:53 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1390'
+ 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_intents%2F%3Aintent;
+ 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"
+ 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_M578EkslUXdo3o
+ 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": "pi_3P8hQ3KuuB1fWySn0ZLWpymG",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 100,
+ "amount_details": {
+ "tip": {}
+ },
+ "amount_received": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871311,
+ "currency": "eur",
+ "customer": "cus_PyejYzVomzn5re",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": null,
+ "latest_charge": "ch_3P8hQ3KuuB1fWySn07iKNKo0",
+ "livemode": false,
+ "metadata": {},
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": "pm_1P8hQ2KuuB1fWySnGpLVYFPe",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "requires_capture",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ recorded_at: Tue, 23 Apr 2024 11:21:53 GMT
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_intents/pi_3P8hQ3KuuB1fWySn0ZLWpymG/capture
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_M578EkslUXdo3o","request_duration_ms":406}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:21:54 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1383'
+ 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_intents%2F%3Aintent%2Fcapture;
+ 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:
+ - 1343fa34-5cfa-408b-9ea3-282d41ada996
+ Original-Request:
+ - req_oEbaBwF6ygxOF7
+ 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_oEbaBwF6ygxOF7
+ 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": "pi_3P8hQ3KuuB1fWySn0ZLWpymG",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 0,
+ "amount_details": {
+ "tip": {}
+ },
+ "amount_received": 100,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871311,
+ "currency": "eur",
+ "customer": "cus_PyejYzVomzn5re",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": null,
+ "latest_charge": "ch_3P8hQ3KuuB1fWySn07iKNKo0",
+ "livemode": false,
+ "metadata": {},
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": "pm_1P8hQ2KuuB1fWySnGpLVYFPe",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "succeeded",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ recorded_at: Tue, 23 Apr 2024 11:21:54 GMT
+- request:
+ method: get
+ uri: https://api.stripe.com/v1/payment_intents/pi_3P8hQ3KuuB1fWySn0ZLWpymG
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_oEbaBwF6ygxOF7","request_duration_ms":1121}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:21:54 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1383'
+ 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_intents%2F%3Aintent;
+ 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"
+ 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_p4PeKqmC2GcoAk
+ 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": "pi_3P8hQ3KuuB1fWySn0ZLWpymG",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 0,
+ "amount_details": {
+ "tip": {}
+ },
+ "amount_received": 100,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "",
+ "confirmation_method": "automatic",
+ "created": 1713871311,
+ "currency": "eur",
+ "customer": "cus_PyejYzVomzn5re",
+ "description": null,
+ "invoice": null,
+ "last_payment_error": null,
+ "latest_charge": "ch_3P8hQ3KuuB1fWySn07iKNKo0",
+ "livemode": false,
+ "metadata": {},
+ "next_action": null,
+ "on_behalf_of": null,
+ "payment_method": "pm_1P8hQ2KuuB1fWySnGpLVYFPe",
+ "payment_method_configuration_details": null,
+ "payment_method_options": {
+ "card": {
+ "installments": null,
+ "mandate_options": null,
+ "network": null,
+ "request_three_d_secure": "automatic"
+ }
+ },
+ "payment_method_types": [
+ "card"
+ ],
+ "processing": null,
+ "receipt_email": null,
+ "review": null,
+ "setup_future_usage": "off_session",
+ "shipping": null,
+ "source": null,
+ "statement_descriptor": null,
+ "statement_descriptor_suffix": null,
+ "status": "succeeded",
+ "transfer_data": null,
+ "transfer_group": null
+ }
+ recorded_at: Tue, 23 Apr 2024 11:21:54 GMT
+recorded_with: VCR 6.2.0
diff --git a/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Discover_debit_/returns_payment_intent_id_and_does_not_raise.yml b/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Discover_debit_/returns_payment_intent_id_and_does_not_raise.yml
new file mode 100644
index 0000000000..e58dedb2e8
--- /dev/null
+++ b/spec/fixtures/vcr_cassettes/Stripe-v11.1.0/Stripe_PaymentIntentValidator/_call/as_a_Stripe_customer/when_payment_intent_is_valid/valid_non-3D_credit_cards_are_correctly_handled/behaves_like_payments_intents/from_Discover_debit_/returns_payment_intent_id_and_does_not_raise.yml
@@ -0,0 +1,512 @@
+---
+http_interactions:
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_methods
+ body:
+ encoding: UTF-8
+ string: type=card&card[number]=6011981111111113&card[exp_month]=12&card[exp_year]=2025&card[cvc]=314
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_SiTlYVqYvz9Aeu","request_duration_ms":2}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:21:47 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; 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:
+ - 613f61ce-a28b-4e82-8c1d-043b41bcedf0
+ Original-Request:
+ - req_gjVPNV1bZJCG5V
+ 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_gjVPNV1bZJCG5V
+ 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_1P8hPzKuuB1fWySnHJcIIcGd",
+ "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": "discover",
+ "checks": {
+ "address_line1_check": null,
+ "address_postal_code_check": null,
+ "cvc_check": "unchecked"
+ },
+ "country": "US",
+ "display_brand": "discover",
+ "exp_month": 12,
+ "exp_year": 2025,
+ "fingerprint": "Y3EGIoTEEuDsD8eJ",
+ "funding": "debit",
+ "generated_from": null,
+ "last4": "1113",
+ "networks": {
+ "available": [
+ "discover"
+ ],
+ "preferred": null
+ },
+ "three_d_secure_usage": {
+ "supported": true
+ },
+ "wallet": null
+ },
+ "created": 1713871307,
+ "customer": null,
+ "livemode": false,
+ "metadata": {},
+ "type": "card"
+ }
+ recorded_at: Tue, 23 Apr 2024 11:21:47 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:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_gjVPNV1bZJCG5V","request_duration_ms":620}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:21:48 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:
+ - dc84e649-01b9-40e1-89ab-bc1d4d9fe428
+ Original-Request:
+ - req_R8EWXoiJRbQ2hS
+ 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_R8EWXoiJRbQ2hS
+ 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_PyejMjytBCz673",
+ "object": "customer",
+ "address": null,
+ "balance": 0,
+ "created": 1713871308,
+ "currency": null,
+ "default_source": null,
+ "delinquent": false,
+ "description": null,
+ "discount": null,
+ "email": "applecustomer@example.com",
+ "invoice_prefix": "370B4AA9",
+ "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: Tue, 23 Apr 2024 11:21:48 GMT
+- request:
+ method: post
+ uri: https://api.stripe.com/v1/payment_intents
+ body:
+ encoding: UTF-8
+ string: amount=100¤cy=eur&payment_method=pm_1P8hPzKuuB1fWySnHJcIIcGd&payment_method_types[0]=card&capture_method=manual&customer=cus_PyejMjytBCz673&setup_future_usage=off_session
+ headers:
+ User-Agent:
+ - Stripe/v1 RubyBindings/11.1.0
+ Authorization:
+ - ""
+ Content-Type:
+ - application/x-www-form-urlencoded
+ X-Stripe-Client-Telemetry:
+ - '{"last_request_metrics":{"request_id":"req_R8EWXoiJRbQ2hS","request_duration_ms":416}}'
+ Stripe-Version:
+ - '2024-04-10'
+ X-Stripe-Client-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:
+ - Tue, 23 Apr 2024 11:21:48 GMT
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '1368'
+ 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_intents; 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:
+ - 404e8c97-149a-4587-a64a-fe47c10c25e6
+ Original-Request:
+ - req_TEowAnkuxQIfVC
+ 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_TEowAnkuxQIfVC
+ 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": "pi_3P8hQ0KuuB1fWySn19kz36u1",
+ "object": "payment_intent",
+ "amount": 100,
+ "amount_capturable": 0,
+ "amount_details": {
+ "tip": {}
+ },
+ "amount_received": 0,
+ "application": null,
+ "application_fee_amount": null,
+ "automatic_payment_methods": null,
+ "canceled_at": null,
+ "cancellation_reason": null,
+ "capture_method": "manual",
+ "client_secret": "