2021-06-11 14:29:30 +02:00
|
|
|
---
|
|
|
|
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]=4&card[exp_year]=2022&card[cvc]=314
|
|
|
|
headers:
|
|
|
|
User-Agent:
|
|
|
|
- Stripe/v1 RubyBindings/5.29.0
|
|
|
|
Authorization:
|
|
|
|
- Bearer sk_test_testfaketestfaketestfake
|
|
|
|
Content-Type:
|
|
|
|
- application/x-www-form-urlencoded
|
|
|
|
X-Stripe-Client-Telemetry:
|
2021-09-13 14:25:30 +02:00
|
|
|
- '{"last_request_metrics":{"request_id":"req_Xmih0ndHQjzde4","request_duration_ms":562}}'
|
2021-06-11 14:29:30 +02:00
|
|
|
Stripe-Version:
|
|
|
|
- '2019-08-14'
|
|
|
|
X-Stripe-Client-User-Agent:
|
2021-09-13 14:25:30 +02:00
|
|
|
- '{"bindings_version":"5.29.0","lang":"ruby","lang_version":"2.6.3 p62 (2019-04-16)","platform":"x86_64-darwin18","engine":"ruby","publisher":"stripe","uname":"Darwin
|
|
|
|
MacBook-Pro-Sleede-Peng 20.5.0 Darwin Kernel Version 20.5.0: Sat May 8 05:10:33
|
|
|
|
PDT 2021; root:xnu-7195.121.3~9/RELEASE_X86_64 x86_64","hostname":"MacBook-Pro-Sleede-Peng"}'
|
2021-06-11 14:29:30 +02:00
|
|
|
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:
|
2021-09-13 14:25:30 +02:00
|
|
|
- Mon, 13 Sep 2021 11:24:18 GMT
|
2021-06-11 14:29:30 +02:00
|
|
|
Content-Type:
|
|
|
|
- application/json
|
|
|
|
Content-Length:
|
|
|
|
- '934'
|
|
|
|
Connection:
|
|
|
|
- keep-alive
|
|
|
|
Access-Control-Allow-Credentials:
|
|
|
|
- 'true'
|
|
|
|
Access-Control-Allow-Methods:
|
|
|
|
- GET, POST, HEAD, OPTIONS, DELETE
|
|
|
|
Access-Control-Allow-Origin:
|
|
|
|
- "*"
|
|
|
|
Access-Control-Expose-Headers:
|
|
|
|
- Request-Id, Stripe-Manage-Version, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required
|
|
|
|
Access-Control-Max-Age:
|
|
|
|
- '300'
|
|
|
|
Cache-Control:
|
|
|
|
- no-cache, no-store
|
|
|
|
Request-Id:
|
2021-09-13 14:25:30 +02:00
|
|
|
- req_N1g65uclGQAjib
|
2021-06-11 14:29:30 +02:00
|
|
|
Stripe-Version:
|
|
|
|
- '2019-08-14'
|
|
|
|
X-Stripe-C-Cost:
|
2021-09-13 14:25:30 +02:00
|
|
|
- '6'
|
2021-06-11 14:29:30 +02:00
|
|
|
Strict-Transport-Security:
|
|
|
|
- max-age=31556926; includeSubDomains; preload
|
|
|
|
body:
|
|
|
|
encoding: UTF-8
|
|
|
|
string: |
|
|
|
|
{
|
2021-09-13 14:25:30 +02:00
|
|
|
"id": "pm_1JZDGn2sOmf47Nz9HXdzATLZ",
|
2021-06-11 14:29:30 +02:00
|
|
|
"object": "payment_method",
|
|
|
|
"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",
|
|
|
|
"exp_month": 4,
|
|
|
|
"exp_year": 2022,
|
|
|
|
"fingerprint": "xsVM9Mfv9kfwhRSL",
|
|
|
|
"funding": "credit",
|
|
|
|
"generated_from": null,
|
|
|
|
"last4": "0002",
|
|
|
|
"networks": {
|
|
|
|
"available": [
|
|
|
|
"visa"
|
|
|
|
],
|
|
|
|
"preferred": null
|
|
|
|
},
|
|
|
|
"three_d_secure_usage": {
|
|
|
|
"supported": true
|
|
|
|
},
|
|
|
|
"wallet": null
|
|
|
|
},
|
2021-09-13 14:25:30 +02:00
|
|
|
"created": 1631532258,
|
2021-06-11 14:29:30 +02:00
|
|
|
"customer": null,
|
|
|
|
"livemode": false,
|
|
|
|
"metadata": {
|
|
|
|
},
|
|
|
|
"type": "card"
|
|
|
|
}
|
2021-09-13 14:25:30 +02:00
|
|
|
recorded_at: Mon, 13 Sep 2021 11:24:18 GMT
|
2021-06-11 14:29:30 +02:00
|
|
|
- request:
|
|
|
|
method: post
|
|
|
|
uri: https://api.stripe.com/v1/payment_intents
|
|
|
|
body:
|
|
|
|
encoding: UTF-8
|
2021-09-13 14:25:30 +02:00
|
|
|
string: payment_method=pm_1JZDGn2sOmf47Nz9HXdzATLZ&amount=3000¤cy=usd&confirmation_method=manual&confirm=true&customer=cus_IhIynmoJbzLpwX
|
2021-06-11 14:29:30 +02:00
|
|
|
headers:
|
|
|
|
User-Agent:
|
|
|
|
- Stripe/v1 RubyBindings/5.29.0
|
|
|
|
Authorization:
|
|
|
|
- Bearer sk_test_testfaketestfaketestfake
|
|
|
|
Content-Type:
|
|
|
|
- application/x-www-form-urlencoded
|
|
|
|
X-Stripe-Client-Telemetry:
|
2021-09-13 14:25:30 +02:00
|
|
|
- '{"last_request_metrics":{"request_id":"req_N1g65uclGQAjib","request_duration_ms":584}}'
|
2021-06-11 14:29:30 +02:00
|
|
|
Stripe-Version:
|
|
|
|
- '2019-08-14'
|
|
|
|
X-Stripe-Client-User-Agent:
|
2021-09-13 14:25:30 +02:00
|
|
|
- '{"bindings_version":"5.29.0","lang":"ruby","lang_version":"2.6.3 p62 (2019-04-16)","platform":"x86_64-darwin18","engine":"ruby","publisher":"stripe","uname":"Darwin
|
|
|
|
MacBook-Pro-Sleede-Peng 20.5.0 Darwin Kernel Version 20.5.0: Sat May 8 05:10:33
|
|
|
|
PDT 2021; root:xnu-7195.121.3~9/RELEASE_X86_64 x86_64","hostname":"MacBook-Pro-Sleede-Peng"}'
|
2021-06-11 14:29:30 +02:00
|
|
|
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:
|
2021-09-13 14:25:30 +02:00
|
|
|
- Mon, 13 Sep 2021 11:24:19 GMT
|
2021-06-11 14:29:30 +02:00
|
|
|
Content-Type:
|
|
|
|
- application/json
|
|
|
|
Content-Length:
|
|
|
|
- '7831'
|
|
|
|
Connection:
|
|
|
|
- keep-alive
|
|
|
|
Access-Control-Allow-Credentials:
|
|
|
|
- 'true'
|
|
|
|
Access-Control-Allow-Methods:
|
|
|
|
- GET, POST, HEAD, OPTIONS, DELETE
|
|
|
|
Access-Control-Allow-Origin:
|
|
|
|
- "*"
|
|
|
|
Access-Control-Expose-Headers:
|
|
|
|
- Request-Id, Stripe-Manage-Version, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required
|
|
|
|
Access-Control-Max-Age:
|
|
|
|
- '300'
|
|
|
|
Cache-Control:
|
|
|
|
- no-cache, no-store
|
|
|
|
Request-Id:
|
2021-09-13 14:25:30 +02:00
|
|
|
- req_fvB5biOXUu3Ogv
|
2021-06-11 14:29:30 +02:00
|
|
|
Stripe-Version:
|
|
|
|
- '2019-08-14'
|
|
|
|
X-Stripe-C-Cost:
|
|
|
|
- '7'
|
|
|
|
Strict-Transport-Security:
|
|
|
|
- max-age=31556926; includeSubDomains; preload
|
|
|
|
body:
|
|
|
|
encoding: UTF-8
|
|
|
|
string: |
|
|
|
|
{
|
|
|
|
"error": {
|
2021-09-13 14:25:30 +02:00
|
|
|
"charge": "ch_3JZDGo2sOmf47Nz91anusa7B",
|
2021-06-11 14:29:30 +02:00
|
|
|
"code": "card_declined",
|
|
|
|
"decline_code": "generic_decline",
|
|
|
|
"doc_url": "https://stripe.com/docs/error-codes/card-declined",
|
|
|
|
"message": "Your card was declined.",
|
|
|
|
"payment_intent": {
|
2021-09-13 14:25:30 +02:00
|
|
|
"id": "pi_3JZDGo2sOmf47Nz912ny1od2",
|
2021-06-11 14:29:30 +02:00
|
|
|
"object": "payment_intent",
|
|
|
|
"amount": 3000,
|
|
|
|
"amount_capturable": 0,
|
|
|
|
"amount_received": 0,
|
|
|
|
"application": null,
|
|
|
|
"application_fee_amount": null,
|
|
|
|
"canceled_at": null,
|
|
|
|
"cancellation_reason": null,
|
|
|
|
"capture_method": "automatic",
|
|
|
|
"charges": {
|
|
|
|
"object": "list",
|
|
|
|
"data": [
|
|
|
|
{
|
2021-09-13 14:25:30 +02:00
|
|
|
"id": "ch_3JZDGo2sOmf47Nz91anusa7B",
|
2021-06-11 14:29:30 +02:00
|
|
|
"object": "charge",
|
|
|
|
"amount": 3000,
|
|
|
|
"amount_captured": 0,
|
|
|
|
"amount_refunded": 0,
|
|
|
|
"application": null,
|
|
|
|
"application_fee": null,
|
|
|
|
"application_fee_amount": null,
|
|
|
|
"balance_transaction": null,
|
|
|
|
"billing_details": {
|
|
|
|
"address": {
|
|
|
|
"city": null,
|
|
|
|
"country": null,
|
|
|
|
"line1": null,
|
|
|
|
"line2": null,
|
|
|
|
"postal_code": null,
|
|
|
|
"state": null
|
|
|
|
},
|
|
|
|
"email": null,
|
|
|
|
"name": null,
|
|
|
|
"phone": null
|
|
|
|
},
|
|
|
|
"calculated_statement_descriptor": "Stripe",
|
|
|
|
"captured": false,
|
2021-09-13 14:25:30 +02:00
|
|
|
"created": 1631532258,
|
2021-06-11 14:29:30 +02:00
|
|
|
"currency": "usd",
|
|
|
|
"customer": "cus_IhIynmoJbzLpwX",
|
|
|
|
"description": null,
|
|
|
|
"destination": null,
|
|
|
|
"dispute": null,
|
|
|
|
"disputed": false,
|
|
|
|
"failure_code": "card_declined",
|
|
|
|
"failure_message": "Your card was declined.",
|
|
|
|
"fraud_details": {
|
|
|
|
},
|
|
|
|
"invoice": null,
|
|
|
|
"livemode": false,
|
|
|
|
"metadata": {
|
|
|
|
},
|
|
|
|
"on_behalf_of": null,
|
|
|
|
"order": null,
|
|
|
|
"outcome": {
|
|
|
|
"network_status": "declined_by_network",
|
|
|
|
"reason": "generic_decline",
|
|
|
|
"risk_level": "normal",
|
2021-09-13 14:25:30 +02:00
|
|
|
"risk_score": 60,
|
2021-06-11 14:29:30 +02:00
|
|
|
"seller_message": "The bank did not return any further details with this decline.",
|
|
|
|
"type": "issuer_declined"
|
|
|
|
},
|
|
|
|
"paid": false,
|
2021-09-13 14:25:30 +02:00
|
|
|
"payment_intent": "pi_3JZDGo2sOmf47Nz912ny1od2",
|
|
|
|
"payment_method": "pm_1JZDGn2sOmf47Nz9HXdzATLZ",
|
2021-06-11 14:29:30 +02:00
|
|
|
"payment_method_details": {
|
|
|
|
"card": {
|
|
|
|
"brand": "visa",
|
|
|
|
"checks": {
|
|
|
|
"address_line1_check": null,
|
|
|
|
"address_postal_code_check": null,
|
|
|
|
"cvc_check": "pass"
|
|
|
|
},
|
|
|
|
"country": "US",
|
|
|
|
"exp_month": 4,
|
|
|
|
"exp_year": 2022,
|
|
|
|
"fingerprint": "xsVM9Mfv9kfwhRSL",
|
|
|
|
"funding": "credit",
|
|
|
|
"installments": null,
|
|
|
|
"last4": "0002",
|
|
|
|
"network": "visa",
|
|
|
|
"three_d_secure": null,
|
|
|
|
"wallet": null
|
|
|
|
},
|
|
|
|
"type": "card"
|
|
|
|
},
|
|
|
|
"receipt_email": null,
|
|
|
|
"receipt_number": null,
|
|
|
|
"receipt_url": null,
|
|
|
|
"refunded": false,
|
|
|
|
"refunds": {
|
|
|
|
"object": "list",
|
|
|
|
"data": [
|
|
|
|
|
|
|
|
],
|
|
|
|
"has_more": false,
|
|
|
|
"total_count": 0,
|
2021-09-13 14:25:30 +02:00
|
|
|
"url": "/v1/charges/ch_3JZDGo2sOmf47Nz91anusa7B/refunds"
|
2021-06-11 14:29:30 +02:00
|
|
|
},
|
|
|
|
"review": null,
|
|
|
|
"shipping": null,
|
|
|
|
"source": null,
|
|
|
|
"source_transfer": null,
|
|
|
|
"statement_descriptor": null,
|
|
|
|
"statement_descriptor_suffix": null,
|
|
|
|
"status": "failed",
|
|
|
|
"transfer_data": null,
|
|
|
|
"transfer_group": null
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"has_more": false,
|
|
|
|
"total_count": 1,
|
2021-09-13 14:25:30 +02:00
|
|
|
"url": "/v1/charges?payment_intent=pi_3JZDGo2sOmf47Nz912ny1od2"
|
2021-06-11 14:29:30 +02:00
|
|
|
},
|
2021-09-13 14:25:30 +02:00
|
|
|
"client_secret": "pi_3JZDGo2sOmf47Nz912ny1od2_secret_luIvv5fLASFIdYbO0iekZttpZ",
|
2021-06-11 14:29:30 +02:00
|
|
|
"confirmation_method": "manual",
|
2021-09-13 14:25:30 +02:00
|
|
|
"created": 1631532258,
|
2021-06-11 14:29:30 +02:00
|
|
|
"currency": "usd",
|
|
|
|
"customer": "cus_IhIynmoJbzLpwX",
|
|
|
|
"description": null,
|
|
|
|
"invoice": null,
|
|
|
|
"last_payment_error": {
|
2021-09-13 14:25:30 +02:00
|
|
|
"charge": "ch_3JZDGo2sOmf47Nz91anusa7B",
|
2021-06-11 14:29:30 +02:00
|
|
|
"code": "card_declined",
|
|
|
|
"decline_code": "generic_decline",
|
|
|
|
"doc_url": "https://stripe.com/docs/error-codes/card-declined",
|
|
|
|
"message": "Your card was declined.",
|
|
|
|
"payment_method": {
|
2021-09-13 14:25:30 +02:00
|
|
|
"id": "pm_1JZDGn2sOmf47Nz9HXdzATLZ",
|
2021-06-11 14:29:30 +02:00
|
|
|
"object": "payment_method",
|
|
|
|
"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",
|
|
|
|
"exp_month": 4,
|
|
|
|
"exp_year": 2022,
|
|
|
|
"fingerprint": "xsVM9Mfv9kfwhRSL",
|
|
|
|
"funding": "credit",
|
|
|
|
"generated_from": null,
|
|
|
|
"last4": "0002",
|
|
|
|
"networks": {
|
|
|
|
"available": [
|
|
|
|
"visa"
|
|
|
|
],
|
|
|
|
"preferred": null
|
|
|
|
},
|
|
|
|
"three_d_secure_usage": {
|
|
|
|
"supported": true
|
|
|
|
},
|
|
|
|
"wallet": null
|
|
|
|
},
|
2021-09-13 14:25:30 +02:00
|
|
|
"created": 1631532258,
|
2021-06-11 14:29:30 +02:00
|
|
|
"customer": null,
|
|
|
|
"livemode": false,
|
|
|
|
"metadata": {
|
|
|
|
},
|
|
|
|
"type": "card"
|
|
|
|
},
|
|
|
|
"type": "card_error"
|
|
|
|
},
|
|
|
|
"livemode": false,
|
|
|
|
"metadata": {
|
|
|
|
},
|
|
|
|
"next_action": null,
|
|
|
|
"on_behalf_of": null,
|
|
|
|
"payment_method": null,
|
|
|
|
"payment_method_options": {
|
|
|
|
"card": {
|
|
|
|
"installments": null,
|
|
|
|
"network": null,
|
|
|
|
"request_three_d_secure": "automatic"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"payment_method_types": [
|
|
|
|
"card"
|
|
|
|
],
|
|
|
|
"receipt_email": null,
|
|
|
|
"review": null,
|
|
|
|
"setup_future_usage": null,
|
|
|
|
"shipping": null,
|
|
|
|
"source": null,
|
|
|
|
"statement_descriptor": null,
|
|
|
|
"statement_descriptor_suffix": null,
|
|
|
|
"status": "requires_payment_method",
|
|
|
|
"transfer_data": null,
|
|
|
|
"transfer_group": null
|
|
|
|
},
|
|
|
|
"payment_method": {
|
2021-09-13 14:25:30 +02:00
|
|
|
"id": "pm_1JZDGn2sOmf47Nz9HXdzATLZ",
|
2021-06-11 14:29:30 +02:00
|
|
|
"object": "payment_method",
|
|
|
|
"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",
|
|
|
|
"exp_month": 4,
|
|
|
|
"exp_year": 2022,
|
|
|
|
"fingerprint": "xsVM9Mfv9kfwhRSL",
|
|
|
|
"funding": "credit",
|
|
|
|
"generated_from": null,
|
|
|
|
"last4": "0002",
|
|
|
|
"networks": {
|
|
|
|
"available": [
|
|
|
|
"visa"
|
|
|
|
],
|
|
|
|
"preferred": null
|
|
|
|
},
|
|
|
|
"three_d_secure_usage": {
|
|
|
|
"supported": true
|
|
|
|
},
|
|
|
|
"wallet": null
|
|
|
|
},
|
2021-09-13 14:25:30 +02:00
|
|
|
"created": 1631532258,
|
2021-06-11 14:29:30 +02:00
|
|
|
"customer": null,
|
|
|
|
"livemode": false,
|
|
|
|
"metadata": {
|
|
|
|
},
|
|
|
|
"type": "card"
|
|
|
|
},
|
|
|
|
"type": "card_error"
|
|
|
|
}
|
|
|
|
}
|
2021-09-13 14:25:30 +02:00
|
|
|
recorded_at: Mon, 13 Sep 2021 11:24:19 GMT
|
2021-06-11 14:29:30 +02:00
|
|
|
recorded_with: VCR 6.0.0
|