> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://beta-docs.payabli.com/developer-guides/money-in-card-on-file/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://beta-docs.payabli.com/_mcp/server. # Make a sale with a saved payment method You can make a sale transaction with a customer's [saved payment method](/developer-guides/tokenization-overview), sometimes referred to as card-on-file or a payment token. Pass the saved method's token in as `storedMethodId` when making a transaction with [/MoneyIn/getpaid endpoint](/api-reference/moneyin/make-a-transaction) or authorizing a transaction with [/MoneyIn/authorize](/developer-guides/pay-in-auth-and-capture). ### Request POST [https://api-sandbox.payabli.com/api/MoneyIn/getpaid](https://api-sandbox.payabli.com/api/MoneyIn/getpaid) **`StoredMethod`** ```curl StoredMethod curl -X POST https://api-sandbox.payabli.com/api/MoneyIn/getpaid \ -H "requestToken: " \ -H "Content-Type: application/json" \ -d '{ "paymentDetails": { "totalAmount": 100, "serviceFee": 0 }, "paymentMethod": { "initiator": "payor", "method": "card", "storedMethodId": "1ec55af9-7b5a-4ff0-81ed-c12d2f95e135-4440", "storedMethodUsageType": "unscheduled" }, "customerData": { "customerId": 4440 }, "entryPoint": "f743aed24a", "ipaddress": "255.255.255.255" }' ``` **`StoredMethod`** ```python StoredMethod import requests url = "https://api-sandbox.payabli.com/api/MoneyIn/getpaid" payload = { "paymentDetails": { "totalAmount": 100, "serviceFee": 0 }, "paymentMethod": { "initiator": "payor", "method": "card", "storedMethodId": "1ec55af9-7b5a-4ff0-81ed-c12d2f95e135-4440", "storedMethodUsageType": "unscheduled" }, "customerData": { "customerId": 4440 }, "entryPoint": "f743aed24a", "ipaddress": "255.255.255.255" } headers = { "requestToken": "", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` **`StoredMethod`** ```javascript StoredMethod const url = 'https://api-sandbox.payabli.com/api/MoneyIn/getpaid'; const options = { method: 'POST', headers: {requestToken: '', 'Content-Type': 'application/json'}, body: '{"paymentDetails":{"totalAmount":100,"serviceFee":0},"paymentMethod":{"initiator":"payor","method":"card","storedMethodId":"1ec55af9-7b5a-4ff0-81ed-c12d2f95e135-4440","storedMethodUsageType":"unscheduled"},"customerData":{"customerId":4440},"entryPoint":"f743aed24a","ipaddress":"255.255.255.255"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` **`StoredMethod`** ```go StoredMethod package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api-sandbox.payabli.com/api/MoneyIn/getpaid" payload := strings.NewReader("{\n \"paymentDetails\": {\n \"totalAmount\": 100,\n \"serviceFee\": 0\n },\n \"paymentMethod\": {\n \"initiator\": \"payor\",\n \"method\": \"card\",\n \"storedMethodId\": \"1ec55af9-7b5a-4ff0-81ed-c12d2f95e135-4440\",\n \"storedMethodUsageType\": \"unscheduled\"\n },\n \"customerData\": {\n \"customerId\": 4440\n },\n \"entryPoint\": \"f743aed24a\",\n \"ipaddress\": \"255.255.255.255\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("requestToken", "") 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)) } ``` **`StoredMethod`** ```ruby StoredMethod require 'uri' require 'net/http' url = URI("https://api-sandbox.payabli.com/api/MoneyIn/getpaid") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["requestToken"] = '' request["Content-Type"] = 'application/json' request.body = "{\n \"paymentDetails\": {\n \"totalAmount\": 100,\n \"serviceFee\": 0\n },\n \"paymentMethod\": {\n \"initiator\": \"payor\",\n \"method\": \"card\",\n \"storedMethodId\": \"1ec55af9-7b5a-4ff0-81ed-c12d2f95e135-4440\",\n \"storedMethodUsageType\": \"unscheduled\"\n },\n \"customerData\": {\n \"customerId\": 4440\n },\n \"entryPoint\": \"f743aed24a\",\n \"ipaddress\": \"255.255.255.255\"\n}" response = http.request(request) puts response.read_body ``` **`StoredMethod`** ```java StoredMethod import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api-sandbox.payabli.com/api/MoneyIn/getpaid") .header("requestToken", "") .header("Content-Type", "application/json") .body("{\n \"paymentDetails\": {\n \"totalAmount\": 100,\n \"serviceFee\": 0\n },\n \"paymentMethod\": {\n \"initiator\": \"payor\",\n \"method\": \"card\",\n \"storedMethodId\": \"1ec55af9-7b5a-4ff0-81ed-c12d2f95e135-4440\",\n \"storedMethodUsageType\": \"unscheduled\"\n },\n \"customerData\": {\n \"customerId\": 4440\n },\n \"entryPoint\": \"f743aed24a\",\n \"ipaddress\": \"255.255.255.255\"\n}") .asString(); ``` **`StoredMethod`** ```php StoredMethod request('POST', 'https://api-sandbox.payabli.com/api/MoneyIn/getpaid', [ 'body' => '{ "paymentDetails": { "totalAmount": 100, "serviceFee": 0 }, "paymentMethod": { "initiator": "payor", "method": "card", "storedMethodId": "1ec55af9-7b5a-4ff0-81ed-c12d2f95e135-4440", "storedMethodUsageType": "unscheduled" }, "customerData": { "customerId": 4440 }, "entryPoint": "f743aed24a", "ipaddress": "255.255.255.255" }', 'headers' => [ 'Content-Type' => 'application/json', 'requestToken' => '', ], ]); echo $response->getBody(); ``` **`StoredMethod`** ```csharp StoredMethod using RestSharp; var client = new RestClient("https://api-sandbox.payabli.com/api/MoneyIn/getpaid"); var request = new RestRequest(Method.POST); request.AddHeader("requestToken", ""); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"paymentDetails\": {\n \"totalAmount\": 100,\n \"serviceFee\": 0\n },\n \"paymentMethod\": {\n \"initiator\": \"payor\",\n \"method\": \"card\",\n \"storedMethodId\": \"1ec55af9-7b5a-4ff0-81ed-c12d2f95e135-4440\",\n \"storedMethodUsageType\": \"unscheduled\"\n },\n \"customerData\": {\n \"customerId\": 4440\n },\n \"entryPoint\": \"f743aed24a\",\n \"ipaddress\": \"255.255.255.255\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` **`StoredMethod`** ```swift StoredMethod import Foundation let headers = [ "requestToken": "", "Content-Type": "application/json" ] let parameters = [ "paymentDetails": [ "totalAmount": 100, "serviceFee": 0 ], "paymentMethod": [ "initiator": "payor", "method": "card", "storedMethodId": "1ec55af9-7b5a-4ff0-81ed-c12d2f95e135-4440", "storedMethodUsageType": "unscheduled" ], "customerData": ["customerId": 4440], "entryPoint": "f743aed24a", "ipaddress": "255.255.255.255" ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/MoneyIn/getpaid")! 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() ``` > If you're a software company, you're a payments company™