> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://partner.ninjatrader.com/connect/api/rest-api-endpoints/funds/add-stripe-debit-card/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://partner.ninjatrader.com/_mcp/server. # Add Stripe Debit Card POST https://live.tradovateapi.com/v1/fundTransaction/addstripedebitcard Content-Type: application/json ### Register a Stripe debit-card PaymentMethod and run account-name inquiry.**Available to:** All authenticated users**Environments:** Live**[Rate Limit](/connect/overview/core-concepts/rate-limits):** 20 requests per rolling hour, 3-second back-off, counts all requests, CAPTCHA enabled**CAPTCHA fallback:** If a penalty response includes `p-captcha: true`, stop API retries and do not retry with `p-ticket`. A server-side integration cannot solve the reCAPTCHA challenge. Direct the user to the [NinjaTrader-hosted funding flow](/connect/overview/partner-integration/embedding-funding-page-with-i-frame), or wait approximately one hour for the penalty count to clear before resuming API calls.Create the Stripe PaymentMethod in the user's browser, then send its string ID as `stripePaymentMethodId`. The card must be a debit card and the billing name must match the account holder.**Warning:** `errorText` does not distinguish the two successful ANI outcomes. Inspect the conditional response fields.**Successful Outcomes**| Response | Meaning | Next step | | -------------------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------------------------------------------- | | `{}` | ANI passed and the funding method is approved | Call `stripeFundingMethodDependents` to obtain the approved numeric funding-method ID | | `last4`, `nameOnCard`, and `stripeFundingMethodId` are present | ANI did not approve the card; the method is pending | Run the Dyneti SDK in the user's client, then send its scan ID to `processDyScanResult` |The input `stripePaymentMethodId` is Stripe's string PaymentMethod identifier, such as `pm_...`. The response `stripeFundingMethodId` is NinjaTrader's numeric funding-method identifier. They are not interchangeable.When `displayError` is `true`, the client may show `errorText` directly. Other non-empty `errorText` values should be handled as registration failures without assuming they are user-displayable.**Common Failure Scenarios**- Stripe object is not a debit card - Cardholder name does not match the account holder - Required funding disclosures have not been accepted - The user has a declined card under review - Another active funding method prevents approval**Related Endpoints**- Use [`processDyScanResult`](/connect/api/rest-api-endpoints/funds/process-dy-scan-result) only when the conditional response fields are present. - Use [`startStripeFunding`](/connect/api/rest-api-endpoints/funds/start-stripe-funding) with the approved numeric `fundingMethodId`. Reference: https://partner.ninjatrader.com/connect/api/rest-api-endpoints/funds/add-stripe-debit-card ## Authentication - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, where token is your auth token. ## Request ### Body (application/json) This endpoint expects an AddStripeDebitCard. - `accountId` (long, required) - `stripePaymentMethodId` (string, required) ## Response ### 200 AddStripeDebitCardResponse - `errorText` (string, optional) — Non-empty if the request failed - `last4` (string, optional) - `nameOnCard` (string, optional) - `displayError` (boolean, optional) - `stripeFundingMethodId` (long, optional) ## Examples ### ANI approved **Request** ```json { "accountId": 123456, "stripePaymentMethodId": "pm_example" } ``` **Response** ```json {} ``` **SDK Code** ```python ANI approved import requests url = "https://live.tradovateapi.com/v1/fundTransaction/addstripedebitcard" payload = { "accountId": 123456, "stripePaymentMethodId": "pm_example" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript ANI approved const url = 'https://live.tradovateapi.com/v1/fundTransaction/addstripedebitcard'; const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: '{"accountId":123456,"stripePaymentMethodId":"pm_example"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go ANI approved package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://live.tradovateapi.com/v1/fundTransaction/addstripedebitcard" payload := strings.NewReader("{\n \"accountId\": 123456,\n \"stripePaymentMethodId\": \"pm_example\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby ANI approved require 'uri' require 'net/http' url = URI("https://live.tradovateapi.com/v1/fundTransaction/addstripedebitcard") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"accountId\": 123456,\n \"stripePaymentMethodId\": \"pm_example\"\n}" response = http.request(request) puts response.read_body ``` ```java ANI approved import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://live.tradovateapi.com/v1/fundTransaction/addstripedebitcard") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"accountId\": 123456,\n \"stripePaymentMethodId\": \"pm_example\"\n}") .asString(); ``` ```php ANI approved request('POST', 'https://live.tradovateapi.com/v1/fundTransaction/addstripedebitcard', [ 'body' => '{ "accountId": 123456, "stripePaymentMethodId": "pm_example" }', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp ANI approved using RestSharp; var client = new RestClient("https://live.tradovateapi.com/v1/fundTransaction/addstripedebitcard"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"accountId\": 123456,\n \"stripePaymentMethodId\": \"pm_example\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift ANI approved import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = [ "accountId": 123456, "stripePaymentMethodId": "pm_example" ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://live.tradovateapi.com/v1/fundTransaction/addstripedebitcard")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` ### Dyneti verification required **Request** ```json { "accountId": 123456, "stripePaymentMethodId": "pm_example" } ``` **Response** ```json { "last4": "4242", "nameOnCard": "Ada Lovelace", "stripeFundingMethodId": 98765 } ``` **SDK Code** ```python Dyneti verification required import requests url = "https://live.tradovateapi.com/v1/fundTransaction/addstripedebitcard" payload = { "accountId": 123456, "stripePaymentMethodId": "pm_example" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript Dyneti verification required const url = 'https://live.tradovateapi.com/v1/fundTransaction/addstripedebitcard'; const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: '{"accountId":123456,"stripePaymentMethodId":"pm_example"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Dyneti verification required package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://live.tradovateapi.com/v1/fundTransaction/addstripedebitcard" payload := strings.NewReader("{\n \"accountId\": 123456,\n \"stripePaymentMethodId\": \"pm_example\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Dyneti verification required require 'uri' require 'net/http' url = URI("https://live.tradovateapi.com/v1/fundTransaction/addstripedebitcard") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"accountId\": 123456,\n \"stripePaymentMethodId\": \"pm_example\"\n}" response = http.request(request) puts response.read_body ``` ```java Dyneti verification required import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://live.tradovateapi.com/v1/fundTransaction/addstripedebitcard") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"accountId\": 123456,\n \"stripePaymentMethodId\": \"pm_example\"\n}") .asString(); ``` ```php Dyneti verification required request('POST', 'https://live.tradovateapi.com/v1/fundTransaction/addstripedebitcard', [ 'body' => '{ "accountId": 123456, "stripePaymentMethodId": "pm_example" }', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp Dyneti verification required using RestSharp; var client = new RestClient("https://live.tradovateapi.com/v1/fundTransaction/addstripedebitcard"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"accountId\": 123456,\n \"stripePaymentMethodId\": \"pm_example\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Dyneti verification required import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = [ "accountId": 123456, "stripePaymentMethodId": "pm_example" ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://live.tradovateapi.com/v1/fundTransaction/addstripedebitcard")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```