# 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://docs.payabli.com/developers/api-reference/moneyin/make-an-ach-credit-transaction ## OpenAPI Specification ```yaml openapi: 3.1.1 info: title: Make an ACH credit transaction version: endpoint_moneyIn.Credit paths: /MoneyIn/makecredit: post: operationId: credit summary: Make an ACH credit transaction description: >- 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. tags: - - subpackage_moneyIn parameters: - name: forceCustomerCreation in: query required: false schema: $ref: '#/components/schemas/type_:ForceCustomerCreation' - name: requestToken in: header required: true schema: type: string - name: idempotencyKey in: header required: false schema: $ref: '#/components/schemas/type_:IdempotencyKey' responses: '200': description: >- 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. content: application/json: schema: $ref: '#/components/schemas/type_:PayabliApiResponse0' '400': description: Bad request/ invalid data content: {} '401': description: Unauthorized request. content: {} '500': description: Internal API Error content: {} '503': description: Database connection error content: {} requestBody: content: application/json: schema: type: object properties: accountId: $ref: '#/components/schemas/type_:Accountid' customerData: $ref: '#/components/schemas/type_:PayorDataRequest' description: Object describing the customer/payor. entrypoint: $ref: '#/components/schemas/type_:Entrypointfield' orderDescription: $ref: '#/components/schemas/type_:Orderdescription' orderId: $ref: '#/components/schemas/type_:OrderId' paymentDetails: $ref: '#/components/schemas/type_:PaymentDetailCredit' paymentMethod: $ref: '#/components/schemas/type_moneyIn:RequestCreditPaymentMethod' description: >- Object describing the ACH payment method to use for transaction. source: $ref: '#/components/schemas/type_:Source' subdomain: $ref: '#/components/schemas/type_:Subdomain' required: - customerData - paymentDetails - paymentMethod components: schemas: type_:ForceCustomerCreation: type: boolean type_:IdempotencyKey: type: string type_:Accountid: type: string type_:AdditionalData: type: object additionalProperties: type: object additionalProperties: description: Any type type_:BillingAddressNullable: type: string type_:BillingAddressAddtlNullable: type: string type_:BillingCityNullable: type: string type_:BillingCountryNullable: type: string type_:Email: type: string format: email type_:PhoneNumber: type: string type_:BillingStateNullable: type: string type_:BillingZip: type: string type_:CustomerId: type: integer format: int64 type_:CustomerNumberNullable: type: string type_:Identifierfields: type: array items: type: string type_:Shippingaddress: type: string type_:Shippingaddressadditional: type: string type_:Shippingcity: type: string type_:Shippingcountry: type: string type_:Shippingstate: type: string type_:Shippingzip: type: string type_:PayorDataRequest: type: object properties: additionalData: $ref: '#/components/schemas/type_:AdditionalData' billingAddress1: $ref: '#/components/schemas/type_:BillingAddressNullable' billingAddress2: $ref: '#/components/schemas/type_:BillingAddressAddtlNullable' billingCity: $ref: '#/components/schemas/type_:BillingCityNullable' billingCountry: $ref: '#/components/schemas/type_:BillingCountryNullable' billingEmail: $ref: '#/components/schemas/type_:Email' billingPhone: $ref: '#/components/schemas/type_:PhoneNumber' billingState: $ref: '#/components/schemas/type_:BillingStateNullable' billingZip: $ref: '#/components/schemas/type_:BillingZip' description: >- Customer's billing ZIP code. For Pay In functions, this field supports 5-digit and 9-digit ZIP codes and alphanumeric Canadian postal codes. For example: "37615-1234" or "37615". company: type: string description: Customer's company name. customerId: $ref: '#/components/schemas/type_:CustomerId' customerNumber: $ref: '#/components/schemas/type_:CustomerNumberNullable' firstName: type: string description: Customer/Payor first name. identifierFields: $ref: '#/components/schemas/type_:Identifierfields' lastName: type: string description: Customer/Payor last name. shippingAddress1: $ref: '#/components/schemas/type_:Shippingaddress' shippingAddress2: $ref: '#/components/schemas/type_:Shippingaddressadditional' shippingCity: $ref: '#/components/schemas/type_:Shippingcity' shippingCountry: $ref: '#/components/schemas/type_:Shippingcountry' shippingState: $ref: '#/components/schemas/type_:Shippingstate' shippingZip: $ref: '#/components/schemas/type_:Shippingzip' type_:Entrypointfield: type: string type_:Orderdescription: type: string type_:OrderId: type: string type_:PaymentDetailCredit: type: object properties: currency: type: string description: >- Currency code ISO-4217. If not code is provided the currency in the paypoint setting is taken. Default is **USD** serviceFee: type: number format: double description: >- 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. totalAmount: type: number format: double description: >- Total amount to be charged. If a service fee is provided, then this amount should include the service fee. required: - totalAmount type_:Achaccount: type: string type_:Achaccounttype: type: string enum: - value: Checking - value: Savings type_:AchSecCode: type: string type_:AchHolder: type: string type_:Achrouting: type: string type_moneyIn:RequestCreditPaymentMethod: type: object properties: achAccount: $ref: '#/components/schemas/type_:Achaccount' achAccountType: $ref: '#/components/schemas/type_:Achaccounttype' achCode: $ref: '#/components/schemas/type_:AchSecCode' achHolder: $ref: '#/components/schemas/type_:AchHolder' description: Bank account holder. achRouting: $ref: '#/components/schemas/type_:Achrouting' method: type: string enum: - type: stringLiteral value: ach description: Method to use for the transaction. Must be ACH. required: - method type_:Source: type: string type_:Subdomain: type: string type_:IsSuccess: type: boolean type_:PageIdentifier: type: string type_:Authcode: type: string type_:AvsResponseText: type: string type_:Customeridtrans: type: integer format: int64 type_:CvvResponseText: type: string type_:MethodReferenceId: type: string type_:Referenceidtrans: type: string type_:ResultCode: type: integer type_:Resulttext: type: string type_:PayabliApiResponse0ResponseData: type: object properties: AuthCode: $ref: '#/components/schemas/type_:Authcode' avsResponseText: $ref: '#/components/schemas/type_:AvsResponseText' CustomerId: $ref: '#/components/schemas/type_:Customeridtrans' cvvResponseText: $ref: '#/components/schemas/type_:CvvResponseText' methodReferenceId: $ref: '#/components/schemas/type_:MethodReferenceId' ReferenceId: $ref: '#/components/schemas/type_:Referenceidtrans' ResultCode: $ref: '#/components/schemas/type_:ResultCode' ResultText: $ref: '#/components/schemas/type_:Resulttext' type_:ResponseText: type: string type_:PayabliApiResponse0: type: object properties: isSuccess: $ref: '#/components/schemas/type_:IsSuccess' pageIdentifier: $ref: '#/components/schemas/type_:PageIdentifier' responseData: $ref: '#/components/schemas/type_:PayabliApiResponse0ResponseData' responseText: $ref: '#/components/schemas/type_:ResponseText' required: - responseText ``` ## SDK Code Examples ```python MinimumFields from payabli import PaymentDetailCredit, PayorDataRequest, payabli from payabli.money_in import RequestCreditPaymentMethod client = payabli( api_key="YOUR_API_KEY", ) client.money_in.credit( idempotency_key="6B29FC40-CA47-1067-B31D-00DD010662DA", customer_data=PayorDataRequest( billing_address_1="5127 Linkwood ave", customer_number="100", ), entrypoint="my-entrypoint", payment_details=PaymentDetailCredit( service_fee=0.0, total_amount=1.0, ), payment_method=RequestCreditPaymentMethod( ach_account="88354454", ach_account_type="Checking", ach_holder="John Smith", ach_routing="021000021", ), ) ``` ```typescript MinimumFields import { PayabliClient } from "@payabli/sdk-node"; const client = new PayabliClient({ apiKey: "YOUR_API_KEY" }); await client.moneyIn.credit({ idempotencyKey: "6B29FC40-CA47-1067-B31D-00DD010662DA", customerData: { billingAddress1: "5127 Linkwood ave", customerNumber: "100" }, entrypoint: "my-entrypoint", paymentDetails: { serviceFee: 0, totalAmount: 1 }, paymentMethod: { achAccount: "88354454", achAccountType: "Checking", achHolder: "John Smith", achRouting: "021000021", method: "ach" } }); ``` ```go MinimumFields import ( context "context" option "github.com/payabli/sdk-go/option" sdkgo "github.com/payabli/sdk-go" sdkgoclient "github.com/payabli/sdk-go/client" ) client := sdkgoclient.NewClient( option.WithApiKey( "", ), ) response, err := client.MoneyIn.Credit( context.TODO(), &sdkgo.RequestCredit{ IdempotencyKey: sdkgo.String( "6B29FC40-CA47-1067-B31D-00DD010662DA", ), CustomerData: &sdkgo.PayorDataRequest{ BillingAddress1: sdkgo.String( "5127 Linkwood ave", ), CustomerNumber: sdkgo.String( "100", ), }, Entrypoint: sdkgo.String( "my-entrypoint", ), PaymentDetails: &sdkgo.PaymentDetailCredit{ ServiceFee: sdkgo.Float64( 0, ), TotalAmount: 1, }, PaymentMethod: &sdkgo.RequestCreditPaymentMethod{ AchAccount: sdkgo.String( "88354454", ), AchAccountType: sdkgo.AchaccounttypeChecking, AchHolder: sdkgo.String( "John Smith", ), AchRouting: sdkgo.String( "021000021", ), }, }, ) ``` ```csharp MinimumFields using PayabliApi; var client = new PayabliApiClient("API_KEY"); await client.MoneyIn.CreditAsync( new RequestCredit { IdempotencyKey = "6B29FC40-CA47-1067-B31D-00DD010662DA", CustomerData = new PayorDataRequest { BillingAddress1 = "5127 Linkwood ave", CustomerNumber = "100", }, Entrypoint = "my-entrypoint", PaymentDetails = new PaymentDetailCredit { ServiceFee = 0, TotalAmount = 1 }, PaymentMethod = new RequestCreditPaymentMethod { AchAccount = "88354454", AchAccountType = Achaccounttype.Checking, AchHolder = "John Smith", AchRouting = "021000021", Method = "ach", }, } ); ``` ```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"] = '' 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 HttpResponse response = Unirest.post("https://api-sandbox.payabli.com/api/MoneyIn/makecredit") .header("idempotencyKey", "6B29FC40-CA47-1067-B31D-00DD010662DA") .header("requestToken", "") .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 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' => '', ], ]); echo $response->getBody(); ``` ```swift MinimumFields import Foundation let headers = [ "idempotencyKey": "6B29FC40-CA47-1067-B31D-00DD010662DA", "requestToken": "", "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() ``` ```python ComplexFields from payabli import PaymentDetailCredit, PayorDataRequest, payabli from payabli.money_in import RequestCreditPaymentMethod client = payabli( api_key="YOUR_API_KEY", ) client.money_in.credit( idempotency_key="6B29FC40-CA47-1067-B31D-00DD010662DA", customer_data=PayorDataRequest( billing_address_1="125 Main Street", billing_city="Kingsport", billing_email="johnnyp@email.com", company="Acme, Inc", customer_number="100", first_name="Johnny", last_name="Poulsbo", ), entrypoint="my-entrypoint", payment_details=PaymentDetailCredit( service_fee=0.0, total_amount=1.0, ), payment_method=RequestCreditPaymentMethod( ach_account="88354554", ach_account_type="Checking", ach_holder="John Poulsbo", ach_routing="029000021", ), ) ``` ```typescript ComplexFields import { PayabliClient } from "@payabli/sdk-node"; const client = new PayabliClient({ apiKey: "YOUR_API_KEY" }); await client.moneyIn.credit({ idempotencyKey: "6B29FC40-CA47-1067-B31D-00DD010662DA", customerData: { billingAddress1: "125 Main Street", billingCity: "Kingsport", billingEmail: "johnnyp@email.com", company: "Acme, Inc", customerNumber: "100", firstName: "Johnny", lastName: "Poulsbo" }, entrypoint: "my-entrypoint", paymentDetails: { serviceFee: 0, totalAmount: 1 }, paymentMethod: { achAccount: "88354554", achAccountType: "Checking", achHolder: "John Poulsbo", achRouting: "029000021", method: "ach" } }); ``` ```go ComplexFields import ( context "context" option "github.com/payabli/sdk-go/option" sdkgo "github.com/payabli/sdk-go" sdkgoclient "github.com/payabli/sdk-go/client" ) client := sdkgoclient.NewClient( option.WithApiKey( "", ), ) response, err := client.MoneyIn.Credit( context.TODO(), &sdkgo.RequestCredit{ IdempotencyKey: sdkgo.String( "6B29FC40-CA47-1067-B31D-00DD010662DA", ), CustomerData: &sdkgo.PayorDataRequest{ BillingAddress1: sdkgo.String( "5127 Linkwood ave", ), CustomerNumber: sdkgo.String( "100", ), }, Entrypoint: sdkgo.String( "my-entrypoint", ), PaymentDetails: &sdkgo.PaymentDetailCredit{ ServiceFee: sdkgo.Float64( 0, ), TotalAmount: 1, }, PaymentMethod: &sdkgo.RequestCreditPaymentMethod{ AchAccount: sdkgo.String( "88354454", ), AchAccountType: sdkgo.AchaccounttypeChecking, AchHolder: sdkgo.String( "John Smith", ), AchRouting: sdkgo.String( "021000021", ), }, }, ) ``` ```csharp ComplexFields using PayabliApi; var client = new PayabliApiClient("API_KEY"); await client.MoneyIn.CreditAsync( new RequestCredit { IdempotencyKey = "6B29FC40-CA47-1067-B31D-00DD010662DA", CustomerData = new PayorDataRequest { BillingAddress1 = "125 Main Street", BillingCity = "Kingsport", BillingEmail = "johnnyp@email.com", Company = "Acme, Inc", CustomerNumber = "100", FirstName = "Johnny", LastName = "Poulsbo", }, Entrypoint = "my-entrypoint", PaymentDetails = new PaymentDetailCredit { ServiceFee = 0, TotalAmount = 1 }, PaymentMethod = new RequestCreditPaymentMethod { AchAccount = "88354554", AchAccountType = Achaccounttype.Checking, AchHolder = "John Poulsbo", AchRouting = "029000021", Method = "ach", }, } ); ``` ```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"] = '' 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 HttpResponse response = Unirest.post("https://api-sandbox.payabli.com/api/MoneyIn/makecredit") .header("idempotencyKey", "6B29FC40-CA47-1067-B31D-00DD010662DA") .header("requestToken", "") .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 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' => '', ], ]); echo $response->getBody(); ``` ```swift ComplexFields import Foundation let headers = [ "idempotencyKey": "6B29FC40-CA47-1067-B31D-00DD010662DA", "requestToken": "", "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() ```