modulr v0.4.4 Modulr.Resources.Payment
Link to this section Summary
Functions
Create a Payment to external bank accounts via Faster Payments and transfers to other Modulr accounts. Requests to Payments are asynchronous
Make a Batch Payment (multiple payments in single request)
Get a payment
Gets details about a given batch payment
Link to this section Functions
Link to this function
create(params, driver \\ Comms.HttpDriver)
Create a Payment to external bank accounts via Faster Payments and transfers to other Modulr accounts. Requests to Payments are asynchronous.
Example
Transfer to another Modulr account
Modulr.Resources.Payment.create(%{ amount: 10.50, currency: “GBP”, destination: %{
type: "ACCOUNT",
id: "A120BCEZ"
}, reference: “REF123”, sourceAccountId: “A120BCF1” })
Link to this function
create_batch(params, driver \\ Comms.HttpDriver)
Make a Batch Payment (multiple payments in single request)
Examples
Modulr.Resources.Payment.create_batch(%{
externalReference: "BatchRef",
strictProcessing: true,
payments: [%{
amount: 20.50,
currency: "GBP",
destination: %{
type: "ACCOUNT",
id: "A123DEFG"
},
externalReference: "PaymentRef",
reference: "BankStatmentRef",
sourceAccountId: "A120BCF1"
}, %{
amount: 10.90,
currency: "GBP",
destination: %{
type: "ACCOUNT",
id: "A456ABCD"
},
externalReference: "PaymentRef",
reference: "BankStatmentRef",
sourceAccountId: "A120BCF1"
}]
}})
Link to this function
get(params, driver \\ Comms.HttpDriver)
Get a payment
Example
Modulr.Resources.Payment.get(id: "P12300ABCD")
Link to this function
get_batch(bid, params \\ %{}, driver \\ Comms.HttpDriver)
Gets details about a given batch payment
Example
Modulr.Resources.Payment.get_batch("D123000123")