Is it advisable to provide IDs or let stripe handle that
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
When creating customers, products and plans on stripe via the api, is it better to supply my own id so that the id of each customer, product and plan on stripe are in sync with their respective id in my database table or its better to just let stripe generate id for me and then I save in my database.
Kindly provide reasons to support why you think one approach is better.
stripe-payments
add a comment |
When creating customers, products and plans on stripe via the api, is it better to supply my own id so that the id of each customer, product and plan on stripe are in sync with their respective id in my database table or its better to just let stripe generate id for me and then I save in my database.
Kindly provide reasons to support why you think one approach is better.
stripe-payments
Have a look here: stripe.com/docs/api/metadata -- "Attach your system's unique IDs to a Stripe object, for easy lookups. For example, add your order number to a charge, your user ID to a customer or recipient, or a unique receipt number to a transfer."
– Robert Harvey♦
Jan 4 at 4:45
add to @Robert Harvery's answer. Personally i will recommend using Stripe default ID. 1) To your system, Stripe is an 3rd party system, you should not rely on 3rd party system API as your data storage as Stripe now supports passing your own ID but you are not sure if that will always be the case. 2) Storing your own customer id vs Stripe generate id will make your system more extensible; let's say in the future you decide to use Paypal's customer API, you might simple swap the stripe cust id or they could co exists with Stripe if that makes sense
– wsw
Jan 4 at 6:21
thanks a lot for this @wsw , this is very helpful. Thanks a lot.
– tommylykerin
Jan 4 at 8:39
[shrug] -- Nothing is ever guaranteed.
– Robert Harvey♦
Jan 4 at 15:30
add a comment |
When creating customers, products and plans on stripe via the api, is it better to supply my own id so that the id of each customer, product and plan on stripe are in sync with their respective id in my database table or its better to just let stripe generate id for me and then I save in my database.
Kindly provide reasons to support why you think one approach is better.
stripe-payments
When creating customers, products and plans on stripe via the api, is it better to supply my own id so that the id of each customer, product and plan on stripe are in sync with their respective id in my database table or its better to just let stripe generate id for me and then I save in my database.
Kindly provide reasons to support why you think one approach is better.
stripe-payments
stripe-payments
asked Jan 4 at 4:41
tommylykerintommylykerin
1
1
Have a look here: stripe.com/docs/api/metadata -- "Attach your system's unique IDs to a Stripe object, for easy lookups. For example, add your order number to a charge, your user ID to a customer or recipient, or a unique receipt number to a transfer."
– Robert Harvey♦
Jan 4 at 4:45
add to @Robert Harvery's answer. Personally i will recommend using Stripe default ID. 1) To your system, Stripe is an 3rd party system, you should not rely on 3rd party system API as your data storage as Stripe now supports passing your own ID but you are not sure if that will always be the case. 2) Storing your own customer id vs Stripe generate id will make your system more extensible; let's say in the future you decide to use Paypal's customer API, you might simple swap the stripe cust id or they could co exists with Stripe if that makes sense
– wsw
Jan 4 at 6:21
thanks a lot for this @wsw , this is very helpful. Thanks a lot.
– tommylykerin
Jan 4 at 8:39
[shrug] -- Nothing is ever guaranteed.
– Robert Harvey♦
Jan 4 at 15:30
add a comment |
Have a look here: stripe.com/docs/api/metadata -- "Attach your system's unique IDs to a Stripe object, for easy lookups. For example, add your order number to a charge, your user ID to a customer or recipient, or a unique receipt number to a transfer."
– Robert Harvey♦
Jan 4 at 4:45
add to @Robert Harvery's answer. Personally i will recommend using Stripe default ID. 1) To your system, Stripe is an 3rd party system, you should not rely on 3rd party system API as your data storage as Stripe now supports passing your own ID but you are not sure if that will always be the case. 2) Storing your own customer id vs Stripe generate id will make your system more extensible; let's say in the future you decide to use Paypal's customer API, you might simple swap the stripe cust id or they could co exists with Stripe if that makes sense
– wsw
Jan 4 at 6:21
thanks a lot for this @wsw , this is very helpful. Thanks a lot.
– tommylykerin
Jan 4 at 8:39
[shrug] -- Nothing is ever guaranteed.
– Robert Harvey♦
Jan 4 at 15:30
Have a look here: stripe.com/docs/api/metadata -- "Attach your system's unique IDs to a Stripe object, for easy lookups. For example, add your order number to a charge, your user ID to a customer or recipient, or a unique receipt number to a transfer."
– Robert Harvey♦
Jan 4 at 4:45
Have a look here: stripe.com/docs/api/metadata -- "Attach your system's unique IDs to a Stripe object, for easy lookups. For example, add your order number to a charge, your user ID to a customer or recipient, or a unique receipt number to a transfer."
– Robert Harvey♦
Jan 4 at 4:45
add to @Robert Harvery's answer. Personally i will recommend using Stripe default ID. 1) To your system, Stripe is an 3rd party system, you should not rely on 3rd party system API as your data storage as Stripe now supports passing your own ID but you are not sure if that will always be the case. 2) Storing your own customer id vs Stripe generate id will make your system more extensible; let's say in the future you decide to use Paypal's customer API, you might simple swap the stripe cust id or they could co exists with Stripe if that makes sense
– wsw
Jan 4 at 6:21
add to @Robert Harvery's answer. Personally i will recommend using Stripe default ID. 1) To your system, Stripe is an 3rd party system, you should not rely on 3rd party system API as your data storage as Stripe now supports passing your own ID but you are not sure if that will always be the case. 2) Storing your own customer id vs Stripe generate id will make your system more extensible; let's say in the future you decide to use Paypal's customer API, you might simple swap the stripe cust id or they could co exists with Stripe if that makes sense
– wsw
Jan 4 at 6:21
thanks a lot for this @wsw , this is very helpful. Thanks a lot.
– tommylykerin
Jan 4 at 8:39
thanks a lot for this @wsw , this is very helpful. Thanks a lot.
– tommylykerin
Jan 4 at 8:39
[shrug] -- Nothing is ever guaranteed.
– Robert Harvey♦
Jan 4 at 15:30
[shrug] -- Nothing is ever guaranteed.
– Robert Harvey♦
Jan 4 at 15:30
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54033206%2fis-it-advisable-to-provide-ids-or-let-stripe-handle-that%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54033206%2fis-it-advisable-to-provide-ids-or-let-stripe-handle-that%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Have a look here: stripe.com/docs/api/metadata -- "Attach your system's unique IDs to a Stripe object, for easy lookups. For example, add your order number to a charge, your user ID to a customer or recipient, or a unique receipt number to a transfer."
– Robert Harvey♦
Jan 4 at 4:45
add to @Robert Harvery's answer. Personally i will recommend using Stripe default ID. 1) To your system, Stripe is an 3rd party system, you should not rely on 3rd party system API as your data storage as Stripe now supports passing your own ID but you are not sure if that will always be the case. 2) Storing your own customer id vs Stripe generate id will make your system more extensible; let's say in the future you decide to use Paypal's customer API, you might simple swap the stripe cust id or they could co exists with Stripe if that makes sense
– wsw
Jan 4 at 6:21
thanks a lot for this @wsw , this is very helpful. Thanks a lot.
– tommylykerin
Jan 4 at 8:39
[shrug] -- Nothing is ever guaranteed.
– Robert Harvey♦
Jan 4 at 15:30