# Update tokenized payment method PUT https://api-sandbox.payabli.com/api/TokenStorage/{methodId} Content-Type: application/json Updates a saved payment method. Reference: https://docs.payabli.com/developers/api-reference/tokenstorage/update-a-payment-method ## OpenAPI Specification ```yaml openapi: 3.1.1 info: title: Update a payment method version: endpoint_tokenStorage.UpdateMethod paths: /TokenStorage/{methodId}: put: operationId: update-method summary: Update a payment method description: Updates a saved payment method. tags: - - subpackage_tokenStorage parameters: - name: methodId in: path description: The saved payment method ID. required: true schema: type: string - name: achValidation in: query required: false schema: $ref: '#/components/schemas/type_:AchValidation' - name: requestToken in: header required: true schema: type: string responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/type_:PayabliApiResponsePaymethodDelete' requestBody: content: application/json: schema: $ref: '#/components/schemas/type_tokenStorage:RequestTokenStorage' components: schemas: type_:AchValidation: type: boolean type_:AdditionalData: type: object additionalProperties: type: object additionalProperties: description: Any type type_:BillingAddressNullable: type: string type_:BillingAddressAddtlNullable: type: string type_:BillingCityNullable: type: string type_:BillingCountryNullable: type: string type_:Email: type: string format: email type_:PhoneNumber: type: string type_:BillingStateNullable: type: string type_:BillingZip: type: string type_:CustomerId: type: integer format: int64 type_:CustomerNumberNullable: type: string type_:Identifierfields: type: array items: type: string type_:Shippingaddress: type: string type_:Shippingaddressadditional: type: string type_:Shippingcity: type: string type_:Shippingcountry: type: string type_:Shippingstate: type: string type_:Shippingzip: type: string type_:PayorDataRequest: type: object properties: additionalData: $ref: '#/components/schemas/type_:AdditionalData' billingAddress1: $ref: '#/components/schemas/type_:BillingAddressNullable' billingAddress2: $ref: '#/components/schemas/type_:BillingAddressAddtlNullable' billingCity: $ref: '#/components/schemas/type_:BillingCityNullable' billingCountry: $ref: '#/components/schemas/type_:BillingCountryNullable' billingEmail: $ref: '#/components/schemas/type_:Email' billingPhone: $ref: '#/components/schemas/type_:PhoneNumber' billingState: $ref: '#/components/schemas/type_:BillingStateNullable' billingZip: $ref: '#/components/schemas/type_:BillingZip' description: >- Customer's billing ZIP code. For Pay In functions, this field supports 5-digit and 9-digit ZIP codes and alphanumeric Canadian postal codes. For example: "37615-1234" or "37615". company: type: string description: Customer's company name. customerId: $ref: '#/components/schemas/type_:CustomerId' customerNumber: $ref: '#/components/schemas/type_:CustomerNumberNullable' firstName: type: string description: Customer/Payor first name. identifierFields: $ref: '#/components/schemas/type_:Identifierfields' lastName: type: string description: Customer/Payor last name. shippingAddress1: $ref: '#/components/schemas/type_:Shippingaddress' shippingAddress2: $ref: '#/components/schemas/type_:Shippingaddressadditional' shippingCity: $ref: '#/components/schemas/type_:Shippingcity' shippingCountry: $ref: '#/components/schemas/type_:Shippingcountry' shippingState: $ref: '#/components/schemas/type_:Shippingstate' shippingZip: $ref: '#/components/schemas/type_:Shippingzip' type_:Entrypointfield: type: string type_:Cardcvv: type: string type_:Cardexp: type: string type_:Cardholder: type: string type_:Cardnumber: type: string type_:Cardzip: type: string type_tokenStorage:TokenizeCard: type: object properties: method: type: string description: >- The type of payment method to tokenize. For cards, this is always `card`. cardcvv: $ref: '#/components/schemas/type_:Cardcvv' cardexp: $ref: '#/components/schemas/type_:Cardexp' cardHolder: $ref: '#/components/schemas/type_:Cardholder' cardnumber: $ref: '#/components/schemas/type_:Cardnumber' cardzip: $ref: '#/components/schemas/type_:Cardzip' required: - method - cardexp - cardHolder - cardnumber type_:Achaccount: type: string type_:Achaccounttype: type: string enum: - value: Checking - value: Savings type_:AchSecCode: type: string type_:AchHolder: type: string type_:AchHolderType: type: string enum: - value: personal - value: business default: personal type_:Achrouting: type: string type_:Device: type: string type_tokenStorage:TokenizeACH: type: object properties: method: type: string description: >- The type of payment method to tokenize. For ACH, this is always `ach`. achAccount: $ref: '#/components/schemas/type_:Achaccount' achAccountType: $ref: '#/components/schemas/type_:Achaccounttype' achCode: $ref: '#/components/schemas/type_:AchSecCode' achHolder: $ref: '#/components/schemas/type_:AchHolder' achHolderType: $ref: '#/components/schemas/type_:AchHolderType' achRouting: $ref: '#/components/schemas/type_:Achrouting' device: $ref: '#/components/schemas/type_:Device' required: - method - achAccount - achAccountType - achHolder - achRouting type_tokenStorage:ConvertToken: type: object properties: method: type: string description: >- The type of payment method to tokenize. When converting a temp token to a permanent token, this should match the `method` set for the temporary token, either `ach` or `card`. tokenId: type: string description: A temporary stored token ID to be converted to permanent. required: - method - tokenId type_tokenStorage:RequestTokenStoragePaymentMethod: oneOf: - $ref: '#/components/schemas/type_tokenStorage:TokenizeCard' - $ref: '#/components/schemas/type_tokenStorage:TokenizeACH' - $ref: '#/components/schemas/type_tokenStorage:ConvertToken' type_tokenStorage:VendorDataRequest: type: object properties: vendorId: type: integer format: int64 description: >- The unique numeric ID assigned to the vendor in Payabli. Either `vendorId` or `vendorNumber` is required. vendorNumber: type: string description: >- Custom vendor number assigned by the business. Either `vendorId` or `vendorNumber` is required. type_:Source: type: string type_:Subdomain: type: string type_tokenStorage:RequestTokenStorage: type: object properties: customerData: $ref: '#/components/schemas/type_:PayorDataRequest' description: >- Object describing the Customer/Payor owner of payment method. Required for POST requests. Which fields are required depends on the paypoint's custom identifier settings. entryPoint: $ref: '#/components/schemas/type_:Entrypointfield' description: Entrypoint identifier. Required for POST requests. fallbackAuth: type: boolean default: false description: >- When `true`, if tokenization fails, Payabli will attempt an authorization transaction to request a permanent token for the card. If the authorization is successful, the card will be tokenized and the authorization will be voided automatically. fallbackAuthAmount: type: integer default: 100 description: >- The amount for the `fallbackAuth` transaction. Defaults to one dollar (`100`). methodDescription: type: string description: Custom description for stored payment method. paymentMethod: $ref: >- #/components/schemas/type_tokenStorage:RequestTokenStoragePaymentMethod description: Information about the payment method for the transaction. vendorData: $ref: '#/components/schemas/type_tokenStorage:VendorDataRequest' source: $ref: '#/components/schemas/type_:Source' description: Custom identifier to indicate the source for the request subdomain: $ref: '#/components/schemas/type_:Subdomain' type_:IsSuccess: type: boolean type_:MethodReferenceId: type: string type_:ResultCode: type: integer type_:Resulttext: type: string type_:PayabliApiResponsePaymethodDeleteResponseData: type: object properties: referenceId: $ref: '#/components/schemas/type_:MethodReferenceId' description: The method's reference ID. resultCode: $ref: '#/components/schemas/type_:ResultCode' resultText: $ref: '#/components/schemas/type_:Resulttext' type_:ResponseText: type: string type_:PayabliApiResponsePaymethodDelete: type: object properties: isSuccess: $ref: '#/components/schemas/type_:IsSuccess' responseData: $ref: >- #/components/schemas/type_:PayabliApiResponsePaymethodDeleteResponseData responseText: $ref: '#/components/schemas/type_:ResponseText' required: - responseText ``` ## SDK Code Examples ```python UpdateCardMethod from payabli import PayorDataRequest, payabli from payabli.token_storage import TokenizeCard client = payabli( api_key="YOUR_API_KEY", ) client.token_storage.update_method( method_id="32-8877drt00045632-678", customer_data=PayorDataRequest( customer_id=4440, ), entry_point="f743aed24a", fallback_auth=True, payment_method=TokenizeCard( cardcvv="123", cardexp="02/25", card_holder="John Doe", cardnumber="4111111111111111", cardzip="12345", method="card", ), ) ``` ```typescript UpdateCardMethod import { PayabliClient } from "@payabli/sdk-node"; const client = new PayabliClient({ apiKey: "YOUR_API_KEY" }); await client.tokenStorage.updateMethod("32-8877drt00045632-678", { body: { customerData: { customerId: 4440 }, entryPoint: "f743aed24a", fallbackAuth: true, paymentMethod: { cardcvv: "123", cardexp: "02/25", cardHolder: "John Doe", cardnumber: "4111111111111111", cardzip: "12345", method: "card" } } }); ``` ```go UpdateCardMethod import ( context "context" option "github.com/payabli/sdk-go/option" sdkgo "github.com/payabli/sdk-go" sdkgoclient "github.com/payabli/sdk-go/client" ) client := sdkgoclient.NewClient( option.WithApiKey( "", ), ) response, err := client.TokenStorage.UpdateMethod( context.TODO(), "32-8877drt00045632-678", &sdkgo.UpdateMethodRequest{ Body: &sdkgo.RequestTokenStorage{ CustomerData: &sdkgo.PayorDataRequest{ CustomerId: sdkgo.Int64( 4440, ), }, EntryPoint: sdkgo.String( "f743aed24a", ), FallbackAuth: sdkgo.Bool( true, ), PaymentMethod: &sdkgo.RequestTokenStoragePaymentMethod{ TokenizeCard: &sdkgo.TokenizeCard{ Cardcvv: sdkgo.String( "123", ), Cardexp: "02/25", CardHolder: "John Doe", Cardnumber: "4111111111111111", Cardzip: sdkgo.String( "12345", ), Method: "card", }, }, }, }, ) ``` ```csharp UpdateCardMethod using PayabliApi; var client = new PayabliApiClient("API_KEY"); await client.TokenStorage.UpdateMethodAsync( "32-8877drt00045632-678", new UpdateMethodRequest { Body = new RequestTokenStorage { CustomerData = new PayorDataRequest { CustomerId = 4440 }, EntryPoint = "f743aed24a", FallbackAuth = true, PaymentMethod = new TokenizeCard { Cardcvv = "123", Cardexp = "02/25", CardHolder = "John Doe", Cardnumber = "4111111111111111", Cardzip = "12345", Method = "card", }, }, } ); ``` ```ruby UpdateCardMethod require 'uri' require 'net/http' url = URI("https://api-sandbox.payabli.com/api/TokenStorage/32-8877drt00045632-678") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Put.new(url) request["requestToken"] = '' request["Content-Type"] = 'application/json' request.body = "{\n \"customerData\": {\n \"customerId\": 4440\n },\n \"entryPoint\": \"f743aed24a\",\n \"fallbackAuth\": true,\n \"paymentMethod\": {\n \"cardcvv\": \"123\",\n \"cardexp\": \"02/25\",\n \"cardHolder\": \"John Doe\",\n \"cardnumber\": \"4111111111111111\",\n \"cardzip\": \"12345\",\n \"method\": \"card\"\n }\n}" response = http.request(request) puts response.read_body ``` ```java UpdateCardMethod HttpResponse response = Unirest.put("https://api-sandbox.payabli.com/api/TokenStorage/32-8877drt00045632-678") .header("requestToken", "") .header("Content-Type", "application/json") .body("{\n \"customerData\": {\n \"customerId\": 4440\n },\n \"entryPoint\": \"f743aed24a\",\n \"fallbackAuth\": true,\n \"paymentMethod\": {\n \"cardcvv\": \"123\",\n \"cardexp\": \"02/25\",\n \"cardHolder\": \"John Doe\",\n \"cardnumber\": \"4111111111111111\",\n \"cardzip\": \"12345\",\n \"method\": \"card\"\n }\n}") .asString(); ``` ```php UpdateCardMethod request('PUT', 'https://api-sandbox.payabli.com/api/TokenStorage/32-8877drt00045632-678', [ 'body' => '{ "customerData": { "customerId": 4440 }, "entryPoint": "f743aed24a", "fallbackAuth": true, "paymentMethod": { "cardcvv": "123", "cardexp": "02/25", "cardHolder": "John Doe", "cardnumber": "4111111111111111", "cardzip": "12345", "method": "card" } }', 'headers' => [ 'Content-Type' => 'application/json', 'requestToken' => '', ], ]); echo $response->getBody(); ``` ```swift UpdateCardMethod import Foundation let headers = [ "requestToken": "", "Content-Type": "application/json" ] let parameters = [ "customerData": ["customerId": 4440], "entryPoint": "f743aed24a", "fallbackAuth": true, "paymentMethod": [ "cardcvv": "123", "cardexp": "02/25", "cardHolder": "John Doe", "cardnumber": "4111111111111111", "cardzip": "12345", "method": "card" ] ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/TokenStorage/32-8877drt00045632-678")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "PUT" 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() ``` ```python UpdateACHMethod from payabli import PayorDataRequest, payabli from payabli.token_storage import TokenizeAch client = payabli( api_key="YOUR_API_KEY", ) client.token_storage.update_method( method_id="32-8877drt00045632-678", customer_data=PayorDataRequest( customer_id=4440, ), entry_point="f743aed24a", payment_method=TokenizeAch( ach_account="1111111111111", ach_account_type="Checking", ach_code="WEB", ach_holder="John Doe", ach_holder_type="personal", ach_routing="123456780", method="ach", ), ) ``` ```typescript UpdateACHMethod import { PayabliClient } from "@payabli/sdk-node"; const client = new PayabliClient({ apiKey: "YOUR_API_KEY" }); await client.tokenStorage.updateMethod("32-8877drt00045632-678", { body: { customerData: { customerId: 4440 }, entryPoint: "f743aed24a", paymentMethod: { achAccount: "1111111111111", achAccountType: "Checking", achCode: "WEB", achHolder: "John Doe", achHolderType: "personal", achRouting: "123456780", method: "ach" } } }); ``` ```go UpdateACHMethod import ( context "context" option "github.com/payabli/sdk-go/option" sdkgo "github.com/payabli/sdk-go" sdkgoclient "github.com/payabli/sdk-go/client" ) client := sdkgoclient.NewClient( option.WithApiKey( "", ), ) response, err := client.TokenStorage.UpdateMethod( context.TODO(), "32-8877drt00045632-678", &sdkgo.UpdateMethodRequest{ Body: &sdkgo.RequestTokenStorage{ CustomerData: &sdkgo.PayorDataRequest{ CustomerId: sdkgo.Int64( 4440, ), }, EntryPoint: sdkgo.String( "f743aed24a", ), FallbackAuth: sdkgo.Bool( true, ), PaymentMethod: &sdkgo.RequestTokenStoragePaymentMethod{ TokenizeCard: &sdkgo.TokenizeCard{ Cardcvv: sdkgo.String( "123", ), Cardexp: "02/25", CardHolder: "John Doe", Cardnumber: "4111111111111111", Cardzip: sdkgo.String( "12345", ), Method: "card", }, }, }, }, ) ``` ```csharp UpdateACHMethod using PayabliApi; var client = new PayabliApiClient("API_KEY"); await client.TokenStorage.UpdateMethodAsync( "32-8877drt00045632-678", new UpdateMethodRequest { Body = new RequestTokenStorage { CustomerData = new PayorDataRequest { CustomerId = 4440 }, EntryPoint = "f743aed24a", PaymentMethod = new TokenizeAch { AchAccount = "1111111111111", AchAccountType = Achaccounttype.Checking, AchCode = "WEB", AchHolder = "John Doe", AchHolderType = AchHolderType.Personal, AchRouting = "123456780", Method = "ach", }, }, } ); ``` ```ruby UpdateACHMethod require 'uri' require 'net/http' url = URI("https://api-sandbox.payabli.com/api/TokenStorage/32-8877drt00045632-678") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Put.new(url) request["requestToken"] = '' request["Content-Type"] = 'application/json' request.body = "{\n \"customerData\": {\n \"customerId\": 4440\n },\n \"entryPoint\": \"f743aed24a\",\n \"paymentMethod\": {\n \"achAccount\": \"1111111111111\",\n \"achAccountType\": \"Checking\",\n \"achCode\": \"WEB\",\n \"achHolder\": \"John Doe\",\n \"achHolderType\": \"personal\",\n \"achRouting\": \"123456780\",\n \"method\": \"ach\"\n }\n}" response = http.request(request) puts response.read_body ``` ```java UpdateACHMethod HttpResponse response = Unirest.put("https://api-sandbox.payabli.com/api/TokenStorage/32-8877drt00045632-678") .header("requestToken", "") .header("Content-Type", "application/json") .body("{\n \"customerData\": {\n \"customerId\": 4440\n },\n \"entryPoint\": \"f743aed24a\",\n \"paymentMethod\": {\n \"achAccount\": \"1111111111111\",\n \"achAccountType\": \"Checking\",\n \"achCode\": \"WEB\",\n \"achHolder\": \"John Doe\",\n \"achHolderType\": \"personal\",\n \"achRouting\": \"123456780\",\n \"method\": \"ach\"\n }\n}") .asString(); ``` ```php UpdateACHMethod request('PUT', 'https://api-sandbox.payabli.com/api/TokenStorage/32-8877drt00045632-678', [ 'body' => '{ "customerData": { "customerId": 4440 }, "entryPoint": "f743aed24a", "paymentMethod": { "achAccount": "1111111111111", "achAccountType": "Checking", "achCode": "WEB", "achHolder": "John Doe", "achHolderType": "personal", "achRouting": "123456780", "method": "ach" } }', 'headers' => [ 'Content-Type' => 'application/json', 'requestToken' => '', ], ]); echo $response->getBody(); ``` ```swift UpdateACHMethod import Foundation let headers = [ "requestToken": "", "Content-Type": "application/json" ] let parameters = [ "customerData": ["customerId": 4440], "entryPoint": "f743aed24a", "paymentMethod": [ "achAccount": "1111111111111", "achAccountType": "Checking", "achCode": "WEB", "achHolder": "John Doe", "achHolderType": "personal", "achRouting": "123456780", "method": "ach" ] ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/TokenStorage/32-8877drt00045632-678")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "PUT" 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() ``` ```python UpdateACHMethodVendor from payabli import PayorDataRequest, payabli from payabli.token_storage import TokenizeAch, VendorDataRequest client = payabli( api_key="YOUR_API_KEY", ) client.token_storage.update_method( method_id="32-8877drt00045632-678", customer_data=PayorDataRequest( customer_id=4440, ), entry_point="f743aed24a", payment_method=TokenizeAch( ach_account="1111111111111", ach_account_type="Checking", ach_code="WEB", ach_holder="John Doe", ach_holder_type="personal", ach_routing="123456780", method="ach", ), vendor_data=VendorDataRequest( vendor_id=7890, ), ) ``` ```typescript UpdateACHMethodVendor import { PayabliClient } from "@payabli/sdk-node"; const client = new PayabliClient({ apiKey: "YOUR_API_KEY" }); await client.tokenStorage.updateMethod("32-8877drt00045632-678", { body: { customerData: { customerId: 4440 }, entryPoint: "f743aed24a", paymentMethod: { achAccount: "1111111111111", achAccountType: "Checking", achCode: "WEB", achHolder: "John Doe", achHolderType: "personal", achRouting: "123456780", method: "ach" }, vendorData: { vendorId: 7890 } } }); ``` ```go UpdateACHMethodVendor import ( context "context" option "github.com/payabli/sdk-go/option" sdkgo "github.com/payabli/sdk-go" sdkgoclient "github.com/payabli/sdk-go/client" ) client := sdkgoclient.NewClient( option.WithApiKey( "", ), ) response, err := client.TokenStorage.UpdateMethod( context.TODO(), "32-8877drt00045632-678", &sdkgo.UpdateMethodRequest{ Body: &sdkgo.RequestTokenStorage{ CustomerData: &sdkgo.PayorDataRequest{ CustomerId: sdkgo.Int64( 4440, ), }, EntryPoint: sdkgo.String( "f743aed24a", ), FallbackAuth: sdkgo.Bool( true, ), PaymentMethod: &sdkgo.RequestTokenStoragePaymentMethod{ TokenizeCard: &sdkgo.TokenizeCard{ Cardcvv: sdkgo.String( "123", ), Cardexp: "02/25", CardHolder: "John Doe", Cardnumber: "4111111111111111", Cardzip: sdkgo.String( "12345", ), Method: "card", }, }, }, }, ) ``` ```csharp UpdateACHMethodVendor using PayabliApi; var client = new PayabliApiClient("API_KEY"); await client.TokenStorage.UpdateMethodAsync( "32-8877drt00045632-678", new UpdateMethodRequest { Body = new RequestTokenStorage { CustomerData = new PayorDataRequest { CustomerId = 4440 }, EntryPoint = "f743aed24a", PaymentMethod = new TokenizeAch { AchAccount = "1111111111111", AchAccountType = Achaccounttype.Checking, AchCode = "WEB", AchHolder = "John Doe", AchHolderType = AchHolderType.Personal, AchRouting = "123456780", Method = "ach", }, VendorData = new VendorDataRequest { VendorId = 7890 }, }, } ); ``` ```ruby UpdateACHMethodVendor require 'uri' require 'net/http' url = URI("https://api-sandbox.payabli.com/api/TokenStorage/32-8877drt00045632-678") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Put.new(url) request["requestToken"] = '' request["Content-Type"] = 'application/json' request.body = "{\n \"customerData\": {\n \"customerId\": 4440\n },\n \"entryPoint\": \"f743aed24a\",\n \"paymentMethod\": {\n \"achAccount\": \"1111111111111\",\n \"achAccountType\": \"Checking\",\n \"achCode\": \"WEB\",\n \"achHolder\": \"John Doe\",\n \"achHolderType\": \"personal\",\n \"achRouting\": \"123456780\",\n \"method\": \"ach\"\n },\n \"vendorData\": {\n \"vendorId\": 7890\n }\n}" response = http.request(request) puts response.read_body ``` ```java UpdateACHMethodVendor HttpResponse response = Unirest.put("https://api-sandbox.payabli.com/api/TokenStorage/32-8877drt00045632-678") .header("requestToken", "") .header("Content-Type", "application/json") .body("{\n \"customerData\": {\n \"customerId\": 4440\n },\n \"entryPoint\": \"f743aed24a\",\n \"paymentMethod\": {\n \"achAccount\": \"1111111111111\",\n \"achAccountType\": \"Checking\",\n \"achCode\": \"WEB\",\n \"achHolder\": \"John Doe\",\n \"achHolderType\": \"personal\",\n \"achRouting\": \"123456780\",\n \"method\": \"ach\"\n },\n \"vendorData\": {\n \"vendorId\": 7890\n }\n}") .asString(); ``` ```php UpdateACHMethodVendor request('PUT', 'https://api-sandbox.payabli.com/api/TokenStorage/32-8877drt00045632-678', [ 'body' => '{ "customerData": { "customerId": 4440 }, "entryPoint": "f743aed24a", "paymentMethod": { "achAccount": "1111111111111", "achAccountType": "Checking", "achCode": "WEB", "achHolder": "John Doe", "achHolderType": "personal", "achRouting": "123456780", "method": "ach" }, "vendorData": { "vendorId": 7890 } }', 'headers' => [ 'Content-Type' => 'application/json', 'requestToken' => '', ], ]); echo $response->getBody(); ``` ```swift UpdateACHMethodVendor import Foundation let headers = [ "requestToken": "", "Content-Type": "application/json" ] let parameters = [ "customerData": ["customerId": 4440], "entryPoint": "f743aed24a", "paymentMethod": [ "achAccount": "1111111111111", "achAccountType": "Checking", "achCode": "WEB", "achHolder": "John Doe", "achHolderType": "personal", "achRouting": "123456780", "method": "ach" ], "vendorData": ["vendorId": 7890] ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/TokenStorage/32-8877drt00045632-678")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "PUT" 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() ```