> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://beta-docs.payabli.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://beta-docs.payabli.com/_mcp/server.

# Make microdeposit

POST https://api-sandbox.payabli.com/api/MoneyIn/makecredit
Content-Type: application/json

Make a temporary microdeposit in a customer account to verify the customer's ownership and access to the target account. Reverse the microdeposit with `reverseCredit`.

This feature must be enabled by Payabli on a per-merchant basis. Contact support for help. 

Reference: https://beta-docs.payabli.com/api-reference/moneyin/make-an-ach-credit-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

- `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.

### Body (application/json)

This endpoint expects an object.

- `customerData` (PayorData, required) — Object describing the customer/payor.
- `paymentDetails` (PaymentDetailCredit, required) — The PaymentDetail object for microdeposit (MakeCredit) transactions.
- `paymentMethod` (RequestCreditPaymentMethod, required) — Object describing the ACH payment method to use for transaction.
- `accountId` (string, optional) — Custom identifier for payment connector.
- `entrypoint` (string, optional) — The entrypoint identifier.
- `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.

## Response

### 200

Success. The `referenceId` returned in a successful response is the `transId` value you need to reverse the microdeposit. A "Missing Gateway Data" message can indicate that the entrypoint targeted in the request isn't set up for ACH payments.

- `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

### 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".

### PaymentDetailCredit

The PaymentDetail object for microdeposit (MakeCredit) transactions.

- `totalAmount` (double, required) — Total amount to be charged. If a service fee is provided, then this amount should include the service fee.
- `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.

### RequestCreditPaymentMethod

Object describing the ACH payment method to use for transaction.

- `method` ("ach", required) — Method to use for the transaction. Must be ACH.
- `achAccount` (string, optional) — Bank account number.
- `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.
- `achHolder` (string, optional) — Bank account holder.
- `achRouting` (string, optional) — ABA/routing number of Bank account.

### 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.

## Examples

### MinimumFields

**Request**

```json
{
  "customerData": {
    "billingAddress1": "5127 Linkwood ave",
    "customerNumber": "100"
  },
  "paymentDetails": {
    "totalAmount": 1,
    "serviceFee": 0
  },
  "paymentMethod": {
    "method": "ach",
    "achAccount": "88354454",
    "achAccountType": "Checking",
    "achHolder": "John Smith",
    "achRouting": "021000021"
  },
  "entrypoint": "my-entrypoint"
}
```

**Response**

```json
{
  "isSuccess": true,
  "pageIdentifier": "null",
  "responseData": {
    "AuthCode": "AuthCode",
    "CustomerId": 4440,
    "methodReferenceId": null,
    "ReferenceId": "45-erre-324",
    "ResultCode": 1,
    "ResultText": "Approved"
  },
  "responseText": "Success"
}
```

**SDK Code**

```python MinimumFields
import requests

url = "https://api-sandbox.payabli.com/api/MoneyIn/makecredit"

payload = {
    "customerData": {
        "billingAddress1": "5127 Linkwood ave",
        "customerNumber": "100"
    },
    "paymentDetails": {
        "totalAmount": 1,
        "serviceFee": 0
    },
    "paymentMethod": {
        "method": "ach",
        "achAccount": "88354454",
        "achAccountType": "Checking",
        "achHolder": "John Smith",
        "achRouting": "021000021"
    },
    "entrypoint": "my-entrypoint"
}
headers = {
    "idempotencyKey": "6B29FC40-CA47-1067-B31D-00DD010662DA",
    "requestToken": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript MinimumFields
const url = 'https://api-sandbox.payabli.com/api/MoneyIn/makecredit';
const options = {
  method: 'POST',
  headers: {
    idempotencyKey: '6B29FC40-CA47-1067-B31D-00DD010662DA',
    requestToken: '<apiKey>',
    'Content-Type': 'application/json'
  },
  body: '{"customerData":{"billingAddress1":"5127 Linkwood ave","customerNumber":"100"},"paymentDetails":{"totalAmount":1,"serviceFee":0},"paymentMethod":{"method":"ach","achAccount":"88354454","achAccountType":"Checking","achHolder":"John Smith","achRouting":"021000021"},"entrypoint":"my-entrypoint"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go MinimumFields
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api-sandbox.payabli.com/api/MoneyIn/makecredit"

	payload := strings.NewReader("{\n  \"customerData\": {\n    \"billingAddress1\": \"5127 Linkwood ave\",\n    \"customerNumber\": \"100\"\n  },\n  \"paymentDetails\": {\n    \"totalAmount\": 1,\n    \"serviceFee\": 0\n  },\n  \"paymentMethod\": {\n    \"method\": \"ach\",\n    \"achAccount\": \"88354454\",\n    \"achAccountType\": \"Checking\",\n    \"achHolder\": \"John Smith\",\n    \"achRouting\": \"021000021\"\n  },\n  \"entrypoint\": \"my-entrypoint\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("idempotencyKey", "6B29FC40-CA47-1067-B31D-00DD010662DA")
	req.Header.Add("requestToken", "<apiKey>")
	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 MinimumFields
require 'uri'
require 'net/http'

url = URI("https://api-sandbox.payabli.com/api/MoneyIn/makecredit")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["idempotencyKey"] = '6B29FC40-CA47-1067-B31D-00DD010662DA'
request["requestToken"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"customerData\": {\n    \"billingAddress1\": \"5127 Linkwood ave\",\n    \"customerNumber\": \"100\"\n  },\n  \"paymentDetails\": {\n    \"totalAmount\": 1,\n    \"serviceFee\": 0\n  },\n  \"paymentMethod\": {\n    \"method\": \"ach\",\n    \"achAccount\": \"88354454\",\n    \"achAccountType\": \"Checking\",\n    \"achHolder\": \"John Smith\",\n    \"achRouting\": \"021000021\"\n  },\n  \"entrypoint\": \"my-entrypoint\"\n}"

response = http.request(request)
puts response.read_body
```

```java MinimumFields
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api-sandbox.payabli.com/api/MoneyIn/makecredit")
  .header("idempotencyKey", "6B29FC40-CA47-1067-B31D-00DD010662DA")
  .header("requestToken", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"customerData\": {\n    \"billingAddress1\": \"5127 Linkwood ave\",\n    \"customerNumber\": \"100\"\n  },\n  \"paymentDetails\": {\n    \"totalAmount\": 1,\n    \"serviceFee\": 0\n  },\n  \"paymentMethod\": {\n    \"method\": \"ach\",\n    \"achAccount\": \"88354454\",\n    \"achAccountType\": \"Checking\",\n    \"achHolder\": \"John Smith\",\n    \"achRouting\": \"021000021\"\n  },\n  \"entrypoint\": \"my-entrypoint\"\n}")
  .asString();
```

```php MinimumFields
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api-sandbox.payabli.com/api/MoneyIn/makecredit', [
  'body' => '{
  "customerData": {
    "billingAddress1": "5127 Linkwood ave",
    "customerNumber": "100"
  },
  "paymentDetails": {
    "totalAmount": 1,
    "serviceFee": 0
  },
  "paymentMethod": {
    "method": "ach",
    "achAccount": "88354454",
    "achAccountType": "Checking",
    "achHolder": "John Smith",
    "achRouting": "021000021"
  },
  "entrypoint": "my-entrypoint"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'idempotencyKey' => '6B29FC40-CA47-1067-B31D-00DD010662DA',
    'requestToken' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp MinimumFields
using RestSharp;

var client = new RestClient("https://api-sandbox.payabli.com/api/MoneyIn/makecredit");
var request = new RestRequest(Method.POST);
request.AddHeader("idempotencyKey", "6B29FC40-CA47-1067-B31D-00DD010662DA");
request.AddHeader("requestToken", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"customerData\": {\n    \"billingAddress1\": \"5127 Linkwood ave\",\n    \"customerNumber\": \"100\"\n  },\n  \"paymentDetails\": {\n    \"totalAmount\": 1,\n    \"serviceFee\": 0\n  },\n  \"paymentMethod\": {\n    \"method\": \"ach\",\n    \"achAccount\": \"88354454\",\n    \"achAccountType\": \"Checking\",\n    \"achHolder\": \"John Smith\",\n    \"achRouting\": \"021000021\"\n  },\n  \"entrypoint\": \"my-entrypoint\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift MinimumFields
import Foundation

let headers = [
  "idempotencyKey": "6B29FC40-CA47-1067-B31D-00DD010662DA",
  "requestToken": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "customerData": [
    "billingAddress1": "5127 Linkwood ave",
    "customerNumber": "100"
  ],
  "paymentDetails": [
    "totalAmount": 1,
    "serviceFee": 0
  ],
  "paymentMethod": [
    "method": "ach",
    "achAccount": "88354454",
    "achAccountType": "Checking",
    "achHolder": "John Smith",
    "achRouting": "021000021"
  ],
  "entrypoint": "my-entrypoint"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/MoneyIn/makecredit")! 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()
```

### ComplexFields

**Request**

```json
{
  "customerData": {
    "billingAddress1": "125 Main Street",
    "billingCity": "Kingsport",
    "billingEmail": "johnnyp@email.com",
    "company": "Acme, Inc",
    "customerNumber": "100",
    "firstName": "Johnny",
    "lastName": "Poulsbo"
  },
  "paymentDetails": {
    "totalAmount": 1,
    "serviceFee": 0
  },
  "paymentMethod": {
    "method": "ach",
    "achAccount": "88354554",
    "achAccountType": "Checking",
    "achHolder": "John Poulsbo",
    "achRouting": "029000021"
  },
  "entrypoint": "my-entrypoint"
}
```

**Response**

```json
{
  "isSuccess": true,
  "pageIdentifier": "null",
  "responseData": {
    "AuthCode": "AuthCode",
    "CustomerId": 4440,
    "methodReferenceId": null,
    "ReferenceId": "45-erre-324",
    "ResultCode": 1,
    "ResultText": "Approved"
  },
  "responseText": "Success"
}
```

**SDK Code**

```python ComplexFields
import requests

url = "https://api-sandbox.payabli.com/api/MoneyIn/makecredit"

payload = {
    "customerData": {
        "billingAddress1": "125 Main Street",
        "billingCity": "Kingsport",
        "billingEmail": "johnnyp@email.com",
        "company": "Acme, Inc",
        "customerNumber": "100",
        "firstName": "Johnny",
        "lastName": "Poulsbo"
    },
    "paymentDetails": {
        "totalAmount": 1,
        "serviceFee": 0
    },
    "paymentMethod": {
        "method": "ach",
        "achAccount": "88354554",
        "achAccountType": "Checking",
        "achHolder": "John Poulsbo",
        "achRouting": "029000021"
    },
    "entrypoint": "my-entrypoint"
}
headers = {
    "idempotencyKey": "6B29FC40-CA47-1067-B31D-00DD010662DA",
    "requestToken": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript ComplexFields
const url = 'https://api-sandbox.payabli.com/api/MoneyIn/makecredit';
const options = {
  method: 'POST',
  headers: {
    idempotencyKey: '6B29FC40-CA47-1067-B31D-00DD010662DA',
    requestToken: '<apiKey>',
    'Content-Type': 'application/json'
  },
  body: '{"customerData":{"billingAddress1":"125 Main Street","billingCity":"Kingsport","billingEmail":"johnnyp@email.com","company":"Acme, Inc","customerNumber":"100","firstName":"Johnny","lastName":"Poulsbo"},"paymentDetails":{"totalAmount":1,"serviceFee":0},"paymentMethod":{"method":"ach","achAccount":"88354554","achAccountType":"Checking","achHolder":"John Poulsbo","achRouting":"029000021"},"entrypoint":"my-entrypoint"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go ComplexFields
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api-sandbox.payabli.com/api/MoneyIn/makecredit"

	payload := strings.NewReader("{\n  \"customerData\": {\n    \"billingAddress1\": \"125 Main Street\",\n    \"billingCity\": \"Kingsport\",\n    \"billingEmail\": \"johnnyp@email.com\",\n    \"company\": \"Acme, Inc\",\n    \"customerNumber\": \"100\",\n    \"firstName\": \"Johnny\",\n    \"lastName\": \"Poulsbo\"\n  },\n  \"paymentDetails\": {\n    \"totalAmount\": 1,\n    \"serviceFee\": 0\n  },\n  \"paymentMethod\": {\n    \"method\": \"ach\",\n    \"achAccount\": \"88354554\",\n    \"achAccountType\": \"Checking\",\n    \"achHolder\": \"John Poulsbo\",\n    \"achRouting\": \"029000021\"\n  },\n  \"entrypoint\": \"my-entrypoint\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("idempotencyKey", "6B29FC40-CA47-1067-B31D-00DD010662DA")
	req.Header.Add("requestToken", "<apiKey>")
	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 ComplexFields
require 'uri'
require 'net/http'

url = URI("https://api-sandbox.payabli.com/api/MoneyIn/makecredit")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["idempotencyKey"] = '6B29FC40-CA47-1067-B31D-00DD010662DA'
request["requestToken"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"customerData\": {\n    \"billingAddress1\": \"125 Main Street\",\n    \"billingCity\": \"Kingsport\",\n    \"billingEmail\": \"johnnyp@email.com\",\n    \"company\": \"Acme, Inc\",\n    \"customerNumber\": \"100\",\n    \"firstName\": \"Johnny\",\n    \"lastName\": \"Poulsbo\"\n  },\n  \"paymentDetails\": {\n    \"totalAmount\": 1,\n    \"serviceFee\": 0\n  },\n  \"paymentMethod\": {\n    \"method\": \"ach\",\n    \"achAccount\": \"88354554\",\n    \"achAccountType\": \"Checking\",\n    \"achHolder\": \"John Poulsbo\",\n    \"achRouting\": \"029000021\"\n  },\n  \"entrypoint\": \"my-entrypoint\"\n}"

response = http.request(request)
puts response.read_body
```

```java ComplexFields
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api-sandbox.payabli.com/api/MoneyIn/makecredit")
  .header("idempotencyKey", "6B29FC40-CA47-1067-B31D-00DD010662DA")
  .header("requestToken", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"customerData\": {\n    \"billingAddress1\": \"125 Main Street\",\n    \"billingCity\": \"Kingsport\",\n    \"billingEmail\": \"johnnyp@email.com\",\n    \"company\": \"Acme, Inc\",\n    \"customerNumber\": \"100\",\n    \"firstName\": \"Johnny\",\n    \"lastName\": \"Poulsbo\"\n  },\n  \"paymentDetails\": {\n    \"totalAmount\": 1,\n    \"serviceFee\": 0\n  },\n  \"paymentMethod\": {\n    \"method\": \"ach\",\n    \"achAccount\": \"88354554\",\n    \"achAccountType\": \"Checking\",\n    \"achHolder\": \"John Poulsbo\",\n    \"achRouting\": \"029000021\"\n  },\n  \"entrypoint\": \"my-entrypoint\"\n}")
  .asString();
```

```php ComplexFields
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api-sandbox.payabli.com/api/MoneyIn/makecredit', [
  'body' => '{
  "customerData": {
    "billingAddress1": "125 Main Street",
    "billingCity": "Kingsport",
    "billingEmail": "johnnyp@email.com",
    "company": "Acme, Inc",
    "customerNumber": "100",
    "firstName": "Johnny",
    "lastName": "Poulsbo"
  },
  "paymentDetails": {
    "totalAmount": 1,
    "serviceFee": 0
  },
  "paymentMethod": {
    "method": "ach",
    "achAccount": "88354554",
    "achAccountType": "Checking",
    "achHolder": "John Poulsbo",
    "achRouting": "029000021"
  },
  "entrypoint": "my-entrypoint"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'idempotencyKey' => '6B29FC40-CA47-1067-B31D-00DD010662DA',
    'requestToken' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp ComplexFields
using RestSharp;

var client = new RestClient("https://api-sandbox.payabli.com/api/MoneyIn/makecredit");
var request = new RestRequest(Method.POST);
request.AddHeader("idempotencyKey", "6B29FC40-CA47-1067-B31D-00DD010662DA");
request.AddHeader("requestToken", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"customerData\": {\n    \"billingAddress1\": \"125 Main Street\",\n    \"billingCity\": \"Kingsport\",\n    \"billingEmail\": \"johnnyp@email.com\",\n    \"company\": \"Acme, Inc\",\n    \"customerNumber\": \"100\",\n    \"firstName\": \"Johnny\",\n    \"lastName\": \"Poulsbo\"\n  },\n  \"paymentDetails\": {\n    \"totalAmount\": 1,\n    \"serviceFee\": 0\n  },\n  \"paymentMethod\": {\n    \"method\": \"ach\",\n    \"achAccount\": \"88354554\",\n    \"achAccountType\": \"Checking\",\n    \"achHolder\": \"John Poulsbo\",\n    \"achRouting\": \"029000021\"\n  },\n  \"entrypoint\": \"my-entrypoint\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift ComplexFields
import Foundation

let headers = [
  "idempotencyKey": "6B29FC40-CA47-1067-B31D-00DD010662DA",
  "requestToken": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "customerData": [
    "billingAddress1": "125 Main Street",
    "billingCity": "Kingsport",
    "billingEmail": "johnnyp@email.com",
    "company": "Acme, Inc",
    "customerNumber": "100",
    "firstName": "Johnny",
    "lastName": "Poulsbo"
  ],
  "paymentDetails": [
    "totalAmount": 1,
    "serviceFee": 0
  ],
  "paymentMethod": [
    "method": "ach",
    "achAccount": "88354554",
    "achAccountType": "Checking",
    "achHolder": "John Poulsbo",
    "achRouting": "029000021"
  ],
  "entrypoint": "my-entrypoint"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/MoneyIn/makecredit")! 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()
```