{"info":{"_postman_id":"0c24600f-5930-48d6-ab8e-a2952e8d1062","name":"Core Payments - Implementation Guide","description":"This collection is meant to be used alongside the Stripe [Implementation Guides documentation](https://stripe.com/docs/implementation-guides/core-payments).\n\nBefore getting started, you will want to be sure to populate the {{secret_key}} collection variable with the one that can be found in your [Stripe Dashboard Test API Key Settings](https://dashboard.stripe.com/test/apikeys).\n\nYou will notice that in some cases this collection will save certain ID's as variables for you to make chaining requests easier.  For example, the example of refunding a charge will save the ID of the charge to use in the refund request.","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json"},"item":[{"name":"Payments with Auto Capture","item":[{"name":"Create a PaymentIntent (Automatic Capture)","id":"ed2d4252-ad9e-4742-bcd5-a3b5a6b96181","request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"amount","value":"10500","type":"text"},{"key":"currency","value":"usd","type":"text"},{"key":"capture_method","value":"automatic","type":"text"},{"key":"confirm","value":"true","type":"text"},{"key":"customer","value":"{{customer_object_id}}","description":"If you want to test with a Customer object, create a customer via the \"Customers\" folder within this collection and its ID will be stored as a variable.  Alternatively, you can directly input an ID here","type":"text","disabled":true},{"key":"payment_method","value":"pm_card_visa","description":"You can find more test cards here: https://stripe.com/docs/testing","type":"text"},{"key":"description","value":"Automatic Capture Payment Intent","type":"text"}]},"url":"https://api.stripe.com/v1/payment_intents","description":"This is an example of a request to create a PaymentIntent which is automatically captured.  \n\n#### Documentation:\nPaymentIntents: https://stripe.com/docs/api/payment_intents/create\n\nThese requests use a test visa payment method.  If you like you can also test other payment scenarios by using any of our [test cards/payment methods from our documentation](https://stripe.com/docs/testing)."},"response":[]},{"name":"Create a Charge","id":"3ff58781-5a73-47f1-9cac-b1e493bd1d28","request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"amount","value":"10500","type":"text"},{"key":"currency","value":"usd","type":"text"},{"key":"source","value":"tok_visa","type":"text"},{"key":"customer","value":"{{customer_object_id}}","description":"If you want to test with a Customer object, create a customer via the \"Customers\" folder within this collection and its ID will be stored as a variable.  Alternatively, you can directly input an ID here","type":"text","disabled":true},{"key":"description","value":"Automatic Capture Charge","type":"text"}]},"url":"https://api.stripe.com/v1/charges","description":"This is an example of a request to create a PaymentIntent which is automatically captured.  \n\n#### Documentation:\nCharges: https://stripe.com/docs/api/charges/create\n\nThese requests use a test visa payment method.  If you like you can also test other payment scenarios by using any of our [test cards/payment methods from our documentation](https://stripe.com/docs/testing)."},"response":[]}],"id":"0b04e844-628e-4997-83c8-6f24ec59645f","description":"This folder contains examples of how to create simple charges that are automatically captured.  \n\nThe documentation that corresponds with it can be found [here](https://stripe.com/docs/implementation-guides/core-payments/server-side-integration)."},{"name":"Payments with Separate Capture","item":[{"name":"v1/payment_intents","item":[{"name":"Create a PaymentIntent (Auth Only)","event":[{"listen":"test","script":{"type":"text/javascript","exec":["var jsonData = JSON.parse(responseBody);","//save the network transaction id to a cVar so it can be used in the next step. ","pm.collectionVariables.set(\"auth_payment_intent_id\", jsonData.id);","console.log(\"Payment Intent Id\" + jsonData.id);"]}}],"id":"eef48f68-a05c-4356-9475-7d0bc74d1b6f","request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"amount","value":"10000","type":"text"},{"key":"currency","value":"usd","type":"text"},{"key":"capture_method","value":"manual","description":"\"Manual\" denotes that you would like to perform an auth for later capture","type":"text"},{"key":"confirm","value":"true","type":"text"},{"key":"customer","value":"{{customer_object_id}}","description":"If you want to test with a Customer object, create a customer via the \"Customers\" folder within this collection and its ID will be stored as a variable.  Alternatively, you can directly input an ID here","type":"text","disabled":true},{"key":"payment_method","value":"pm_card_visa","description":"See: https://stripe.com/docs/testing for more test cards","type":"text"},{"key":"description","value":"Testing separate auth and capture","type":"text"}]},"url":"https://api.stripe.com/v1/payment_intents","description":"This is the auth step for PaymentIntents.  \n\n#### Documentation:\nPaymentIntents: https://stripe.com/docs/payments/capture-later"},"response":[]},{"name":"Capture a PaymentIntent","id":"4c9fce04-4cb8-41fa-aff5-6af40c1adfdf","request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"amount","value":"","description":"If you would like to only capture a portion of the authorization, enter an amount less that the original charge. ","type":"text","disabled":true}]},"url":"https://api.stripe.com/v1/payment_intents/{{auth_payment_intent_id}}/capture","description":"This is the capture step for PaymentIntents.  \n\n#### Documentation:\nPaymentIntents: https://stripe.com/docs/payments/capture-later"},"response":[]}],"id":"626784c5-aaa6-47dd-9cc8-6188e6bb531b","description":"This is an example of a request to create a PaymentIntent which is captured separately from the creation of an authorization.  \n\n#### Documentation:\nPaymentIntents: https://stripe.com/docs/payments/capture-later\n\nThese requests use a test visa payment method.  If you like you can also test other payment scenarios by using any of our [test cards/payment methods from our documentation](https://stripe.com/docs/testing)."},{"name":"v1/charges","item":[{"name":"Create a Charge (Auth Only)","event":[{"listen":"test","script":{"type":"text/javascript","exec":["var jsonData = JSON.parse(responseBody);","//save the network transaction id to a cVar so it can be used in the next step. ","pm.collectionVariables.set(\"auth_charge_id\", jsonData.id);","console.log(\"Charge Id\" + jsonData.id);"]}}],"id":"79adc7ac-bcea-4f4d-96bd-9d083bacd9f7","request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"amount","value":"10500","type":"text"},{"key":"currency","value":"usd","type":"text"},{"key":"source","value":"tok_visa","type":"text"},{"key":"customer","value":"{{customer_object_id}}","description":"If you want to test with a Customer object, create a customer via the \"Customers\" folder within this collection and its ID will be stored as a variable.  Alternatively, you can directly input an ID here","type":"text","disabled":true},{"key":"capture","value":"false","description":"This parameter signals that you would like to authorize and capture later","type":"text"},{"key":"description","value":"Automatic Capture Charge","type":"text"}]},"url":"https://api.stripe.com/v1/charges","description":"This is auth step for v1/charges.  \n\n#### Documentation:\nCharges: https://stripe.com/docs/charges/placing-a-hold\n\nThese requests use a test visa payment method.  If you like you can also test other payment scenarios by using any of our [test cards/payment methods from our documentation](https://stripe.com/docs/testing)."},"response":[]},{"name":"Capture a charge","id":"5b7feb92-e0be-47b0-a10e-80c749ade27e","request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"amount","value":"400","description":"If you would like to only capture a portion of the authorization, enter an amount less that the original charge. ","type":"text","disabled":true}]},"url":"https://api.stripe.com/v1/charges/{{auth_charge_id}}/capture","description":"This is the capture step for v1/charges.  \n\n#### Documentation:\nCharges: https://stripe.com/docs/charges/placing-a-hold"},"response":[]}],"id":"e467a7c1-1538-4f67-9c23-5fe2efdfa3d4","description":"This is an example of a request to create a Charge which is captured separately from the creation of an authorization.  \n\n#### Documentation:\nCharges: https://stripe.com/docs/charges/placing-a-hold\n\nThese requests use a test visa payment method.  If you like you can also test other payment scenarios by using any of our [test cards/payment methods from our documentation](https://stripe.com/docs/testing)."}],"id":"3e38b537-f512-457f-83a7-131836523e41"},{"name":"Payments Failure","item":[{"name":"Create a PaymentIntent (Failed Charge)","id":"ce83ab71-d5eb-4fc2-aeea-cf93603a6162","request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"amount","value":"75000","type":"text"},{"key":"currency","value":"eur","type":"text"},{"key":"capture_method","value":"automatic","type":"text"},{"key":"confirm","value":"true","type":"text"},{"key":"customer","value":"{{customer_object_id}}","description":"If you want to test with a Customer object, create a customer via the \"Customers\" folder within this collection and its ID will be stored as a variable.  Alternatively, you can directly input an ID here","type":"text","disabled":true},{"key":"payment_method","value":"pm_card_chargeDeclined","description":"This is the test payment method for a decline. See the full list here: https://stripe.com/docs/testing for more test cards","type":"text"},{"key":"description","value":"Test for Declined Payment","type":"text"}]},"url":"https://api.stripe.com/v1/payment_intents","description":"This is an example of a request to create a PaymentIntent which is automatically captured but the payment is declined.  \n\n#### Documentation:\nPaymentIntents: https://stripe.com/docs/api/payment_intents/create\n\nThese requests use a test visa payment method.  If you like you can also test other payment scenarios by using any of our [test cards/payment methods from our documentation](https://stripe.com/docs/testing)."},"response":[]},{"name":"Create a Charge (Failed Charge)","id":"ea2c6bbd-495b-432f-94b3-1bdeab929e07","request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"amount","value":"10500","type":"text"},{"key":"currency","value":"usd","type":"text"},{"key":"source","value":"tok_chargeDeclined","description":"This is the test payment method for a decline. See the full list here: https://stripe.com/docs/testing for more test cards","type":"text"},{"key":"customer","value":"{{customer_object_id}}","type":"text","disabled":true},{"key":"capture","value":"false","type":"text","disabled":true},{"key":"description","value":"Failed Charge","type":"text"}]},"url":"https://api.stripe.com/v1/charges","description":"This is an example of a request to create a Charge which is automatically captured but the payment is declined.  \n\n#### Documentation:\nCharges: https://stripe.com/docs/api/charges/create\n\nThese requests use a test visa payment method.  If you like you can also test other payment scenarios by using any of our [test cards/payment methods from our documentation](https://stripe.com/docs/testing)."},"response":[]}],"id":"75aa0c2c-497c-4bdf-99e5-868292023dc9","description":"This folder contains examples which are functionally similar to the Auto Capture but using a test card number that results in a payment decline.\n\nhttps://stripe.com/docs/implementation-guides/core-payments/qa-test-gl-checks"},{"name":"Refunds","item":[{"name":"v1/payment_intent Refunds","item":[{"name":"Create a PaymentIntent (To be Refunded)","event":[{"listen":"test","script":{"type":"text/javascript","exec":["var jsonData = JSON.parse(responseBody);","//save the network transaction id to a cVar so it can be used in the next step. ","pm.collectionVariables.set(\"refund_payment_intent_id\", jsonData.id);","console.log(\"Payment Intent Id\" + jsonData.id);"]}}],"id":"0bc6191b-bfb2-4688-8e2e-962d033d7350","request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"amount","value":"10500","type":"text"},{"key":"currency","value":"usd","type":"text"},{"key":"capture_method","value":"automatic","type":"text"},{"key":"confirm","value":"true","type":"text"},{"key":"customer","value":"{{customer_object_id}}","description":"If you want to test with a Customer object, create a customer via the \"Customers\" folder within this collection and its ID will be stored as a variable.  Alternatively, you can directly input an ID here","type":"text","disabled":true},{"key":"payment_method","value":"pm_card_visa","type":"text"},{"key":"description","value":"PaymentIntent to be Refunded","type":"text"}]},"url":"https://api.stripe.com/v1/payment_intents","description":"In this step, we are creating a PaymentIntent which we will then turn around and refund in the next step. \n\n#### Documentation\nhttps://stripe.com/docs/refunds. \nhttps://stripe.com/docs/api/refunds. \n\n#### Note\nThe ID of the PaymentIntent will be saved as a collection variable to be used in the refund step."},"response":[]},{"name":"Refund a Payment Intent","id":"64435b40-a649-4b7c-8824-9bdde9299895","request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"payment_intent","value":"{{refund_payment_intent_id}}","type":"text"},{"key":"amount","value":"500","description":"If you would like to refund a portion of the charge, use this param","type":"text","disabled":true}]},"url":"https://api.stripe.com/v1/refunds","description":"In this step we use the ID of the PaymentIntent in order to process a refund.  \n\n#### Documentation\nhttps://stripe.com/docs/refunds. \nhttps://stripe.com/docs/api/refunds."},"response":[]}],"id":"a4337cbf-a818-418a-9868-b66ba401438a"},{"name":"v1/charges Refunds","item":[{"name":"Create a Charge (To Be Refunded)","event":[{"listen":"test","script":{"type":"text/javascript","exec":["var jsonData = JSON.parse(responseBody);","//save the network transaction id to a cVar so it can be used in the next step. ","pm.collectionVariables.set(\"refund_charge_id\", jsonData.id);","console.log(\"Charge Id\" + jsonData.id);"]}}],"id":"14e7e66c-dcbb-4d1c-a6f3-30a7234c80f3","request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"amount","value":"10500","type":"text"},{"key":"currency","value":"usd","type":"text"},{"key":"source","value":"tok_visa","type":"text"},{"key":"customer","value":"{{customer_object_id}}","description":"If you want to test with a Customer object, create a customer via the \"Customers\" folder within this collection and its ID will be stored as a variable.  Alternatively, you can directly input an ID here","type":"text","disabled":true},{"key":"description","value":"Automatic Capture Charge","type":"text"}]},"url":"https://api.stripe.com/v1/charges","description":"In this step, we are creating a Charge which we will then turn around and refund in the next step. \n\n#### Documentation\nhttps://stripe.com/docs/refunds. \nhttps://stripe.com/docs/api/refunds. \n\n#### Note\nThe ID of the Charge will be saved as a collection variable to be used in the refund step."},"response":[]},{"name":"Refund a Charge","id":"0dec2f26-e85e-4f2e-a9b9-57b5c394c3f0","request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"amount","value":"500","description":"If you would like to refund a portion of the charge, use this param","type":"text","disabled":true},{"key":"charge","value":"{{refund_charge_id}}","type":"text"}]},"url":"https://api.stripe.com/v1/refunds","description":"In this step we use the ID of the Charge in order to process a refund.  \n\n#### Documentation\nhttps://stripe.com/docs/refunds. \nhttps://stripe.com/docs/api/refunds."},"response":[]}],"id":"dbcbf675-5f9b-4296-99b9-805c44ad6d93"}],"id":"b8314008-ebbe-405a-97fb-b4ab5cf5c9b7","description":"This folder contains examples of creating charges and subsequently refunding them. \n\nThe documentation that corresponds with it can be found [here](https://stripe.com/docs/implementation-guides/core-payments/server-side-integration)."},{"name":"Customers","item":[{"name":"Create a customer","event":[{"listen":"test","script":{"type":"text/javascript","exec":["var jsonData = JSON.parse(responseBody);","//save the network transaction id to a cVar so it can be used in the next step. ","pm.collectionVariables.set(\"customer_object_id\", jsonData.id);","console.log(\"Customer Id\" + jsonData.id);"]}}],"id":"2fc0dab7-923d-41cd-873b-b9d24dfdaafa","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"description","value":"Customer Object for Jane Doe","description":"An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard."},{"key":"email","value":"jane.doe@example.com","description":"Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to *512 characters*."},{"key":"name","value":"Jane Doe","description":"The customer's full name or business name."},{"key":"payment_method","value":"<string>","disabled":true}]},"url":"https://api.stripe.com/v1/customers","description":"This is an example of creating a Customer in Stripe.\n\n#### Documentation\nhttps://stripe.com/docs/payments/save-during-payment. \nhttps://stripe.com/docs/api/customers\n\n#### Note\nOnce create, the ID of the customer is stored as a collection variable."},"response":[]},{"name":"Attach a PaymentMethod","id":"c75decdb-c2b3-423c-822e-931bc3248716","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"customer","value":"{{customer_object_id}}","description":"(Required) The ID of the customer to which to attach the PaymentMethod."}]},"url":{"raw":"https://api.stripe.com/v1/payment_methods/:payment_method/attach","protocol":"https","host":["api","stripe","com"],"path":["v1","payment_methods",":payment_method","attach"],"variable":[{"key":"payment_method","value":"pm_card_visa","description":"This is a test payment method.  More can be found here: https://stripe.com/docs/testing"}]},"description":"Once you have created the Customer object, you can attach a PaymentMethod.  Notice in the URL, there is the 'pm_card_visa'.  This is a test card, in the Live environment, this would be the ID of a payment method created client side.  \n\n#### Documentation\nhttps://stripe.com/docs/api/payment_methods/attach."},"response":[]},{"name":"List a Customer's PaymentMethods","id":"de2823d6-f082-4f05-b05c-e9fd3b4a1d0a","request":{"method":"GET","header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded"}],"url":{"raw":"https://api.stripe.com/v1/payment_methods?customer={{customer_object_id}}&type=card","protocol":"https","host":["api","stripe","com"],"path":["v1","payment_methods"],"query":[{"key":"customer","value":"{{customer_object_id}}"},{"key":"type","value":"card"}]},"description":"This is an example request of how you would get a list of the payment methods attached to a given Customer object.  \n\n#### Documentation\nhttps://stripe.com/docs/api/payment_methods/list."},"response":[]}],"id":"dc1678ee-e3df-43eb-90ce-6e9532758cae","description":"This folder contains examples related to creating Customer objects in Stripe.  \n\n#### Documentation\nhttps://stripe.com/docs/payments/save-during-payment. \nhttps://stripe.com/docs/api/customers"}],"auth":{"type":"bearer","bearer":{"token":"{{secret_key}}"}},"event":[{"listen":"prerequest","script":{"id":"ae7358ee-4c73-4be8-a3b9-ce964668180d","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"e00a9c31-4c4f-4622-a439-3ec75a8375dc","type":"text/javascript","exec":[""]}}],"variable":[{"id":"b825bc5f-e3f3-430a-81c9-f6ed97411801","key":"auth_payment_intent_id","value":""},{"id":"411eaa65-d6de-4c5c-98de-8ce4f273fe18","key":"auth_charge_id","value":""},{"id":"88750619-f99a-4a4e-b62e-881c13522325","key":"secret_key","value":""},{"id":"f4b42049-3b9b-4e0c-ba8d-cce4fb2f3518","key":"refund_payment_intent_id","value":""},{"id":"b29af9a3-95bf-47b2-afdf-9136bc6fc86b","key":"refund_charge_id","value":""},{"id":"b7d1ada9-77f9-4c2b-b983-0275ff6d01e5","key":"customer_object_id","value":""}]}