View Source StarkBank.PaymentPreview (starkbankpublish v0.0.1)
Groups PaymentPreview related functions
Summary
Functions
A PaymentPreview is used to get information from a payment code before confirming the payment. This resource can be used to preview BR Codes and bar codes of boleto, tax and utility payments
Send a list of PaymentPreviews objects for processing in the Stark Bank API
Same as create(), but it will unwrap the error tuple and raise in case of errors.
Types
Functions
A PaymentPreview is used to get information from a payment code before confirming the payment. This resource can be used to preview BR Codes and bar codes of boleto, tax and utility payments
Parameters (required):
:id
[string]: Main identification of the payment. This should be the BR Code for Pix payments and lines or bar codes for payment slips. ex: "34191.09008 63571.277308 71444.640008 5 81960000000062", "00020126580014br.gov.bcb.pix0136a629532e-7693-4846-852d-1bbff817b5a8520400005303986540510.005802BR5908T'Challa6009Sao Paulo62090505123456304B14A"
Parameters (optional):
:scheduled
[Date or string]: intended payment date. Right now, this parameter only has effect on BrcodePreviews. ex: 2020-12-31
Attributes (return-only):
:type
[string]: Payment type. ex: "brcode-payment", "boleto-payment", "utility-payment" or "tax-payment":payment
[BrcodePreview, BoletoPreview, UtilityPreview or TaxPreview]: Information preview of the informed payment.
@spec create([t() | map()], [ {:user, StarkBank.User.Project.t() | StarkBank.User.Organization.t() | nil} ]) :: {:ok, [t()]} | {:error, [StarkBank.Error.t()]}
Send a list of PaymentPreviews objects for processing in the Stark Bank API
Parameters (required):
:previews
[list of PaymentPreviews structs]: list of PaymentPreviews objects to be created in the API
Options:
:user
[Organization/Project, default nil]: Organization or Project struct returned from StarkBank.project(). Only necessary if default project or organization has not been set in configs.
Return:
- list of PaymentPreviews structs with updated attributes
@spec create!([t() | map()], [ {:user, StarkBank.User.Project.t() | StarkBank.User.Organization.t() | nil} ]) :: any()
Same as create(), but it will unwrap the error tuple and raise in case of errors.