How It Works
- When making a payment, the customer receives a unique reference number and an entity number.
- They can then make the payment at an ATM using their debit card and entering the provided numbers.
- Alternatively, they can pay at a bank branch or through their online banking platform.
Integrating on your website / application
Step 1: Create a payin
Tazapay uses apayin object to represent your intent to collect a payment from your customer. The payin object tracks state changes from multibanco_eur transaction creation to payment completion.Create a payin on your server with an amount, invoice_currency
EUR and a transaction_description using the create payin API
A payin is created with the status requires_payment_method.
Sample cURL
Step 2: Confirm a payin
Confirm the payin created in step 1 using the confirm payin API. Upon confirmation of the payin, a redirect URL is generated to redirect the customer. The status of the payin moves torequires_action
Refer the below for the fields to be passed in payment_method_details
Sample cURL
Combining Steps 1 and 2 into a single step
Instead of making 2 API calls, you can also combine steps 1 and 2 into a single API call. To do so, pass the parameters in both the create payin and confirm payin endpoints to the create payin API. Also, pass the following field| Field | type | Mandatory (Y/N) | Description |
|---|---|---|---|
| confirm | boolean | Y | To confirm the payin along with creation |
Sample cURL
Step 3: Redirect the customer to the redirect URL
After confirming the payin, you will receive the following response
You must redirect the customer to latest_payment_attempt_data.redirect_url in order to enable them to complete the payment.
Step 4: Handle post-payment events
Tazapay sends apayin.succeeded event as soon as the funds are received from the customer. Tazapay sends these events to the endpoint configured from your dashboard. You can receive these events and run actions (for example, sending an order confirmation email to your customers, logging the sale in a database, starting a shipping workflow, etc.)
If the payment is not made by the customer within 7 days and the URL expires, Tazapay sends a payment_attempt.failed event. To generate a new URL, confirm the payin again using Step 2.
| Event | Description | Next Steps |
|---|---|---|
| payin.succeeded | The customer paid before the expiration of the URL | Fulfill the goods or services that the customer purchased |
| payment_attempt.failed | The customer did not pay, and the URL expired | Allow the customer to generate a new URL or complete the payment via another payment method |
Test the Integration
Simulating success
- Click on the redirect URL.
- Select dummy
bankon the redirect page - A dummy
usernameandpasswordare already prefilled. - Click on
Simulate SuccessCTA on the redirect_url. You will receive apayin.succeededevent.
Simulating Failure / Expiry
Click onSimulate Failure CTA on the redirect_url. You will receive a payin.failed event.
