Record and reconcile bill payments
Record and reconcile bill payments in the SMB's accounting software
Overview
Finally, your SMB customer will make a payment from your application, which you should then record and reconcile back to the SMB's accounting software. A bill payment represents an allocation of money within any of your customer's accounts payable (AP) accounts.
We built async Bill Pay to handle a wide range of bill pay scenarios, for example:
- A payment made against a bill, e.g. a credit card payment, cheque payment, or cash payment
- An allocation of a supplier's credit note to a bill or a refund
- A bill payment made directly to an AP account, e.g. an overpayment or a prepayment
We have summarized the approaches to bill payments and reconciliation available to you on the diagram:
Manage payment accounts
Your SMB customers may have multiple bank accounts they can use to pay for a bill. In your application, enable them to select or create the account the payment should originate from.
Foreign currency payments
To facilitate payments in a foreign currency, you can:
- Convert the payment to the currency of the account.
- Create a new account in the payment currency.
Use the Get create/update bank account model endpoint to view the list of the company's currently enabled currencies. It can return:
- Single value: the account's base currency in platforms that only support the base currency
- Multiple values: several currencies enabled by the SMB user in their accounting software
- No values: empty array for platforms where any and all currencies can be selected
Retrieve accounts
If your SMB customer is making payments from an existing bank account, retrieve a list of their accounts and allow them to map payment methods against each one.
Use the List accounts endpoint and filter by isBankAccount=true
to return a list of valid bank accounts.
- TypeScript
- Python
- C#
- Go
const accountsListResponse = await payablesClient.accounts.list({
companyId: companyId,
query: 'isBankAccount=true'
});
accounts_list_request = operations.ListAccountsRequest(
company_id=company_id,
query='isBankAccount=true'
)
accounts_list_response = payables_client.accounts.list(accounts_list_request)
var accountsListResponse = await payablesClient.Accounts.ListAsync(new ListAccountsRequest() {
CompanyId = companyId,
Query = "isBankAccount=true"
});
ctx := context.Background()
accountsListResponse, err := payablesClient.Accounts.List(ctx, operations.ListAccountsRequest{
CompanyID: companyID,
Query: "isBankAccount=true"
})
Create account
If the SMB customer plans to make payments from a new payment method or account that you provide, create the new account in their accounting software. The account will contain their transactions, making the SMB's payment reconciliation workflows easier.
You can also use the Get create bank account model or Get create account model endpoints first to check integration-specific requirements for account creation, or read more about creating data with Codat.
Create account in Sage Intacct
For Sage Intacct, use the Create account endpoint to reflect that account in the customer's accounting software.
- TypeScript
- Python
- C#
- Go
const accountCreateResponse = await payablesClient.accounts.create({
accountPrototype: {
name: "BillPay Debit Account"
fullyQualifiedName: "BillPay Debit Account",
fullyQualifiedCategory: "Asset.Current",
nominalCode: "610",
currency: "USD",
status: AccountStatus.Active,
type: AccountType.Asset,
currentBalance: 0,
},
companyId: companyId,
connectionId: connectionId
});
account_create_request = operations.CreateAccountRequest(
account_prototype=shared.AccountPrototype(
name='BillPay Debit Account',
fully_qualified_name='BillPay Debit Account',
fully_qualified_category='Asset.Current',
nominal_code='610',
currency='USD',
status=shared.AccountStatus.ACTIVE,
type=shared.AccountType.ASSET,
current_balance=0,
),
company_id=company_id,
connection_id=connection_id
)
account_create_response = payables_client.accounts.create(account_create_request)
var accountCreateResponse = await payablesClient.Accounts.CreateAsync(new CreateAccountRequest() {
AccountPrototype = new AccountPrototype(){
Name = "BillPay Debit Account",
FullyQualifiedName = "BillPay Debit Account",
FullyQualifiedCategory = "Asset.Current",
NominalCode = "610",
Currency = "USD",
Status = AccountStatus.Active,
Type = AccountType.Asset,
CurrentBalance = 0,
},
CompanyId = companyId,
ConnectionId = connectionId
});
ctx := context.Background()
accountCreateResponse, err := payablesClient.Accounts.Create(ctx, operations.CreateAccountRequest{
AccountPrototype: &shared.AccountPrototype{
Name: syncforpayables.String("BillPay Debit Account"),
FullyQualifiedName: syncforpayables.String("BillPay Debit Account"),
FullyQualifiedCategory: syncforpayables.String("Asset.Current"),
NominalCode: syncforpayables.String("610"),
Currency: syncforpayables.String("USD"),
Status: shared.AccountStatusActive.ToPointer(),
Type: shared.AccountTypeAsset.ToPointer(),
CurrentBalance: 0
},
CompanyID: companyID,
ConnectionID: connectionID,
})
Create account in other integrations
To create a new bank account in MYOB, Xero, QuickBooks Online, or NetSuite use the Create bank account endpoint.
Xero doesn't support the creation of credit accounts.
- TypeScript
- Python
- C#
- Go
const accountCreateResponse = await payablesClient.accounts.create({
account: {
accountName: "BillPay Debit Account",
accountType: AccountType.Debit,
accountNumber: "80088008",
currency: "USD",
balance: 0,
availableBalance: 0,
},
companyId: companyId,
connectionId: connectionId
});
account_create_request = operations.CreateAccountsRequest(
account=shared.Account(
account_name="BillPay Debit Account",
account_type=shared.AccountType.DEBIT,
account_number="80088008",
currency="USD",
balance=0,
available_balance=0,
)
company_id=company_id,
connection_id=connection_id
)
account_create_response = payables_client.accounts.create(account_create_request)
var accountCreateResponse = await payablesClient.Accounts.CreateAsync(new CreateAccountRequest() {
Account=new Account(){
AccountName = "BillPay Debit Account",
AccountType = AccountType.Debit,
AccountNumber = "80088008",
Currency = "USD",
Balance = 0,
AvailableBalance = 0,
}
CompanyId = companyId,
ConnectionId = connectionId
});
ctx := context.Background()
accountsResponse, err := payablesClient.Accounts.Create(ctx, operations.CreateAccountRequest{
Account: &shared.Account{
AccountName: syncforpayables.String("BillPay Debit Account"),
AccountType: AccountType.Debit,
AccountNumber: "80088008",
Currency: syncforpayables.String("USD"),
Balance: 0,
AvailableBalance: 0,
},
CompanyID: companyID,
ConnectionID: connectionID,
})