With this API, you can create a debit authorization (mandate) and use this authorization to debit a given amount from the customer bank account.
Before using this API, you must create a merchant account here.
Then, create a API Key at the merchant backoffice. Go to the “O Meu Negócio” → “Chaves de API” submenu in the sidebar. This API key needs special permissions to create SEPA DD mandates and payments.
After creating this account and the API key, send the acccount e-mail to the Altice Pay team to be configured.
To be able to create SEPA DD mandates and payments, you must provide an “Authorization” header. You can get more details in the Authentication section.
Check description and examples below for each service. These examples use the sandbox environment endpoint.
Production endpoint: https://services.wallet.pt
This service creates a debit authorization (mandate). The bank account to be debited is defined in the “debtor_dd_info” object. You can pass a request_id to track this request. Check the Idempotency page.
Request | POST /api/v2/sepa/mandate |
---|---|
Query params | none |
Data params | Mandate |
Returns | Mandate |
This service returns mandate information given a mandate id.
Request | GET /api/v2/sepa/mandate/:id |
---|---|
Query params | id |
Data params | none |
Returns | Mandate |
This service creates a SEPA DD payment. You must indicate the “mandate_id” which you have created before. You can pass a request_id to track this request. Check the Idempotency page.
Request | POST /api/v2/payment |
---|---|
Query params | none |
Data params | Operation |
Returns | Operation |
The payment status remains PENDING until the bank sends the result. A callback will be sent with the status change.
This service deletes a mandate. You can’t delete mandates with pending payments.
Request | DELETE /api/v2/sepa/mandate/:id |
---|---|
Query params | id |
Data params | none |
Returns | Mandate |
Field | Type | In/Out | Mandatory | Description | |
---|---|---|---|---|---|
signature_date | date | IO | Y | Contract signature date (“now” OR transaction date in ISO 8601 YYYY-MM-DDThh:mm:ssTZD format) | |
contract_number | string | I | Y | Provider → Customer contract identifier | |
debtor_dd_info | DebtorDDInfo | I | Y | Debtor info mandatory to process SEPA DD transaction | |
mandate_id | string | O | N | Mandate ID | |
status | string | O | N | Mandate status | |
request_id | string | IO | N | UUID used to track the request |
Mandates can have these statuses:
Status | Description |
---|---|
CREATED | Mandate creation was successful in Wallet’s scope. At this point Creditor Bank still has no information about mandate creation. |
PENDING | First DD payment using previously created mandate was sent to Sponsor Bank |
ACTIVE | First DD payment using previously created mandate was successful |
DELETED | Mandate has been revoked, or it has been determined that it cannot be used to perform further payments |
Field | Type | In/Out | Mandatory | Description | |
---|---|---|---|---|---|
name | string | I | Y | Debtor name | |
bic | string | I | Y | Debtor BIC Code or “NOTPROVIDED” | |
iban | string | I | Y | Debtor IBAN | |
ultimate_debtor_name | string | I | N | NOTE: Ultimate debtor name field is mandatory if invoices are being paid by an individual other than the recipient of the service. For SEPA the Debtor is the owner of the bank account from where the funds will be withdrawn to pay the invoice and the Ultimate Debtor is the owner of the contract which the invoice refers to. |
This table describes the specific and mandatory fields for the SEPA DD payment API. For a full description of the optional fields, check the Structures documentation.
Field | Type | In/Out | Mandatory | Description |
---|---|---|---|---|
mandate_id | string | IO | Y | mandate_id returned by the create mandate service |
amount | float | IO | Y | payment amount |
date | date | I | N | charge date in ISO 8601 YYYY-MM-DDThh:mm:ssTZD format |
collection_date | date | O | Y | charge date in ISO 8601 YYYY-MM-DDThh:mm:ssTZD format, adjusted to the next business day of the “date” field above. If “date” is omitted, the next business day of the request date will be returned. |
method | string | IO | Y | payment method - SEPA |