Stripe API and Excel VBA - syntax for HTTP Post request - stripe-payments

I'm trying to create a customer in Stripe using Excel VBA and the Stripe API. I'm able to do this successfully, however I've hit a snag.
When I send the following URL to the API, I am successfully creating a customer with the following parameters (auto_advance, collection_method, customer) set.
b_url + "/v1/invoices?auto_advance=false;collection_method=charge_automatically;customer=" + customerid
However, I am struggling on the syntax required in my URL when attempting to send values to a parameter with child attributes. Stripe customer object has a parameter called "custom_fields" that I would like to populate. The param requires a custom_fields.name and custom_fields.value.
How do I send parameters with a "dot"?

So it turns out the URL needs to be formatted as an array value to pass these. So sending
;custom_fields[0][name]=Provider;custom_fields[0][value]=TestName
worked great.

Related

Google Form API - unable to retrieve a respondent email

I am using Google Form API to create a sample project to create, update & get responses to a form.
I am using the following documentation for reference and understanding:
https://developers.google.com/forms/api/reference/rest/v1/forms.responses
It mentions that a single response body (using response ID) includes the respondent email, but each time I trigger the API, the respondent email is undefined and hence does not get returned in the response body.
What am I doing wrong?
Please note I am not using the Apps Script. I am using the API in a node.js project.
Thank you

How to pass a document's ID using Azure CosmoDB?

I am creating a simple CRUD app to learn Azure. I have created a logic app (standard model) and my APIs are designed using the workflow designer. I also have a CosmoDB to hold each object.
My GET API, that gets all the documents, looks like this:
And my GET API, that gets only one document, looks like this:
Here is what my CosmosDB looks like with the ID of the item that is successfully return when statically called:
So what do I need to replace the static ID with, in the *Document ID input so that I can pass in different IDs?
I have looked at the docs and it suggests documentId, but when I type this in I get this error:
Thanks!
Thank you #404 , posting your suggestion as an answer to help other community members.
" You should know the id you want to retrieve from the flow that feeds into the Get a document block (unless it's static). Since you only have a HTTP trigger your id should be supplied through that. As example by passing the id in the url as query parameter which you then refer to in your Document ID field."
Trigger a post request to logic app with Document ID in request body.
Try as below:

user can not sign because there’s no URL created and sent to us from Docusign

We are receiving the following error when I try to create a recipient view. Basically the document is sent to 2 users, one of them has already signed but the other user can not sign because there’s no URL created and sent to us from Docusign. We are using node.js docusign sdk.
var recipientView = new docusign.RecipientViewRequest();
recipientView.setReturnUrl();
recipientView.setUserName();
recipientView.setEmail(;
recipientView.setAuthenticationMethod("email");
recipientView.setClientUserId();
var envelopesApi = new docusign.EnvelopesApi();
envelopesApi.createRecipientView(accountId, envelope.id, recipientView,
function(error, viewUrl, response) {
// no url is returned here.the error (in the image) is shown
});
I printed the values of accountId, envelopeId and those seemed to be fine.I checked if the user had changed his first name, last name and there were no errors there. If I create a new user from scratch everything works fine.
FrontEnd Error
Response Error
Through your screenshots it looks like you are getting an UKNOWN_ENVELOPE_RECIPIENT error returned from the API. This means the recipient data you are sending to identify the recipient is not correct. It needs to exactly match the data you assigned to the recipient when you added them to the envelope, such as name, email, recipientId, and clientUserId.
Try calling the EnvelopeRecipients: List API before you make the request to generate the URL and ensure that the recipient data matches what you are sending in your createRecipientView() request. That should help identify which piece of data is off, once you correct that the call will then start returning the proper URL.
Also see the Embedded Signing features page in the DocuSign Developer Center which shows exactly which params you need to set etc:

Getting current user information from CouchDB?

How do you access information about the current user when navigating an app with a CouchDB database? I need this information to query the correct data for each request, etc. For example, in Rails it is common to use a before filter that sets a variable called current_user with every request.
After successfully initiating a session with a POST to /_session, I tried the following as suggested by the CouchDB docs, but it does not return the full user document with email and the other fields I need.
GET /_session
I also tried requesting the user document by id as follows but I am getting an error.
GET /_users/org.couch.user:<name>
Error:
{ error: not_found, reason: missing }
Any help will be greatly appreciated.
I got this working by combining the two requests as follows:
GET '/_session'
GET '/_users/org.couch.user:' + responseFromFirst.userCtx.name

How to provide information in the html link for Facebook open graph api call of "property name" when posting trying to post an action

I am trying to create an html object dynamically with the necessary header information depending on the query string in the link I provide to Facebook. I am hoping that Facebook open graph will call this html link as I provided. However it seems that query string info are not getting passed to my server. Do anyone know how to make this work or what is the more appropriate way to do this. BTW, I am writing my code in Node.js.
To get more info about Facebook open graph api, look here, https://developers.facebook.com/docs/beta/opengraph/actions/.
For example, the link I am trying to pass to Facebook is, "http://xxx-url.com/getFacebookObject?objectId=&description=first dynamic post", so I sent a request with the link as, "https://graph.facebook.com/me/app-name:action-name?object=http://xxx-url.com/getFacebookObject?objectId=&description=first dynamic post". However, when I check the log on the server, I don't see anything in the query string.
Instead of using the query string, you can embed the data in the URL:
http://some-domain.com/getFacebookObject/id/description
Then, depending on what node.js packages you're using, extract the data from the request:
// expess.js style
app.get("/getFacebookObject/:id/:description", function(req, res) {
var id = req.params.id,
desc = req.params.description;
// your code...
});
(See http://expressjs.com/guide.html.)
Sorry, Facebook will strip off all query string information from the URL when they launch your site in the iframe. If it was a page tab app, then you could add it to the app_data query string parameters which in turn gets passed to your iframe's page tab app via the app_data part of the signed_request parameter.

Resources