Create a payment link
POST {{baseUrl}}/payments/br/payment-links/
Documentation 🎯
A payment link is a shareable URL that will start a fully responsive hosted widget that guides your user through the payment process. You need to provide some basic information (such as the amount, the account that will receive the funds, and a description) and then just share the URL with the user. Simple, elegant, and headache-free.
In the Qodex request, you just need to add the following information:
amount
- the amount that your user should paycustomer
- the ID of the customer that you created in the previous step. We have automated it for you in the collection to make life easier 🤓.description
- the description of the paymentbeneficiary_bank_account
- the ID of the bank account your created in the Prerequisites step. But again, we have automated it for you in the collection to make life easier 🤓.callback_urls
- here you'll just need to add the URLs your user should be redirected to in case ofsuccess
cancel
{
"amount": "float_as_a_string",
"customer": "customer_id",
"description": "description_of_the_payment",
"allowed_payment_method_types": ["open_finance"],
"provider": "belvo",
"payment_method_details": {
"open_finance": {
"beneficiary_bank_account": "your_bank_account_id"
}
},
"callback_urls": {
"cancel": "url_to_redirect_user_if_they_cancel_process",
"success": "url_to_redirect_user_if_the_payment_is_successful"
}
}
And on a successful POST, you'll receive the payment_url
you need to share with your user! After that, the widget will guide the user through all the steps to finally make the payment 🥳.
Request Body
{"amount"=>"float_as_a_string", "customer"=>"customer_id", "description"=>"description_of_the_payment", "statement_description"=>"description_to_show_on_bank_statement", "allowed_payment_method_types"=>["open_finance"], "provider"=>"belvo", "payment_method_details"=>{"open_finance"=>{"beneficiary_bank_account"=>"beneficiary_bank_account"}}, "callback_urls"=>{"cancel"=>"url_to_redirect_user_if_they_cancel_process", "success"=>"url_to_redirect_user_if_the_payment_is_successful"}, "metadata"=>{"internal_reference_id"=>"optional_metadata_key-value_pair"}}