Plaid.PaymentInitiation.create_payment
You're seeing just the function
create_payment
, go back to Plaid.PaymentInitiation module for more information.
Link to this function
create_payment(recipient_id, reference, amount, options \\ %{}, config)
View SourceSpecs
create_payment( recipient_id :: String.t(), reference :: String.t(), amount :: Plaid.PaymentInitiation.Amount.t(), options, Plaid.config() ) :: {:ok, Plaid.PaymentInitiation.CreatePaymentResponse.t()} | {:error, Plaid.Error.t()} when options: %{optional(:schedule) => Plaid.PaymentInitiation.Schedule.t()}
Create a payment for a recipient.
Does a POST /payment_initiation/payment/create
call which creates
a one-time or standing (recurring) payment for a recipient.
Params
recipient_id
- The ID of the recipient the payment is for.reference
- A reference for the payment.amount
- A payment amount.
Options
:schedule
- The schedule that the payment will be executed on.
Examples
PaymentInitiation.create_payment(
"recipient-id-prod-123xxx",
"Purchase Order 123",
%PaymentInitiation.Amount{currency: "GBP", value: 200},
%{
schedule: %PaymentInitiation.Schedule{
interval: "WEEKLY",
interval_execution_day: 2,
start_date: "2021-01-01",
end_date: "2021-01-31"
}
},
client_id: "123",
secret: "abc"
)
{:ok, %PaymentInitiation.CreateRecipientResponse{}}