Create and manage one-time payment transactions
Easypay Payments API (2.0)
The cursor parameter is used for pagination. It specifies the pointer to the start of the next set of results in a sequence of paginated data. Typically, this is a unique identifier of the last item from the previous response. If not provided, the API fetches the first page of results.
The limit parameter is used for pagination. It specifies the maximum number of entries to return in a single page of results. Max 100.
Filter records by creation datetime interval in UTC. Maximum allowed range is 30 days. Format: interval(YYYY-MM-DD HH:MM,YYYY-MM-DD HH:MM).
- Sandboxhttps://api.test.easypay.pt/2.0/refund
- Productionhttps://api.prod.easypay.pt/2.0/refund
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://api.test.easypay.pt/2.0/refund?cursor=string&limit=0&created_at=interval%282006-01-02+15%3A04%2C2006-01-02+15%3A04%29&updated_at=interval%282006-01-02+15%3A04%2C2006-01-02+15%3A04%29' \
-H 'AccountId: 2b0f63e2-9fb5-4e52-aca0-b4bf0339bbe6' \
-H 'ApiKey: eae4aa59-8e5b-4ec2-887d-b02768481a92'{ "metadata": { "next_cursor": "string", "count": 5 }, "data": [ { … } ] }
Request
Each method has a specific time window during which a refund can be issued. Once this period expires, refunds can no longer be processed via the API for that payment.
| Payment Method | Maximum Refund Time |
|---|---|
| MBWay | 12 months |
| Visa & Mastercard | 12 months |
| Apple Pay | 12 months |
| Google Pay | 12 months |
| Samsung Pay | 12 months |
| MB SPG references | 120 days |
| Other MB references | No limit |
| Direct Debit | 180 days |
Request body for creating a refund
- Sandboxhttps://api.test.easypay.pt/2.0/refund/{id}
- Productionhttps://api.prod.easypay.pt/2.0/refund/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://api.test.easypay.pt/2.0/refund/{id}' \
-H 'AccountId: 2b0f63e2-9fb5-4e52-aca0-b4bf0339bbe6' \
-H 'ApiKey: eae4aa59-8e5b-4ec2-887d-b02768481a92' \
-H 'Content-Type: application/json' \
-d '{
"transaction_key": "string",
"iban": "string",
"email": "string",
"phone": "string",
"account_holder": "string",
"value": 0.01,
"revert": {
"mode": "partial",
"splits": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}
]
}
}'Created
A unique identifier for the resource. While typically formatted as a UUID (Universally Unique Identifier), it can also be in other formats as defined by the user. This field ensures the resource can be distinctly recognized and referenced.
{ "status": "ok", "message": "Your request was successfully created", "id": "25997c28-1902-4f6d-842e-c6050e7d5421" }
- Sandboxhttps://api.test.easypay.pt/2.0/refund/{id}
- Productionhttps://api.prod.easypay.pt/2.0/refund/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://api.test.easypay.pt/2.0/refund/{id}' \
-H 'AccountId: 2b0f63e2-9fb5-4e52-aca0-b4bf0339bbe6' \
-H 'ApiKey: eae4aa59-8e5b-4ec2-887d-b02768481a92'OK
A unique identifier for the resource. While typically formatted as a UUID (Universally Unique Identifier), it can also be in other formats as defined by the user. This field ensures the resource can be distinctly recognized and referenced.
Indicates the current status of the refund. Possible values include:
- waiting: The payment instruction has been given, but the chosen payment method requires confirmation from an external entity before the status of the operation is finalized.
- pending: This is the initial state, and it means that the refund is queued.
- success: The refund has been completed successfully.
- failed: The refund could not be completed due to an error or issue.
This field provides a clear indication of the current state of the refund, helping users understand its progress and outcome.
The monetary amount requested for the transaction. This field is formatted as a double, and will be rounded to two decimal places (e.g., "100.00").
The email address of the account holder. This field is used for communication purposes, including sending notifications about the refund stat.
The contact phone number of the account holder, including the country code indicator (e.g., "+351"). This field is used for communication purposes, such as contacting the account holder for verification
The International Bank Account Number of the account to which the refund will be sent. This field is used to uniquely identify the recipient's bank account across international borders.
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "status": "success", "transaction_key": "string", "value": 15.98, "account_holder": "string", "email": "customer@example.pt", "phone": "+351912345678", "iban": "PT50007950088428437201551", "capture": { "transaction_key": "string", "capture_date": "2019-08-24T14:15:22Z", "account": { … }, "status": "delayed", "payment_type": "string", "payment_id": "d43b87f9-9e28-4802-8eaa-6ee91a40ea71", "id": "string", "descriptive": "string", "value": 10.86, "force_3ds": false } }