Open jessicasalmon opened 7 years ago
1 pomodoro dummy object representing the customer information that stripe will store for us:
customer object
{
"id": "cus_Aat5sroWwNme5E",
"object": "customer",
"account_balance": 0,
"created": 1493894172,
"currency": null,
"default_source": "card_1AFhJ2DelOQugZzAjA2kX48P",
"delinquent": false,
"description": "Mason White",
"discount": null,
"email": "mason.white.28@example.com",
"livemode": false,
"metadata": {},
"shipping": null,
"sources": {
"object": "list",
"data": [
{
"id": "card_1AFhJ2DelOQugZzAjA2kX48P",
"object": "card",
"address_city": null,
"address_country": null,
"address_line1": null,
"address_line1_check": null,
"address_line2": null,
"address_state": null,
"address_zip": "94301",
"address_zip_check": "pass",
"brand": "Visa",
"country": "US",
"customer": "cus_Aat5sroWwNme5E",
"cvc_check": "pass",
"dynamic_last4": null,
"exp_month": 12,
"exp_year": 2018,
"fingerprint": "uaStcxNonTKyApaZ",
"funding": "credit",
"last4": "4242",
"metadata": {},
"name": null,
"tokenization_method": null
}
],
"has_more": false,
"total_count": 1,
"url": "/v1/customers/cus_Aat5sroWwNme5E/sources"
},
"subscriptions": {
"object": "list",
"data": [],
"has_more": false,
"total_count": 0,
"url": "/v1/customers/cus_Aat5sroWwNme5E/subscriptions"
}
}
one-time charge object
{
"id": "ch_1AFhSpDelOQugZzAxgOfoLkH",
"object": "charge",
"amount": 2000,
"amount_refunded": 0,
"application": null,
"application_fee": null,
"balance_transaction": "txn_1AFhSpDelOQugZzAeL0oBu9I",
"captured": true,
"created": 1493894739,
"currency": "gbp",
"customer": "cus_Aat5sroWwNme5E",
"description": null,
"destination": null,
"dispute": null,
"failure_code": null,
"failure_message": null,
"fraud_details": {},
"invoice": null,
"livemode": false,
"metadata": {},
"on_behalf_of": null,
"order": null,
"outcome": {
"network_status": "approved_by_network",
"reason": null,
"risk_level": "normal",
"seller_message": "Payment complete.",
"type": "authorized"
},
"paid": true,
"receipt_email": null,
"receipt_number": null,
"refunded": false,
"refunds": {
"object": "list",
"data": [],
"has_more": false,
"total_count": 0,
"url": "/v1/charges/ch_1AFhSpDelOQugZzAxgOfoLkH/refunds"
},
"review": null,
"shipping": null,
"source": {
"id": "card_1AFhJ2DelOQugZzAjA2kX48P",
"object": "card",
"address_city": null,
"address_country": null,
"address_line1": null,
"address_line1_check": null,
"address_line2": null,
"address_state": null,
"address_zip": "94301",
"address_zip_check": "pass",
"brand": "Visa",
"country": "US",
"customer": "cus_Aat5sroWwNme5E",
"cvc_check": null,
"dynamic_last4": null,
"exp_month": 12,
"exp_year": 2018,
"fingerprint": "uaStcxNonTKyApaZ",
"funding": "credit",
"last4": "4242",
"metadata": {},
"name": null,
"tokenization_method": null
},
"source_transfer": null,
"statement_descriptor": null,
"status": "succeeded",
"transfer_group": null
}
recurring charge/ subscription object
{
"id": "diamond-infinite-707",
"object": "plan",
"amount": 999,
"created": 1493895054,
"currency": "gbp",
"interval": "month",
"interval_count": 1,
"livemode": false,
"metadata": {},
"name": "Diamond Infinite",
"statement_descriptor": null,
"trial_period_days": null
}
payment process:
We will need to use the stripe npm module
npm install --save stripe
email as unique identifier?
let's collate a readme for stripe integration. Please leave findings in comments, and then we can make it into a coherent document once we've successfully integrated stripe into our app