> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://beta-docs.payabli.com/api-reference/moneyin/make-a-transaction/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://beta-docs.payabli.com/_mcp/server. # Make transaction POST https://api-sandbox.payabli.com/api/MoneyIn/getpaid Content-Type: application/json Make a single transaction. This method authorizes and captures a payment in one step. Reference: https://beta-docs.payabli.com/api-reference/moneyin/make-a-transaction ## Authentication - `requestToken` header (required) — API Key authentication via header ## Servers - `https://api-sandbox.payabli.com/api` (Sandbox, default) - `https://api.payabli.com/api` (Production) ## Request ### Query parameters - `achValidation` (boolean, optional) — When `true`, enables real-time validation of ACH account and routing numbers. This is an add-on feature, contact Payabli for more information. - `forceCustomerCreation` (boolean, optional) — When `true`, the request creates a new customer record, regardless of whether customer identifiers match an existing customer. Defaults to `false`. ### Headers - `idempotencyKey` (string, optional) — _Optional but recommended_ A unique ID that you can include to prevent duplicating objects or transactions in the case that a request is sent more than once. This key is not generated in Payabli, you must generate it yourself. - `validationCode` (string, optional) — Value obtained from user when an API generated captcha is used in payment page ### Body (application/json) This endpoint expects a TransRequestBody. - `paymentDetails` (PaymentDetail, required) — Object describing details of the payment. Required. - `paymentMethod` (PaymentMethod, required) — Information about the payment method for the transaction. Required and recommended fields for each payment method type are described in each schema below. - `accountId` (string, optional) — Custom identifier for payment connector. - `customerData` (PayorData, optional) — Object describing the Customer/Payor. Which fields are required depends on the paypoint's custom identifier settings. See [PayorData Object Model](/api-reference/schemas/payordata) for a complete reference. - `entryPoint` (string, optional) — The entrypoint identifier. - `invoiceData` (BillData, optional) — Object describing an Invoice linked to the transaction. - `ipaddress` (string, optional) — *Recommended*. The customer's IP address. This field is used to help prevent fraudulent transactions, and Payabli strongly recommends including this data. - `orderDescription` (string, optional) — Text description of the transaction. - `orderId` (string, optional) — Custom identifier for the transaction. - `source` (string, optional) — Custom identifier to indicate the transaction or request source. - `subdomain` (string, optional) — Refers to the payment page identifier. If provided, then the transaction is linked to the payment page. - `subscriptionId` (long, optional) — Payabli identifier of the subscription associated with the transaction. ## Response ### 200 Ok - `isSuccess` (boolean, optional) — Boolean indicating whether the operation was successful. A `true` value indicates success. A `false` value indicates failure. - `pageIdentifier` (string, optional) — Auxiliary validation used internally by payment pages and components. - `responseData` (PayabliApiResponse0ResponseData, optional) - `responseText` (string, optional) — Response text for operation: 'Success' or 'Declined'. ## Errors ### 400 Bad Request Error Bad request/ invalid data - `any` ### 401 Unauthorized Error Unauthorized request. - `any` ### 500 Internal Server Error Internal API Error - `any` ### 503 Service Unavailable Error Database connection error - `isSuccess` (boolean, optional) — Boolean indicating whether the operation was successful. A `true` value indicates success. A `false` value indicates failure. - `responseData` (map from string to any, optional) — The object containing the response data. - `responseText` (string, optional) — Response text for operation: 'Success' or 'Declined'. ## Types ### PaymentDetail Details about the payment. - `totalAmount` (double, required) — Total amount to be charged. If a service fee is sent, then this amount should include the service fee." - `categories` (list of PaymentCategories, optional) — Array of payment categories/line items describing the amount to be paid **Note**: These categories are for information only and are not validated against the total amount provided. - `checkImage` (map from string to any, optional) — Object containing image of paper check. - `checkNumber` (string, optional) — A check number to be used in the ach transaction. **Required** for payment method = 'check'. - `currency` (string, optional) — Currency code ISO-4217. If not code is provided the currency in the paypoint setting is taken. Default is **USD**. - `serviceFee` (double, optional) — Service fee to be deducted from the total amount. This amount must be a number, percentages aren't accepted. If you are using a percentage-based fee schedule, you must calculate the value manually. - `splitFunding` (list of SplitFundingContent, optional) — Split funding instructions for the transaction. See [Split a Transaction](/developer-guides/money-in-split-funding) for more. ### PaymentMethod Information about the payment method for the transaction. ### PayorData Customer information. May be required, depending on the paypoint's settings. Required for subscriptions. See [PayorData object Model](/api-reference/schemas/payordata) for a complete reference. - `additionalData` (map from string to map from string to any, optional) — Custom dictionary of key:value pairs. You can use this field to store any data related to the object or for your system. If you are using [custom identifiers](/developer-guides/entities-custom-identifiers), pass those in this object. Example usage: ```json { "additionalData": { "key1": "value1", "key2": "value2", "key3": "value3" } } ``` - `billingAddress1` (string, optional) — Billing address. - `billingAddress2` (string, optional) — Additional line for the billing address. - `billingCity` (string, optional) — Billing city. - `billingCountry` (string, optional) — Billing address country. - `billingEmail` (string, optional) — Email address. - `billingPhone` (string, optional) — Phone number. - `billingState` (string, optional) — Billing state. Must be 2-letter state code for address in US. - `billingZip` (string, optional) — 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` (string, optional) — Customer's company name. - `customerId` (long, optional) — The Payabli-generated unique ID for the customer. - `customerNumber` (string, optional) — User-provided unique identifier for the customer. This is typically the customer ID from your own system. - `firstName` (string, optional) — Customer/Payor first name. - `identifierFields` (list of string, optional) — List of fields acting as customer identifiers, to be used instead of CustomerNumber. - `lastName` (string, optional) — Customer/Payor last name. - `shippingAddress1` (string, optional) — The shipping address. - `shippingAddress2` (string, optional) — Additional line for shipping address. - `shippingCity` (string, optional) — Shipping city. - `shippingCountry` (string, optional) — Shipping address country. - `shippingState` (string, optional) — Shipping state or province. - `shippingZip` (string, optional) — Shipping 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". ### BillData - `AdditionalData` (string, optional) — Custom dictionary of key:value pairs. You can use this field to store any data related to the object or for your system. Example usage: ```json { "additionalData": { "key1": "value1", "key2": "value2", "key3": "value3" } } ``` - `attachments` (list of FileContent, optional) — Array of `fileContent` objects with attached documents. Max upload size is 30 MB. - `company` (string, optional) — Company name of the recipient of the invoice. - `discount` (double, optional) — Discount applied to the invoice. - `dutyAmount` (double, optional) — Duty amount. - `firstName` (string, optional) — First name of the recipient of the invoice. - `freightAmount` (double, optional) — Freight/shipping amount. - `frequency` (enum, optional) — Frequency of scheduled invoice. - Allowed values: `one-time`, `weekly`, `every2weeks`, `every6months`, `monthly`, `every3months`, `annually` - `invoiceAmount` (double, optional) — Invoice total amount. - `invoiceDate` (date, optional) — Invoice date in any of the accepted formats: YYYY-MM-DD, MM/DD/YYYY. - `invoiceDueDate` (date, optional) — Invoice due date in one of the accepted formats: YYYY-MM-DD, MM/DD/YYYY. - `invoiceEndDate` (date, optional) — Indicate the date to finish a scheduled invoice cycle (`invoiceType`` = 1) in any of the accepted formats: YYYY-MM-DD, MM/DD/YYYY. - `invoiceNumber` (string, optional) — Invoice number. Identifies the invoice under a paypoint. - `invoiceStatus` (integer, optional) — Status for invoice. The accepted status values are: - 0 draft - 1 active - 2 partially paid - 4 paid/complete - 99 cancelled - `invoiceType` (integer, optional) — Type of invoice. Only `0` for one-time invoices is currently supported. - `items` (list of BillItem, optional) — Array of line items included in the invoice. - `lastName` (string, optional) — Last name of the recipient of the invoice. - `notes` (string, optional) — Notes included in the invoice. - `paymentTerms` (enum, optional) — Payment terms for invoice. If no terms are defined, then reponse data for this field defaults to `N30`. - Allowed values: `PIA`, `CIA`, `UR`, `NET10`, `NET20`, `NET30`, `NET45`, `NET60`, `NET90`, `EOM`, `MFI`, `5MFI`, `10MFI`, `15MFI`, `20MFI`, `2/10NET30`, `UF`, `10UF`, `20UF`, `25UF`, `50UF` - `purchaseOrder` (string, optional) — Purchase order number. - `shippingAddress1` (string, optional) — The shipping address. - `shippingAddress2` (string, optional) — Additional line for shipping address. - `shippingCity` (string, optional) — Shipping city. - `shippingCountry` (string, optional) — Shipping address country. - `shippingEmail` (string, optional) — Shipping recipient's contact email address. - `shippingFromZip` (string, optional) — Sender shipping ZIP code. - `shippingPhone` (string, optional) — Recipient phone number. - `shippingState` (string, optional) — Shipping state or province. - `shippingZip` (string, optional) — Shipping 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". - `summaryCommodityCode` (string, optional) — Commodity code. - `tax` (double, optional) — Tax rate in percent applied to the invoice. - `termsConditions` (string, optional) — Custom terms and conditions included in the invoice. ### PayabliApiResponse0ResponseData - `AuthCode` (string, optional) — Authorization code for the transaction. - `avsResponseText` (string, optional) — Text code describing the result for address validation (applies only for card transactions). - `CustomerId` (long, optional) — Payabli-generated unique ID of customer owner of transaction. Returns `0`` if the transaction was not assigned to an existing customer or no customer was created. - `cvvResponseText` (string, optional) — Text code describing the result for CVV validation (applies only for card transactions). - `methodReferenceId` (string, optional) — The stored method's identifier (sometimes referred to as 'token') in Payabli. When `null`, the method wasn't created, or doesn't exist, depending on the operation performed. - `ReferenceId` (string, optional) — The transaction identifier in Payabli. - `ResultCode` (integer, optional) — Result code for the operation. Value 1 indicates a successful operation, values 2 and 3 indicate errors. A value of 10 indicates that an operation has been initiated and is pending. - `ResultText` (string, optional) — Text describing the result. If `ResultCode` = 1, will return 'Approved' or a general success message. If `ResultCode`` = 2 or 3, will contain the cause of the error or decline. ### PaymentCategories - `amount` (double, required) — Price/cost per unit of item or category. - `label` (string, required) — Name of item or category. - `description` (string, optional) — Description of item or category - `qty` (integer, optional, default: 1) — Quatity of item or category ### SplitFundingContent - `accountId` (string, optional) — The accountId for the account the split should be sent to. - `amount` (double, optional) — Amount from the transaction to sent to this recipient. - `description` (string, optional) — A description for the split. - `recipientEntryPoint` (string, optional) — The entrypoint the split should be sent to. ### PayMethodCredit - `cardexp` (string, required) — Card expiration date in format MMYY or MM/YY. Required for card transactions. - `cardnumber` (string, required) — The card number. Required when method is `card` and a `storedMethodId` isn't included. - `method` ("card", required) — Method to use for the transaction. For transactions with a credit or debit card, or a tokenized card, use `card`. - `cardcvv` (string, optional) — Card Verification Value (CVV) associated with the card number. We **strongly recommend** that you include this field when using `card` as a method. - `cardHolder` (string, optional) — Cardholder name. - `cardzip` (string, optional) — ZIP code for the billing address of cardholder. We **strongly recommend** that you include this field when using `card` as a method. - `initiator` (string, optional) — **Strongly recommended** The cardholder-initiated transaction (CIT) or merchant-initiated transaction (MIT) indicator for the transaction. If you don't specify a value, Payabli defaults to `merchant`. Available values: - `payor`: For cardholder-initiated transactions - `merchant`: For merchant-initiated transactions See [Understanding CIT and MIT Indicators](/guides/money-in-cit-mit) for more information. - `saveIfSuccess` (boolean, optional) — When `true`, Payabli saves the payment method if the transaction is successful. The payment method ID is returned in the response as `methodReferenceId`. Defaults to `false`. ### PayMethodACH - `achAccount` (string, required) — Bank account number. This field is **required** when method = 'ach'. - `achHolder` (string, required) — Bank account holder. This field is **required** for `method` = 'ach' and `method` = 'check'. - `achRouting` (string, required) — ABA/routing number of bank account. This field is **required** when method = 'ach'. - `method` ("ach", required) - `achAccountType` (enum, optional) — Bank account type. This field is **required** when method = 'ach'. - Allowed values: `Checking`, `Savings` - `achCode` (string, optional) — Standard Entry Class (SEC) code is a a three letter code that describes how an ACH payment was authorized. Supported values are: - PPD (Prearranged Payment and Deposit) - Used for credits or debits where an accountholder authorizes a company to initiate either a single or recurring transaction to their personal bank account. Common examples include direct deposit of payroll, mortgage payments, or utility bills. This is the default value for subscription payments. - WEB (Internet-Initiated/Mobile Entry) - Used for debit entries when authorization is obtained from an accountholder via the internet or a wireless network. Common examples are online bill payments, ecommerce purchases, and mobile app payments where the consumer enters their banking information online. - TEL (Telephone-Initiated Entry) - Used for one-time debit entries where authorization is obtained from a consumer via telephone. Common examples are phone-based purchases or bill payments where the consumer provides their banking information over the phone. - CCD (Corporate Credit or Debit) - Used for fund transfers between business accounts. This code is specifically for business-to-business transactions. Common examples include vendor payments and other business-to-business payments. - `achHolderType` (enum, optional, default: personal) — The bank's accountholder type: personal or business. - Allowed values: `personal`, `business` - `device` (string, optional) — Identifier of registered cloud device used in the transaction. ### PayMethodStoredMethod The required and recommended fields for a payment made with a stored payment method. - `method` (enum, required) — Method to use for the transaction. Use either `card` or `ach`, depending on what kind of method was tokenized to use a saved payment method for this transaction. - Allowed values: `card`, `ach` - `initiator` (string, optional) — **Strongly recommended** The cardholder-initiated transaction (CIT) or merchant-initiated transaction (MIT) indicator for the transaction. If you don't specify a value, Payabli defaults to `merchant`. Available values: - `payor`: For cardholder-initiated transactions - `merchant`: For merchant-initiated transactions See [Understanding CIT and MIT Indicators](/guides/money-in-cit-mit) for more information. - `storedMethodId` (string, optional) — Payabli identifier of a tokenized payment method. - `storedMethodUsageType` (string, optional) — **Strongly recommended** The usage type for the stored method, used for merchant-initiated transactions (MIT). If you don't specify a value, Payabli defaults to `unscheduled`. Available values: - `unscheduled`: This type is used for transactions that are one-time or otherwise not pre-scheduled. - `subscription`: This type is used for subscription payments. For example, monthly rental fees or ongoing service subscriptions. - `recurring`: This type is used for recurring payments that occur per a set plan. For example, splitting an HOA special assessment over 6 monthly payments. See [Understanding CIT and MIT Indicators](/guides/money-in-cit-mit) for more information. ### PayMethodCloud - `method` ("cloud", required) — Method to use for the transaction. For cloud device transactions, the method is `cloud`. - `device` (string, optional) — Identifier of registered cloud device used in the transaction. - `saveIfSuccess` (boolean, optional) — When `true`, Payabli saves the payment method if the transaction is successful. The payment method ID is returned in the response as `methodReferenceId`. Defaults to `false`. ### Check - `achHolder` (string, required) — The checking accountholder's name. - `method` ("check", required) — Method to use for the transaction. Use `check` for a paper check transaction. When the method is `check`, then `paymentDetails.checkNumber` is required. ### Cash - `method` ("cash", required) — Method to use for the transaction. For cash transactions, use `cash`. ### PayMethodBodyAllFields Model for the PaymentMethod object, includes all method types. - `achAccount` (string, required) — Bank account number. This field is **required** when method = 'ach'. - `achHolder` (string, required) — Bank account holder. This field is **required** for `method` = 'ach' and `method` = 'check'. - `achRouting` (string, required) — ABA/routing number of Bank account. This field is **required** when method = 'ach'. - `achAccountType` (enum, optional) — Bank account type: Checking or Savings. - Allowed values: `Checking`, `Savings` - `achCode` (string, optional) — Standard Entry Class (SEC) code is a a three letter code that describes how an ACH payment was authorized. Supported values are: - PPD (Prearranged Payment and Deposit) - Used for credits or debits where an accountholder authorizes a company to initiate either a single or recurring transaction to their personal bank account. Common examples include direct deposit of payroll, mortgage payments, or utility bills. This is the default value for subscription payments. - WEB (Internet-Initiated/Mobile Entry) - Used for debit entries when authorization is obtained from an accountholder via the internet or a wireless network. Common examples are online bill payments, ecommerce purchases, and mobile app payments where the consumer enters their banking information online. - TEL (Telephone-Initiated Entry) - Used for one-time debit entries where authorization is obtained from a consumer via telephone. Common examples are phone-based purchases or bill payments where the consumer provides their banking information over the phone. - CCD (Corporate Credit or Debit) - Used for fund transfers between business accounts. This code is specifically for business-to-business transactions. Common examples include vendor payments and other business-to-business payments. - `cardcvv` (string, optional) — Card Verification Value (CVV) associated with the card number. We **strongly recommend** that you include this field when using `card` as a method. - `cardexp` (string, optional) — Card expiration date in format MMYY or MM/YY. Required for card transactions. - `cardHolder` (string, optional) — Cardholder name. - `cardnumber` (string, optional) — The card number. Required when method is `card` and a `storedMethodId` isn't included. - `cardzip` (string, optional) — ZIP code for the billing address of cardholder. We **strongly recommend** that you include this field when using `card` as a method. - `device` (string, optional) — Identifier of registered cloud device used in the transaction. - `initator` (string, optional) — **Strongly recommended** The cardholder-initiated transaction (CIT) or merchant-initiated transaction (MIT) indicator for the transaction. If you don't specify a value, Payabli defaults to `merchant`. Available values: - `payor`: For cardholder-initiated transactions - `merchant`: For merchant-initiated transactions See [Understanding CIT and MIT Indicators](/guides/money-in-cit-mit) for more information. - `method` (enum, optional) — Method to use for the transaction. - Allowed values: `card`, `ach`, `cloud`, `check`, `cash` - `saveIfSuccess` (boolean, optional) — When `true`, Payabli saves the payment method if the transaction is successful. The payment method ID is returned in the response as `methodReferenceId`. Defaults to `false`. - `storedMethodId` (string, optional) — Payabli identifier of a tokenized payment method. If this field is used in a request, the `method` field is overridden and the payment is made using the payment token. - `storedMethodUsageType` (string, optional) — **Strongly recommended** The usage type for the stored method, used for merchant-initiated transactions (MIT). If you don't specify a value, Payabli defaults to `unscheduled`. Available values: - `unscheduled`: This type is used for transactions that are one-time or otherwise not pre-scheduled. - `subscription`: This type is used for subscription payments. For example, monthly rental fees or ongoing service subscriptions. - `recurring`: This type is used for recurring payments that occur per a set plan. For example, splitting an HOA special assessment over 6 monthly payments. See [Understanding CIT and MIT Indicators](/guides/money-in-cit-mit) for more information. ### FileContent Contains details about a file. See See [fileObject Object Model](/api-reference/schemas/filecontent) for a complete reference. Max upload size is 30 MB. - `fContent` (string, optional) — Content of file, Base64-encoded Ignored if furl is specified. Max upload size is 30 MB. - `filename` (string, optional) — The name of the attached file. - `ftype` (enum, optional) — The MIME type of the file (if content is provided) - Allowed values: `pdf`, `doc`, `docx`, `jpg`, `jpeg`, `png`, `gif`, `txt` - `furl` (string, optional) — Optional url provided to show or download the file remotely ### BillItem - `itemCost` (double, required) — Item or product price per unit. - `itemCategories` (list of string, optional) — Array of tags classifying item or product. - `itemCommodityCode` (string, optional) — Item or product commodity code. Max length of 250 characters. - `itemDescription` (string, optional) — Item or product description. Max length of 250 characters. - `itemMode` (integer, optional) — Internal class of item or product: value '0' is only for invoices , '1' for bills and, '2' common for both. - `itemProductCode` (string, optional) — Item or product code. Max length of 250 characters. - `itemProductName` (string, optional) — Item or product name. Max length of 250 characters. - `itemQty` (integer, optional) — Quantity of item or product. - `itemTaxAmount` (double, optional) — Tax amount applied to item or product. - `itemTaxRate` (double, optional) — Tax rate applied to item or product. - `itemTotalAmount` (double, optional) — Total amount in item or product. - `itemUnitOfMeasure` (string, optional) — Unit of measurement. Max length of 100 characters. ## Examples ### Card **Request** ```json { "paymentDetails": { "totalAmount": 100, "serviceFee": 0 }, "paymentMethod": { "cardcvv": "999", "cardexp": "02/27", "cardHolder": "John Cassian", "cardnumber": "4111111111111111", "cardzip": "12345", "initiator": "payor", "method": "card" }, "customerData": { "customerId": 4440 }, "entryPoint": "f743aed24a", "ipaddress": "255.255.255.255" } ``` **Response** ```json { "isSuccess": true, "responseData": { "AuthCode": "AuthCode", "avsResponseText": "No address or ZIP match only", "CustomerId": 4440, "cvvResponseText": "CVV2/CVC2 no match", "methodReferenceId": null, "ReferenceId": "45-erre-324", "ResultCode": 1, "ResultText": "Approved" }, "responseText": "Success" } ``` **SDK Code** ```python Card import requests url = "https://api-sandbox.payabli.com/api/MoneyIn/getpaid" payload = { "paymentDetails": { "totalAmount": 100, "serviceFee": 0 }, "paymentMethod": { "cardcvv": "999", "cardexp": "02/27", "cardHolder": "John Cassian", "cardnumber": "4111111111111111", "cardzip": "12345", "initiator": "payor", "method": "card" }, "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()) ``` ```javascript Card 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":{"cardcvv":"999","cardexp":"02/27","cardHolder":"John Cassian","cardnumber":"4111111111111111","cardzip":"12345","initiator":"payor","method":"card"},"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); } ``` ```go Card 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 \"cardcvv\": \"999\",\n \"cardexp\": \"02/27\",\n \"cardHolder\": \"John Cassian\",\n \"cardnumber\": \"4111111111111111\",\n \"cardzip\": \"12345\",\n \"initiator\": \"payor\",\n \"method\": \"card\"\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)) } ``` ```ruby Card 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 \"cardcvv\": \"999\",\n \"cardexp\": \"02/27\",\n \"cardHolder\": \"John Cassian\",\n \"cardnumber\": \"4111111111111111\",\n \"cardzip\": \"12345\",\n \"initiator\": \"payor\",\n \"method\": \"card\"\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 ``` ```java Card 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 \"cardcvv\": \"999\",\n \"cardexp\": \"02/27\",\n \"cardHolder\": \"John Cassian\",\n \"cardnumber\": \"4111111111111111\",\n \"cardzip\": \"12345\",\n \"initiator\": \"payor\",\n \"method\": \"card\"\n },\n \"customerData\": {\n \"customerId\": 4440\n },\n \"entryPoint\": \"f743aed24a\",\n \"ipaddress\": \"255.255.255.255\"\n}") .asString(); ``` ```php Card request('POST', 'https://api-sandbox.payabli.com/api/MoneyIn/getpaid', [ 'body' => '{ "paymentDetails": { "totalAmount": 100, "serviceFee": 0 }, "paymentMethod": { "cardcvv": "999", "cardexp": "02/27", "cardHolder": "John Cassian", "cardnumber": "4111111111111111", "cardzip": "12345", "initiator": "payor", "method": "card" }, "customerData": { "customerId": 4440 }, "entryPoint": "f743aed24a", "ipaddress": "255.255.255.255" }', 'headers' => [ 'Content-Type' => 'application/json', 'requestToken' => '', ], ]); echo $response->getBody(); ``` ```csharp Card 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 \"cardcvv\": \"999\",\n \"cardexp\": \"02/27\",\n \"cardHolder\": \"John Cassian\",\n \"cardnumber\": \"4111111111111111\",\n \"cardzip\": \"12345\",\n \"initiator\": \"payor\",\n \"method\": \"card\"\n },\n \"customerData\": {\n \"customerId\": 4440\n },\n \"entryPoint\": \"f743aed24a\",\n \"ipaddress\": \"255.255.255.255\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Card import Foundation let headers = [ "requestToken": "", "Content-Type": "application/json" ] let parameters = [ "paymentDetails": [ "totalAmount": 100, "serviceFee": 0 ], "paymentMethod": [ "cardcvv": "999", "cardexp": "02/27", "cardHolder": "John Cassian", "cardnumber": "4111111111111111", "cardzip": "12345", "initiator": "payor", "method": "card" ], "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() ``` ### StoredMethod **Request** ```json { "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" } ``` **Response** ```json { "isSuccess": true, "responseData": { "AuthCode": "AuthCode", "avsResponseText": "No address or ZIP match only", "CustomerId": 4440, "cvvResponseText": "CVV2/CVC2 no match", "methodReferenceId": "1ed73d3c67-4076-8f8c-9f26317762ef", "ReferenceId": "45-erre-324", "ResultCode": 1, "ResultText": "Approved" }, "responseText": "Success" } ``` **SDK Code** ```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()) ``` ```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); } ``` ```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)) } ``` ```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 ``` ```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(); ``` ```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(); ``` ```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); ``` ```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() ``` ### Cloud **Request** ```json { "paymentDetails": { "totalAmount": 100, "serviceFee": 0 }, "paymentMethod": { "device": "6c361c7d-674c-44cc-b790-382b75d1xxx", "method": "cloud", "saveIfSuccess": true }, "customerData": { "customerId": 4440 }, "entryPoint": "f743aed24a", "ipaddress": "255.255.255.255" } ``` **Response** ```json { "isSuccess": true, "responseData": { "AuthCode": "AuthCode", "avsResponseText": "No address or ZIP match only", "CustomerId": 4440, "cvvResponseText": "CVV2/CVC2 no match", "methodReferenceId": null, "ReferenceId": "45-erre-324", "ResultCode": 1, "ResultText": "Approved" }, "responseText": "Success" } ``` **SDK Code** ```python Cloud import requests url = "https://api-sandbox.payabli.com/api/MoneyIn/getpaid" payload = { "paymentDetails": { "totalAmount": 100, "serviceFee": 0 }, "paymentMethod": { "device": "6c361c7d-674c-44cc-b790-382b75d1xxx", "method": "cloud", "saveIfSuccess": True }, "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()) ``` ```javascript Cloud 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":{"device":"6c361c7d-674c-44cc-b790-382b75d1xxx","method":"cloud","saveIfSuccess":true},"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); } ``` ```go Cloud 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 \"device\": \"6c361c7d-674c-44cc-b790-382b75d1xxx\",\n \"method\": \"cloud\",\n \"saveIfSuccess\": true\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)) } ``` ```ruby Cloud 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 \"device\": \"6c361c7d-674c-44cc-b790-382b75d1xxx\",\n \"method\": \"cloud\",\n \"saveIfSuccess\": true\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 ``` ```java Cloud 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 \"device\": \"6c361c7d-674c-44cc-b790-382b75d1xxx\",\n \"method\": \"cloud\",\n \"saveIfSuccess\": true\n },\n \"customerData\": {\n \"customerId\": 4440\n },\n \"entryPoint\": \"f743aed24a\",\n \"ipaddress\": \"255.255.255.255\"\n}") .asString(); ``` ```php Cloud request('POST', 'https://api-sandbox.payabli.com/api/MoneyIn/getpaid', [ 'body' => '{ "paymentDetails": { "totalAmount": 100, "serviceFee": 0 }, "paymentMethod": { "device": "6c361c7d-674c-44cc-b790-382b75d1xxx", "method": "cloud", "saveIfSuccess": true }, "customerData": { "customerId": 4440 }, "entryPoint": "f743aed24a", "ipaddress": "255.255.255.255" }', 'headers' => [ 'Content-Type' => 'application/json', 'requestToken' => '', ], ]); echo $response->getBody(); ``` ```csharp Cloud 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 \"device\": \"6c361c7d-674c-44cc-b790-382b75d1xxx\",\n \"method\": \"cloud\",\n \"saveIfSuccess\": true\n },\n \"customerData\": {\n \"customerId\": 4440\n },\n \"entryPoint\": \"f743aed24a\",\n \"ipaddress\": \"255.255.255.255\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Cloud import Foundation let headers = [ "requestToken": "", "Content-Type": "application/json" ] let parameters = [ "paymentDetails": [ "totalAmount": 100, "serviceFee": 0 ], "paymentMethod": [ "device": "6c361c7d-674c-44cc-b790-382b75d1xxx", "method": "cloud", "saveIfSuccess": true ], "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() ``` ### ACH **Request** ```json { "paymentDetails": { "totalAmount": 100, "serviceFee": 0 }, "paymentMethod": { "achAccount": "123123123", "achAccountType": "Checking", "achCode": "WEB", "achHolder": "John Cassian", "achHolderType": "personal", "achRouting": "123123123", "method": "ach" }, "customerData": { "customerId": 4440 }, "entryPoint": "f743aed24a", "ipaddress": "255.255.255.255" } ``` **Response** ```json { "isSuccess": true, "responseData": { "AuthCode": "123456", "avsResponseText": null, "CustomerId": 4440, "cvvResponseText": null, "methodReferenceId": null, "ReferenceId": "45-erre-324", "ResultCode": 1, "ResultText": "Approved" }, "responseText": "Success" } ``` **SDK Code** ```python ACH import requests url = "https://api-sandbox.payabli.com/api/MoneyIn/getpaid" payload = { "paymentDetails": { "totalAmount": 100, "serviceFee": 0 }, "paymentMethod": { "achAccount": "123123123", "achAccountType": "Checking", "achCode": "WEB", "achHolder": "John Cassian", "achHolderType": "personal", "achRouting": "123123123", "method": "ach" }, "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()) ``` ```javascript ACH 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":{"achAccount":"123123123","achAccountType":"Checking","achCode":"WEB","achHolder":"John Cassian","achHolderType":"personal","achRouting":"123123123","method":"ach"},"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); } ``` ```go ACH 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 \"achAccount\": \"123123123\",\n \"achAccountType\": \"Checking\",\n \"achCode\": \"WEB\",\n \"achHolder\": \"John Cassian\",\n \"achHolderType\": \"personal\",\n \"achRouting\": \"123123123\",\n \"method\": \"ach\"\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)) } ``` ```ruby ACH 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 \"achAccount\": \"123123123\",\n \"achAccountType\": \"Checking\",\n \"achCode\": \"WEB\",\n \"achHolder\": \"John Cassian\",\n \"achHolderType\": \"personal\",\n \"achRouting\": \"123123123\",\n \"method\": \"ach\"\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 ``` ```java ACH 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 \"achAccount\": \"123123123\",\n \"achAccountType\": \"Checking\",\n \"achCode\": \"WEB\",\n \"achHolder\": \"John Cassian\",\n \"achHolderType\": \"personal\",\n \"achRouting\": \"123123123\",\n \"method\": \"ach\"\n },\n \"customerData\": {\n \"customerId\": 4440\n },\n \"entryPoint\": \"f743aed24a\",\n \"ipaddress\": \"255.255.255.255\"\n}") .asString(); ``` ```php ACH request('POST', 'https://api-sandbox.payabli.com/api/MoneyIn/getpaid', [ 'body' => '{ "paymentDetails": { "totalAmount": 100, "serviceFee": 0 }, "paymentMethod": { "achAccount": "123123123", "achAccountType": "Checking", "achCode": "WEB", "achHolder": "John Cassian", "achHolderType": "personal", "achRouting": "123123123", "method": "ach" }, "customerData": { "customerId": 4440 }, "entryPoint": "f743aed24a", "ipaddress": "255.255.255.255" }', 'headers' => [ 'Content-Type' => 'application/json', 'requestToken' => '', ], ]); echo $response->getBody(); ``` ```csharp ACH 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 \"achAccount\": \"123123123\",\n \"achAccountType\": \"Checking\",\n \"achCode\": \"WEB\",\n \"achHolder\": \"John Cassian\",\n \"achHolderType\": \"personal\",\n \"achRouting\": \"123123123\",\n \"method\": \"ach\"\n },\n \"customerData\": {\n \"customerId\": 4440\n },\n \"entryPoint\": \"f743aed24a\",\n \"ipaddress\": \"255.255.255.255\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift ACH import Foundation let headers = [ "requestToken": "", "Content-Type": "application/json" ] let parameters = [ "paymentDetails": [ "totalAmount": 100, "serviceFee": 0 ], "paymentMethod": [ "achAccount": "123123123", "achAccountType": "Checking", "achCode": "WEB", "achHolder": "John Cassian", "achHolderType": "personal", "achRouting": "123123123", "method": "ach" ], "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() ``` ### ComplexCard **Request** ```json { "paymentDetails": { "totalAmount": 1000, "serviceFee": 0 }, "paymentMethod": { "cardcvv": "123", "cardexp": "02/25", "cardHolder": "John Cassian", "cardnumber": "4111111111111111", "cardzip": "12345", "initiator": "payor", "method": "card", "saveIfSuccess": true }, "customerData": { "billingAddress1": "123 Walnut Street", "billingCity": "Johnson City", "billingCountry": "US", "billingEmail": "john@email.com", "billingPhone": "1234567890", "billingState": "Johnson City", "billingZip": "37615", "customerNumber": "3456-7645A", "firstName": "John", "lastName": "Cassian" }, "entryPoint": "f743aed24a", "ipaddress": "255.255.255.255", "orderDescription": "New customer package", "orderId": "982-102", "source": "web" } ``` **Response** ```json { "isSuccess": true, "responseData": { "AuthCode": "AuthCode", "avsResponseText": "No address or ZIP match only", "CustomerId": 4440, "cvvResponseText": "CVV2/CVC2 no match", "methodReferenceId": "1ed73d3c67-4076-8f8c-9f26317762ef", "ReferenceId": "45-erre-324", "ResultCode": 1, "ResultText": "Approved" }, "responseText": "Success" } ``` **SDK Code** ```python ComplexCard import requests url = "https://api-sandbox.payabli.com/api/MoneyIn/getpaid" payload = { "paymentDetails": { "totalAmount": 1000, "serviceFee": 0 }, "paymentMethod": { "cardcvv": "123", "cardexp": "02/25", "cardHolder": "John Cassian", "cardnumber": "4111111111111111", "cardzip": "12345", "initiator": "payor", "method": "card", "saveIfSuccess": True }, "customerData": { "billingAddress1": "123 Walnut Street", "billingCity": "Johnson City", "billingCountry": "US", "billingEmail": "john@email.com", "billingPhone": "1234567890", "billingState": "Johnson City", "billingZip": "37615", "customerNumber": "3456-7645A", "firstName": "John", "lastName": "Cassian" }, "entryPoint": "f743aed24a", "ipaddress": "255.255.255.255", "orderDescription": "New customer package", "orderId": "982-102", "source": "web" } headers = { "requestToken": "", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript ComplexCard const url = 'https://api-sandbox.payabli.com/api/MoneyIn/getpaid'; const options = { method: 'POST', headers: {requestToken: '', 'Content-Type': 'application/json'}, body: '{"paymentDetails":{"totalAmount":1000,"serviceFee":0},"paymentMethod":{"cardcvv":"123","cardexp":"02/25","cardHolder":"John Cassian","cardnumber":"4111111111111111","cardzip":"12345","initiator":"payor","method":"card","saveIfSuccess":true},"customerData":{"billingAddress1":"123 Walnut Street","billingCity":"Johnson City","billingCountry":"US","billingEmail":"john@email.com","billingPhone":"1234567890","billingState":"Johnson City","billingZip":"37615","customerNumber":"3456-7645A","firstName":"John","lastName":"Cassian"},"entryPoint":"f743aed24a","ipaddress":"255.255.255.255","orderDescription":"New customer package","orderId":"982-102","source":"web"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go ComplexCard 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\": 1000,\n \"serviceFee\": 0\n },\n \"paymentMethod\": {\n \"cardcvv\": \"123\",\n \"cardexp\": \"02/25\",\n \"cardHolder\": \"John Cassian\",\n \"cardnumber\": \"4111111111111111\",\n \"cardzip\": \"12345\",\n \"initiator\": \"payor\",\n \"method\": \"card\",\n \"saveIfSuccess\": true\n },\n \"customerData\": {\n \"billingAddress1\": \"123 Walnut Street\",\n \"billingCity\": \"Johnson City\",\n \"billingCountry\": \"US\",\n \"billingEmail\": \"john@email.com\",\n \"billingPhone\": \"1234567890\",\n \"billingState\": \"Johnson City\",\n \"billingZip\": \"37615\",\n \"customerNumber\": \"3456-7645A\",\n \"firstName\": \"John\",\n \"lastName\": \"Cassian\"\n },\n \"entryPoint\": \"f743aed24a\",\n \"ipaddress\": \"255.255.255.255\",\n \"orderDescription\": \"New customer package\",\n \"orderId\": \"982-102\",\n \"source\": \"web\"\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)) } ``` ```ruby ComplexCard 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\": 1000,\n \"serviceFee\": 0\n },\n \"paymentMethod\": {\n \"cardcvv\": \"123\",\n \"cardexp\": \"02/25\",\n \"cardHolder\": \"John Cassian\",\n \"cardnumber\": \"4111111111111111\",\n \"cardzip\": \"12345\",\n \"initiator\": \"payor\",\n \"method\": \"card\",\n \"saveIfSuccess\": true\n },\n \"customerData\": {\n \"billingAddress1\": \"123 Walnut Street\",\n \"billingCity\": \"Johnson City\",\n \"billingCountry\": \"US\",\n \"billingEmail\": \"john@email.com\",\n \"billingPhone\": \"1234567890\",\n \"billingState\": \"Johnson City\",\n \"billingZip\": \"37615\",\n \"customerNumber\": \"3456-7645A\",\n \"firstName\": \"John\",\n \"lastName\": \"Cassian\"\n },\n \"entryPoint\": \"f743aed24a\",\n \"ipaddress\": \"255.255.255.255\",\n \"orderDescription\": \"New customer package\",\n \"orderId\": \"982-102\",\n \"source\": \"web\"\n}" response = http.request(request) puts response.read_body ``` ```java ComplexCard 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\": 1000,\n \"serviceFee\": 0\n },\n \"paymentMethod\": {\n \"cardcvv\": \"123\",\n \"cardexp\": \"02/25\",\n \"cardHolder\": \"John Cassian\",\n \"cardnumber\": \"4111111111111111\",\n \"cardzip\": \"12345\",\n \"initiator\": \"payor\",\n \"method\": \"card\",\n \"saveIfSuccess\": true\n },\n \"customerData\": {\n \"billingAddress1\": \"123 Walnut Street\",\n \"billingCity\": \"Johnson City\",\n \"billingCountry\": \"US\",\n \"billingEmail\": \"john@email.com\",\n \"billingPhone\": \"1234567890\",\n \"billingState\": \"Johnson City\",\n \"billingZip\": \"37615\",\n \"customerNumber\": \"3456-7645A\",\n \"firstName\": \"John\",\n \"lastName\": \"Cassian\"\n },\n \"entryPoint\": \"f743aed24a\",\n \"ipaddress\": \"255.255.255.255\",\n \"orderDescription\": \"New customer package\",\n \"orderId\": \"982-102\",\n \"source\": \"web\"\n}") .asString(); ``` ```php ComplexCard request('POST', 'https://api-sandbox.payabli.com/api/MoneyIn/getpaid', [ 'body' => '{ "paymentDetails": { "totalAmount": 1000, "serviceFee": 0 }, "paymentMethod": { "cardcvv": "123", "cardexp": "02/25", "cardHolder": "John Cassian", "cardnumber": "4111111111111111", "cardzip": "12345", "initiator": "payor", "method": "card", "saveIfSuccess": true }, "customerData": { "billingAddress1": "123 Walnut Street", "billingCity": "Johnson City", "billingCountry": "US", "billingEmail": "john@email.com", "billingPhone": "1234567890", "billingState": "Johnson City", "billingZip": "37615", "customerNumber": "3456-7645A", "firstName": "John", "lastName": "Cassian" }, "entryPoint": "f743aed24a", "ipaddress": "255.255.255.255", "orderDescription": "New customer package", "orderId": "982-102", "source": "web" }', 'headers' => [ 'Content-Type' => 'application/json', 'requestToken' => '', ], ]); echo $response->getBody(); ``` ```csharp ComplexCard 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\": 1000,\n \"serviceFee\": 0\n },\n \"paymentMethod\": {\n \"cardcvv\": \"123\",\n \"cardexp\": \"02/25\",\n \"cardHolder\": \"John Cassian\",\n \"cardnumber\": \"4111111111111111\",\n \"cardzip\": \"12345\",\n \"initiator\": \"payor\",\n \"method\": \"card\",\n \"saveIfSuccess\": true\n },\n \"customerData\": {\n \"billingAddress1\": \"123 Walnut Street\",\n \"billingCity\": \"Johnson City\",\n \"billingCountry\": \"US\",\n \"billingEmail\": \"john@email.com\",\n \"billingPhone\": \"1234567890\",\n \"billingState\": \"Johnson City\",\n \"billingZip\": \"37615\",\n \"customerNumber\": \"3456-7645A\",\n \"firstName\": \"John\",\n \"lastName\": \"Cassian\"\n },\n \"entryPoint\": \"f743aed24a\",\n \"ipaddress\": \"255.255.255.255\",\n \"orderDescription\": \"New customer package\",\n \"orderId\": \"982-102\",\n \"source\": \"web\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift ComplexCard import Foundation let headers = [ "requestToken": "", "Content-Type": "application/json" ] let parameters = [ "paymentDetails": [ "totalAmount": 1000, "serviceFee": 0 ], "paymentMethod": [ "cardcvv": "123", "cardexp": "02/25", "cardHolder": "John Cassian", "cardnumber": "4111111111111111", "cardzip": "12345", "initiator": "payor", "method": "card", "saveIfSuccess": true ], "customerData": [ "billingAddress1": "123 Walnut Street", "billingCity": "Johnson City", "billingCountry": "US", "billingEmail": "john@email.com", "billingPhone": "1234567890", "billingState": "Johnson City", "billingZip": "37615", "customerNumber": "3456-7645A", "firstName": "John", "lastName": "Cassian" ], "entryPoint": "f743aed24a", "ipaddress": "255.255.255.255", "orderDescription": "New customer package", "orderId": "982-102", "source": "web" ] 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() ``` ### Decline **Request** ```json { "paymentDetails": { "totalAmount": 100, "serviceFee": 0 }, "paymentMethod": { "cardcvv": "999", "cardexp": "02/27", "cardHolder": "Kassiane Cassian", "cardnumber": "4111111111111111", "cardzip": "12345", "initiator": "payor", "method": "card" }, "customerData": { "customerId": 4440 }, "entryPoint": "f743aed24a", "ipaddress": "255.255.255.255" } ``` **Response** ```json { "isSuccess": false, "responseData": { "AuthCode": "null", "avsResponseText": "No address or ZIP match only", "CustomerId": 4440, "cvvResponseText": "CVV2/CVC2 no match", "ReferenceId": "45-erre-324", "ResultCode": 1, "ResultText": "200: Transaction was declined by processor.. DECLINE" }, "responseText": "Declined" } ``` **SDK Code** ```python Decline import requests url = "https://api-sandbox.payabli.com/api/MoneyIn/getpaid" payload = { "paymentDetails": { "totalAmount": 100, "serviceFee": 0 }, "paymentMethod": { "cardcvv": "999", "cardexp": "02/27", "cardHolder": "Kassiane Cassian", "cardnumber": "4111111111111111", "cardzip": "12345", "initiator": "payor", "method": "card" }, "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()) ``` ```javascript Decline 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":{"cardcvv":"999","cardexp":"02/27","cardHolder":"Kassiane Cassian","cardnumber":"4111111111111111","cardzip":"12345","initiator":"payor","method":"card"},"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); } ``` ```go Decline 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 \"cardcvv\": \"999\",\n \"cardexp\": \"02/27\",\n \"cardHolder\": \"Kassiane Cassian\",\n \"cardnumber\": \"4111111111111111\",\n \"cardzip\": \"12345\",\n \"initiator\": \"payor\",\n \"method\": \"card\"\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)) } ``` ```ruby Decline 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 \"cardcvv\": \"999\",\n \"cardexp\": \"02/27\",\n \"cardHolder\": \"Kassiane Cassian\",\n \"cardnumber\": \"4111111111111111\",\n \"cardzip\": \"12345\",\n \"initiator\": \"payor\",\n \"method\": \"card\"\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 ``` ```java Decline 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 \"cardcvv\": \"999\",\n \"cardexp\": \"02/27\",\n \"cardHolder\": \"Kassiane Cassian\",\n \"cardnumber\": \"4111111111111111\",\n \"cardzip\": \"12345\",\n \"initiator\": \"payor\",\n \"method\": \"card\"\n },\n \"customerData\": {\n \"customerId\": 4440\n },\n \"entryPoint\": \"f743aed24a\",\n \"ipaddress\": \"255.255.255.255\"\n}") .asString(); ``` ```php Decline request('POST', 'https://api-sandbox.payabli.com/api/MoneyIn/getpaid', [ 'body' => '{ "paymentDetails": { "totalAmount": 100, "serviceFee": 0 }, "paymentMethod": { "cardcvv": "999", "cardexp": "02/27", "cardHolder": "Kassiane Cassian", "cardnumber": "4111111111111111", "cardzip": "12345", "initiator": "payor", "method": "card" }, "customerData": { "customerId": 4440 }, "entryPoint": "f743aed24a", "ipaddress": "255.255.255.255" }', 'headers' => [ 'Content-Type' => 'application/json', 'requestToken' => '', ], ]); echo $response->getBody(); ``` ```csharp Decline 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 \"cardcvv\": \"999\",\n \"cardexp\": \"02/27\",\n \"cardHolder\": \"Kassiane Cassian\",\n \"cardnumber\": \"4111111111111111\",\n \"cardzip\": \"12345\",\n \"initiator\": \"payor\",\n \"method\": \"card\"\n },\n \"customerData\": {\n \"customerId\": 4440\n },\n \"entryPoint\": \"f743aed24a\",\n \"ipaddress\": \"255.255.255.255\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Decline import Foundation let headers = [ "requestToken": "", "Content-Type": "application/json" ] let parameters = [ "paymentDetails": [ "totalAmount": 100, "serviceFee": 0 ], "paymentMethod": [ "cardcvv": "999", "cardexp": "02/27", "cardHolder": "Kassiane Cassian", "cardnumber": "4111111111111111", "cardzip": "12345", "initiator": "payor", "method": "card" ], "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™