ACH Payout (Credit)
ACH Payouts are any transaction where money flows from the merchant to the buyer.
Make sure you have a Meld customerId for the buyer ready before continuing. Sample API calls for all the steps for making a payin are found on this page.
Make an ACH Credit (aka Payout) transaction
- Call Meld's /transactions/payout endpoint in order to make an ACH Payout. Make sure to pass in the customerId of the buyer you created in the Creating a Customer stage. This is where you will pass in the ACH details including the account type, account number and routing number.
- Once the transaction has been submitted, listen for the TRANSACTION_FIAT_CREATED webhook to know that a transaction has been initiated. You can use this webhook as a trigger to call Meld's get transaction endpoint to fetch the latest transaction details.
- Depending on the underlying service provider, you may receive a TRANSACTION_FIAT_UPDATED webhook letting you know if the transaction has succeeded, or failed, or if something else has occurred. Use this webhook as a trigger to fetch the latest transaction details. For certain providers who do not support webhooks, you will not receive updates after the transaction is submitted, however, if the transaction fails upon submission you will see that through response object immediately.
Webhook Support
To know which providers support webhooks and which don't, see our provider testing guide.
API Calls
Make a Payout
Here is a sample call to /transactions/payout to make an ACH Payout transaction:
{
"customerId": "WXDeHGgNJ1t1nFnoVY43Bh",
"sourceAmount": "15.00",
"sourceCurrencyCode": "USD",
"paymentMethod" : {
"type" : "ACH",
"details": {
"accountType" : "CHECKING", // should be CHECKING, SAVINGS, or BUSINESS_CHECKING
"routingNumber": "987654321",
"accountNumber": "43214321"
}
},
"serviceProvider": "MOOV"
}Here is a sample response:
{
"transaction": {
"id": "WXDpaGwDM9pW8zyFG4A7GH",
"parentPaymentTransactionId": null,
"accountId": "W2bJdfJRoJQHjsNnUeUNRA",
"isPassthrough": false,
"passthroughReference": null,
"isImported": false,
"customer": {
"id": "WXDeHGgNJ1t1nFnoVY43Bh",
"accountId": "W2bJdfJRoJQHjsNnUeUNRA",
"externalId": "testcustomer1",
"name": {
"firstName": "John",
"lastName": "Smith"
},
"email": "[email protected]",
"addresses": [
{
"type": "BILLING",
"addressDetails": {
"lineOne": "123 Fake St",
"lineTwo": null,
"city": "Boston",
"region": "MA",
"country": "US",
"postalCode": "02112",
"firstName": "John",
"lastName": "Smith"
}
}
]
},
"transactionType": "PAYOUT",
"status": "PENDING",
"sourceAmount": 15.00,
"sourceCurrencyCode": "USD",
"destinationAmount": null,
"destinationCurrencyCode": null,
"paymentMethodType": "ACH",
"serviceProvider": "MOOV",
"serviceTransactionId": "91f290b1-3f82-4353-a319-996ace69ca8d",
"description": null,
"externalReferenceId": null,
"serviceProviderDetails": {
"input": null,
"response": null
},
"multiFactorAuthorizationStatus": null,
"createdAt": "2024-06-12T21:48:28.738274Z",
"updatedAt": "2024-06-12T21:48:31.952499Z",
"countryCode": "US",
"sessionId": null,
"externalSessionId": null,
"paymentDetails": {
"authAmount": null,
"captureAmount": null
},
"cryptoDetails": null,
"externalCustomerId": "testcustomer1",
"fiatAmountInUsd": null,
"sessionClientTags": null,
"serviceProviderTransactionUrl": null
}
}Fetching Transaction Details
When you call /transactions/:transactionId to fetch the details of the transaction you made, here is a sample response:
{
"transaction": {
"id": "WXDpaGwDM9pW8zyFG4A7GH",
"parentPaymentTransactionId": null,
"accountId": "W2bJdfJRoJQHjsNnUeUNRA",
"isPassthrough": false,
"passthroughReference": null,
"isImported": false,
"customer": {
"id": "WXDeHGgNJ1t1nFnoVY43Bh",
"accountId": "W2bJdfJRoJQHjsNnUeUNRA",
"externalId": "testcustomer1",
"name": {
"firstName": "John",
"lastName": "Smith"
},
"email": "[email protected]",
"addresses": [
{
"type": "BILLING",
"addressDetails": {
"lineOne": "123 Fake St",
"lineTwo": null,
"city": "Boston",
"region": "MA",
"country": "US",
"postalCode": "02112",
"firstName": "John",
"lastName": "Smith"
}
}
]
},
"transactionType": "PAYOUT",
"status": "SETTLED",
"sourceAmount": 15.00,
"sourceCurrencyCode": "USD",
"destinationAmount": null,
"destinationCurrencyCode": null,
"paymentMethodType": "ACH",
"serviceProvider": "MOOV",
"serviceTransactionId": "91f290b1-3f82-4353-a319-996ace69ca8d",
"description": null,
"externalReferenceId": null,
"serviceProviderDetails": {
"input": null,
"response": null
},
"multiFactorAuthorizationStatus": null,
"createdAt": "2024-06-12T20:47:43.157537Z",
"updatedAt": "2024-06-12T21:18:34.359515Z",
"countryCode": "US",
"sessionId": null,
"externalSessionId": null,
"paymentDetails": {
"authAmount": null,
"captureAmount": null
},
"cryptoDetails": null,
"externalCustomerId": "testcustomer1",
"fiatAmountInUsd": 15.00,
"sessionClientTags": null,
"serviceProviderTransactionUrl": null
}
}Updated 2 months ago