Response Format Authentication Single Payment Frequent Payment Subscription Payment Payment Generic Operations Notification Reports Out Payment Config Road Map Easypay API (2.0) Download OpenAPI specification:Download Easypay Documentation: tec@easypay.pt URL: # Terms conditions and legal terms Privacy Policy EasyPay API allows you to query payment meta-data, receive payment notifications and generate payment references. Since EasyPay API is based on REST principles, it´s very easy to write and test applications. You can use our code examples in PHP/CURL to test all the JSON payloads for Easypay Payment Service API. We have two distinct environments on our API Services: - If you are looking to receive payments, please use the Production Documentation. - If you are looking to test or integrate, please use the Sandbox Documentation. This environment will always have the latest road map deployments, usually all deployments are sent to production within 10 days. This environment is not meant for Load Tests, please do not use for this purpose, you might be blocked. Response Format Our default response produces a application/json, but the Accept request-header field can be used to specify certain media types which are acceptable for the response. Our available options are: application/json, application/xml, text/csv Authentication The Easypay API use API keys to authenticate requests. The keys should be included as Headers. if fails it will always respond 403. accountId This is the identification for the Easypay Client Account Security Scheme Type API Key Header parameter name: AccountId apiKey This is the counter key for the used Account Id Security Scheme Type API Key Header parameter name: ApiKey Single Payment Payments used on a one time purchase Lists single payments Full report with all the single payments from your Account Id AUTHORIZATIONS: accountIdapiKey QUERY PARAMETERS page number Example: page=2 Page Number records_per_page number Default: "20" Example: records_per_page=2 Limit records per page (Max: 100) type string Example: type=sale Filter by type expiration_time string Example: expiration_time=interval(2019-07-01 00:00,2019-07-01 23:59) Filter by expiration time interval (max 30 days) method string Example: method=cc Filter by method customer string Example: customer=Key Example Filter by customer key id string Example: id=b100175d-e347-4501-8388-5d4b00b8551b Filter by id key string Example: key=Single Key Example Filter by single key value number <double> Example: value=17.5 Filter by value created_at string Example: created_at=interval(2019-07-01 00:00,2019-07-01 23:59) Filter by created datetime interval (max 30 days) Responses 200 Success 403 Forbidden 429 Too Many Requests 500 Internal Error GET /single Response samples 200 Content type application/json Copy Expand all Collapse all { "data": [ { } ], "meta": { "page": { }, "records": { }, "links": { } } } Create single payment AUTHORIZATIONS: accountIdapiKey REQUEST BODY SCHEMA: application/json Payment configuration object to generate a payment type string Default: "sale" Enum: "sale" "authorisation" Optional - only applicable to method cc or mbw expiration_time string <Y-m-d H:i> Optional currency string Default: "EUR" Enum: "EUR" "BRL" customer object (schemas) key string <= 50 characters Merchant identification key value required number <double> >= 0.5 Value will be rounded to 2 decimals method required string (Payment_Single_Method_Available) Enum: "mb" "cc" "mbw" "dd" "bb" "vi" sdd_mandate object (schemas) Only required if 'method' is 'dd' capture object Only required if 'type' is 'sale' Responses 201 Success 400 Bad Request 403 Forbidden 429 Too Many Requests 500 Internal Error POST /single Request samples PayloadPHPCURL Content type application/json Copy Expand all Collapse all { "type": "sale", "expiration_time": "2017-12-12 16:05", "currency": "EUR", "customer": { "id": "22ea3cc9-424b-489a-91b7-8955f643dc93", "name": "Customer Example", "email": "customer@example.com", "phone": "911234567", "phone_indicative": "+351", "fiscal_number": "PT123456789", "key": "Key Example", "language": "PT" }, "key": "Example Key", "value": 17.5, "method": "mb", "sdd_mandate": { "id": "12345678901", "iban": "PT50002700000001234567833", "key": "Key Example", "name": "Name Example", "email": "customer@example.com", "phone": "911234567", "account_holder": "Acount Name Example", "country_code": "PT", "max_num_debits": "12" }, "capture": { "transaction_key": "string", "capture_date": "string", "account": { }, "splits": [ ], "descriptive": "Descriptive Example" } } Response samples 201 Content type application/json Copy Expand all Collapse all { "status": "ok", "message": [ "Your request was successfully created" ], "capture": { "id": "90400a93-cf7a-40aa-9151-7bd853ad8db4", "splits": [ ] }, "id": "4c67e74b-a256-4e0a-965d-97bf5d01bd50", "method": { "type": "mb", "sdd_mandate": { }, "entity": "10611", "reference": "987654321", "url": "https://www.easypay.pt/_s/c11.php?e=10611&r=987654321&v=19&t_key=example+key&c=EN&l=EN", "last_four": "1234", "card_type": "VISA", "expiration_date": "01/22", "iban": "PT50000000000000000000000", "status": "pending", "alias": "626E6AA2224D017917D839D4D39296B49441A1D10DA7E8DB6E7E1A4356DDE75429531BEB32190C6D736FA12C7A116CA5F3FCAEE72570406F51371A0CB6E14B6B" }, "customer": { "id": "4c67e74b-a256-4e0a-965d-97bf5d01bd50" } } Deletes single payment This delete operation is not applicable for MB and BB method. All CC and MBW authorisations will be deleted, releasing the funds. All MBW operations waiting for user interaction will be cancelled. Before 6pm all Sepa Direct Debits waiting for file processing will be cancelled. AUTHORIZATIONS: accountIdapiKey Responses 204 No content 400 Bad Request 401 Unauthorized 403 Forbidden 404 Resource Not Found 429 Too Many Requests 500 Internal Error DELETE /single/{id} Shows single payment details AUTHORIZATIONS: accountIdapiKey Responses 200 Success 401 Unauthorized 403 Forbidden 404 Resource Not Found 429 Too Many Requests 500 Internal Error GET /single/{id} Response samples 200 Content type application/json Copy Expand all Collapse all { "transactions": [ { } ], "id": "4c67e74b-a256-4e0a-965d-97bf5d01bd50", "expiration_time": "2017-12-12 16:05", "currency": "EUR", "customer": { "id": "22ea3cc9-424b-489a-91b7-8955f643dc93", "name": "Customer Example", "email": "customer@example.com", "phone": "911234567", "phone_indicative": "+351", "fiscal_number": "PT123456789", "key": "Key Example", "language": "PT" }, "key": "Example Key", "value": 17.5, "type": "sale", "method": { "type": "mb", "sdd_mandate": { }, "entity": "10611", "reference": "987654321", "url": "https://www.easypay.pt/_s/c11.php?e=10611&r=987654321&v=19&t_key=example+key&c=EN&l=EN", "last_four": "1234", "card_type": "VISA", "expiration_date": "01/22", "iban": "PT50000000000000000000000", "status": "pending", "alias": "626E6AA2224D017917D839D4D39296B49441A1D10DA7E8DB6E7E1A4356DDE75429531BEB32190C6D736FA12C7A116CA5F3FCAEE72570406F51371A0CB6E14B6B" }, "payment_status": "paid", "paid_at": "2017-12-12 16:05:02", "created_at": "2017-12-12 16:05:02" } Updates single payment details AUTHORIZATIONS: accountIdapiKey REQUEST BODY SCHEMA: application/json Single Payment object to edit existing one expiration_time string <Y-m-d H:i> Optional currency string Default: "EUR" Enum: "EUR" "BRL" customer object (schemas) key string <= 50 characters Merchant identification key value required number <double> >= 0.5 Value will be rounded to 2 decimals type string Default: "sale" Enum: "sale" "authorisation" Optional - only applicable to method cc or mbw method required string (Payment_Single_Method_Available) Enum: "mb" "cc" "mbw" "dd" "bb" "vi" account object sdd_mandate object (schemas) Only required if 'method' is 'dd' Responses 200 Success 304 Not Modified 400 Bad Request 401 Unauthorized 403 Forbidden 404 Resource Not Found 429 Too Many Requests 500 Internal Error PATCH /single/{id} Request samples Payload Content type application/json Copy Expand all Collapse all { "expiration_time": "2017-12-12 16:05", "currency": "EUR", "customer": { "id": "22ea3cc9-424b-489a-91b7-8955f643dc93", "name": "Customer Example", "email": "customer@example.com", "phone": "911234567", "phone_indicative": "+351", "fiscal_number": "PT123456789", "key": "Key Example", "language": "PT" }, "key": "Example Key", "value": 17.5, "type": "sale", "method": "mb", "account": { "id": "4c67e74b-a256-4e0a-965d-97bf5d01bd50" }, "sdd_mandate": { "id": "12345678901", "iban": "PT50002700000001234567833", "key": "Key Example", "name": "Name Example", "email": "customer@example.com", "phone": "911234567", "account_holder": "Acount Name Example", "country_code": "PT", "max_num_debits": "12" } } Response samples 200 Content type application/json Copy Expand all Collapse all { "status": "ok", "message": [ "Your request was successfully created" ], "id": "4c67e74b-a256-4e0a-965d-97bf5d01bd50", "expiration_time": "2017-12-12 16:05", "currency": "EUR", "customer": { "id": "22ea3cc9-424b-489a-91b7-8955f643dc93", "name": "Customer Example", "email": "customer@example.com", "phone": "911234567", "phone_indicative": "+351", "fiscal_number": "PT123456789", "key": "Key Example", "language": "PT" }, "key": "Example Key", "value": 17.5, "type": "sale", "method": { "type": "mb", "sdd_mandate": { }, "entity": "10611", "reference": "987654321", "url": "https://www.easypay.pt/_s/c11.php?e=10611&r=987654321&v=19&t_key=example+key&c=EN&l=EN", "last_four": "1234", "card_type": "VISA", "expiration_date": "01/22", "iban": "PT50000000000000000000000", "status": "pending", "alias": "626E6AA2224D017917D839D4D39296B49441A1D10DA7E8DB6E7E1A4356DDE75429531BEB32190C6D736FA12C7A116CA5F3FCAEE72570406F51371A0CB6E14B6B" }, "payment_status": "paid", "paid_at": "2017-12-12 16:05:02", "created_at": "2017-12-12 16:05:02" } Frequent Payment Payments used on frequent services with amounts and periodicity changes Multibanco Reference After one Frequent MB request our system will return an entity and a reference in the JSON response. The customer can always pay between the min and max values several times before the expiration date or when the method Deletes Frequent is called with success. If the parameter unlimited_payments is active transactions will be unlimited, entity and reference is reseted on our provider 3 times a day, otherwise the total value of payments can’t exceed the max defined. For each payment made with this entity and reference, our system sends a Generic Notification with the Frequent ID. Lists frequent payments Full report with all the frequent payments from your Account Id AUTHORIZATIONS: accountIdapiKey QUERY PARAMETERS page number Example: page=2 Page Number records_per_page number Default: "20" Example: records_per_page=2 Limit records per page (Max: 100) expiration_time string Example: expiration_time=interval(2019-07-01 00:00,2019-07-01 23:59) Filter by expiration time interval (max 30 days) method string Example: method=cc Filter by method customer string Example: customer=Key Example Filter by customer key id string Example: id=b100175d-e347-4501-8388-5d4b00b8551b Filter by id key string Example: key=Frequent Key Example Filter by frequent key created_at string Example: created_at=interval(2019-07-01 00:00,2019-07-01 23:59) Filter by created datetime interval (max 30 days) Responses 200 Success 403 Forbidden 429 Too Many Requests 500 Internal Error GET /frequent Response samples 200 Content type application/json Copy Expand all Collapse all { "data": [ { } ], "meta": { "page": { }, "records": { }, "links": { } } } Create frequent payment AUTHORIZATIONS: accountIdapiKey REQUEST BODY SCHEMA: application/json Payment configuration object to generate a payment expiration_time string <Y-m-d H:i> Optional currency string Default: "EUR" Enum: "EUR" "BRL" customer object (schemas) key string <= 50 characters Merchant identification key max_value number <double> >= 0 Value will be rounded to 2 decimals min_value number <double> >= 0 Value will be rounded to 2 decimals unlimited_payments boolean Default: true Transactions will be unlimited, max or min value will be refreshed on each payment method required string (Payment_Frequent_Method_Available) Enum: "mb" "cc" "dd" "mbw" sdd_mandate object (schemas) Only required if 'method' is 'dd' Responses 201 Success 400 Bad Request 403 Forbidden 429 Too Many Requests 500 Internal Error POST /frequent Request samples PayloadPHPCURL Content type application/json Copy Expand all Collapse all { "expiration_time": "2017-12-12 16:05", "currency": "EUR", "customer": { "id": "22ea3cc9-424b-489a-91b7-8955f643dc93", "name": "Customer Example", "email": "customer@example.com", "phone": "911234567", "phone_indicative": "+351", "fiscal_number": "PT123456789", "key": "Key Example", "language": "PT" }, "key": "Example Key", "max_value": 20, "min_value": 2, "unlimited_payments": false, "method": "mb", "sdd_mandate": { "id": "12345678901", "iban": "PT50002700000001234567833", "key": "Key Example", "name": "Name Example", "email": "customer@example.com", "phone": "911234567", "account_holder": "Acount Name Example", "country_code": "PT", "max_num_debits": "12" } } Response samples 201 Content type application/json Copy Expand all Collapse all { "status": "ok", "message": [ "Your request was successfully created" ], "id": "4c67e74b-a256-4e0a-965d-97bf5d01bd50", "method": { "type": "mb", "sdd_mandate": { }, "entity": "10611", "reference": "987654321", "url": "https://www.easypay.pt/_s/c11.php?e=10611&r=987654321&v=19&t_key=example+key&c=EN&l=EN", "last_four": "1234", "card_type": "VISA", "expiration_date": "01/22", "iban": "PT50000000000000000000000", "status": "pending", "alias": "626E6AA2224D017917D839D4D39296B49441A1D10DA7E8DB6E7E1A4356DDE75429531BEB32190C6D736FA12C7A116CA5F3FCAEE72570406F51371A0CB6E14B6B" }, "customer": { "id": "4c67e74b-a256-4e0a-965d-97bf5d01bd50" } } Deletes frequent payment 3 times a day (10am, 3pm and 10pm) our system will attempt to close your deleted MB payments. All CC and MBW authorisations will be deleted, releasing the funds. All MBW operations waiting for user interaction will be cancelled. Before 6pm all Sepa Direct Debits waiting for file processing will be cancelled. AUTHORIZATIONS: accountIdapiKey Responses 204 No content 400 Bad Request 401 Unauthorized 403 Forbidden 404 Resource Not Found 429 Too Many Requests 500 Internal Error DELETE /frequent/{id} Shows frequent payment details AUTHORIZATIONS: accountIdapiKey Responses 200 Success 401 Unauthorized 403 Forbidden 404 Resource Not Found 429 Too Many Requests 500 Internal Error GET /frequent/{id} Response samples 200 Content type application/json Copy Expand all Collapse all { "authorisations": [ { } ], "transations": [ { } ], "id": "4c67e74b-a256-4e0a-965d-97bf5d01bd50", "created_at": "2017-12-12 16:05:02", "expiration_time": "2017-12-12 16:05", "currency": "EUR", "customer": { "id": "22ea3cc9-424b-489a-91b7-8955f643dc93", "name": "Customer Example", "email": "customer@example.com", "phone": "911234567", "phone_indicative": "+351", "fiscal_number": "PT123456789", "key": "Key Example", "language": "PT" }, "key": "Example Key", "max_value": 20, "min_value": 2, "unlimited_payments": false, "method": { "type": "mb", "sdd_mandate": { }, "entity": "10611", "reference": "987654321", "url": "https://www.easypay.pt/_s/c11.php?e=10611&r=987654321&v=19&t_key=example+key&c=EN&l=EN", "last_four": "1234", "card_type": "VISA", "expiration_date": "01/22", "iban": "PT50000000000000000000000", "status": "pending", "alias": "626E6AA2224D017917D839D4D39296B49441A1D10DA7E8DB6E7E1A4356DDE75429531BEB32190C6D736FA12C7A116CA5F3FCAEE72570406F51371A0CB6E14B6B" } } Updates frequent payment details AUTHORIZATIONS: accountIdapiKey REQUEST BODY SCHEMA: application/json Frequent Payment object to edit existing one status string Enum: "active" "deleted" Only available to change between active and deleted expiration_time string <Y-m-d H:i> Optional currency string Default: "EUR" Enum: "EUR" "BRL" customer object (schemas) key string <= 50 characters Merchant identification key max_value number <double> >= 0 Value will be rounded to 2 decimals min_value number <double> >= 0 Value will be rounded to 2 decimals unlimited_payments boolean Default: true Transactions will be unlimited, max or min value will be refreshed on each payment sdd_mandate object (schemas) Only required if 'method' is 'dd' Responses 200 Success 304 Not Modified 400 Bad Request 401 Unauthorized 403 Forbidden 404 Resource Not Found 429 Too Many Requests 500 Internal Error PATCH /frequent/{id} Request samples Payload Content type application/json Copy Expand all Collapse all { "status": "active", "expiration_time": "2017-12-12 16:05", "currency": "EUR", "customer": { "id": "22ea3cc9-424b-489a-91b7-8955f643dc93", "name": "Customer Example", "email": "customer@example.com", "phone": "911234567", "phone_indicative": "+351", "fiscal_number": "PT123456789", "key": "Key Example", "language": "PT" }, "key": "Example Key", "max_value": 20, "min_value": 2, "unlimited_payments": false, "sdd_mandate": { "id": "12345678901", "iban": "PT50002700000001234567833", "key": "Key Example", "name": "Name Example", "email": "customer@example.com", "phone": "911234567", "account_holder": "Acount Name Example", "country_code": "PT", "max_num_debits": "12" } } Response samples 200 Content type application/json Copy Expand all Collapse all { "status": "ok", "message": [ "Your request was successfully created" ], "id": "4c67e74b-a256-4e0a-965d-97bf5d01bd50", "method": { "type": "mb", "sdd_mandate": { }, "entity": "10611", "reference": "987654321", "url": "https://www.easypay.pt/_s/c11.php?e=10611&r=987654321&v=19&t_key=example+key&c=EN&l=EN", "last_four": "1234", "card_type": "VISA", "expiration_date": "01/22", "iban": "PT50000000000000000000000", "status": "pending", "alias": "626E6AA2224D017917D839D4D39296B49441A1D10DA7E8DB6E7E1A4356DDE75429531BEB32190C6D736FA12C7A116CA5F3FCAEE72570406F51371A0CB6E14B6B" }, "customer": { "id": "4c67e74b-a256-4e0a-965d-97bf5d01bd50" } } Request Authorisation AUTHORIZATIONS: accountIdapiKey REQUEST BODY SCHEMA: application/json Payment configuration object to generate a payment mbway_sdk object transaction_key string <= 255 characters Your internal key identifying this authorisation force_3ds boolean Default: false Whether or not you want to force the 3DS authentication descriptive required string <= 255 characters This will appear in the bank statement/mbway application value required number <double> >= 0.5 Value will be rounded to 2 decimals Responses 201 Success 400 Bad Request 403 Forbidden 412 Precondition Failed 429 Too Many Requests 500 Internal Error POST /frequent/authorisation/{id} Request samples PayloadPHPCURL Content type application/json Copy Expand all Collapse all { "mbway_sdk": { "purchase_token": "626E6AA2224D017917D839D4D39296B49441A1D10DA7E8DB6E7E1A4356DDE75429531BEB32190C6D736FA12C7A116CA5F3FCAEE72570406F51371A0CB6E14B6B", "initial_timestamp": "2018-01-01 23:59:59", "merchant_operation_id": "TESTACCOUNT5436", "payload": "{'purchase_token':'EDEB342D3588DDDEEE3E070476E72A6B222E3456C1C825D3E89A734005CE81F69986045424984F55B3233CBFD090A8A564071BBB493F34C4849C964','initial_timestamp':'2018-09-20T10:46:08+01:00','merchant_operation_id':'TESTACCOUNT5436','payload':{'amount':1000,'currencyCode':'9782'}}" }, "transaction_key": "string", "force_3ds": false, "descriptive": "Descriptive Example", "value": 17.5 } Response samples 201 Content type application/json Copy Expand all Collapse all { "method": { "type": "CC", "url": "https://cc.easypay.pt/3ds/v2.0/7018c8ce-1d79-4c47-97e1-1bbe8d6cceee" }, "status": "ok", "message": [ "Your request was successfully created" ], "id": "4c67e74b-a256-4e0a-965d-97bf5d01bd50" } Subscription Payment List subscription payments Full report with all the subscriptions payments from your Account Id AUTHORIZATIONS: accountIdapiKey QUERY PARAMETERS page number Example: page=2 Page Number records_per_page number Default: "20" Example: records_per_page=2 Limit records per page (Max: 100) expiration_time string Example: expiration_time=interval(2019-07-01 00:00,2019-07-01 23:59) Filter by expiration time interval (max 30 days) method string Example: method=cc Filter by method customer string Example: customer=Key Example Filter by customer key id string Example: id=b100175d-e347-4501-8388-5d4b00b8551b Filter by id key string Example: key=Subscription Key Example Filter by subscription key created_at string Example: created_at=interval(2019-07-01 00:00,2019-07-01 23:59) Filter by created datetime interval (max 30 days) Responses 200 Success 403 Forbidden 429 Too Many Requests 500 Internal Error GET /subscription Response samples 200 Content type application/json Copy Expand all Collapse all { "data": [ { } ], "meta": { "page": { }, "records": { }, "links": { } } } Create subscription payment AUTHORIZATIONS: accountIdapiKey REQUEST BODY SCHEMA: application/json Payment configuration object to generate a payment frequent_id string Only required to create a subscription from active Frequent Payment capture required object Default setup for all captures expiration_time string <Y-m-d H:i> Optional currency string Default: "EUR" Enum: "EUR" "BRL" customer object (schemas) key string <= 50 characters Merchant identification key value required number <double> >= 0.5 Value will be rounded to 2 decimals frequency required string Enum: "1D" "1W" "2W" "1M" "2M" "3M" "4M" "6M" "1Y" "2Y" "3Y" max_captures number Required only when no expiration_time is set start_time required string <Y-m-d H:i> Date to start the billing cycles failover boolean Default: false After all retries failed, the payment cycle can have another try with another Single Method capture_now boolean Default: false This option will force schedule a immediate capture and schedule next one for start_time retries number Default: 0 Number of retries on every payment cycle, the chosen frequency will define the max number of possible retries method required string (Payment_Subscription_Method_Available) Enum: "cc" "dd" sdd_mandate object (schemas) Only required if 'method' is 'dd' Responses 201 Success 400 Bad Request 403 Forbidden 429 Too Many Requests 500 Internal Error POST /subscription Request samples Payload Content type application/json Copy Expand all Collapse all { "frequent_id": "4c67e74b-a256-4e0a-965d-97bf5d01bd50", "capture": { "transaction_key": "string", "account": { }, "descriptive": "Descriptive Example" }, "expiration_time": "2017-12-12 16:05", "currency": "EUR", "customer": { "id": "22ea3cc9-424b-489a-91b7-8955f643dc93", "name": "Customer Example", "email": "customer@example.com", "phone": "911234567", "phone_indicative": "+351", "fiscal_number": "PT123456789", "key": "Key Example", "language": "PT" }, "key": "Example Key", "value": 17.5, "frequency": "1D", "max_captures": 10, "start_time": "2017-12-12 16:05", "failover": true, "capture_now": true, "retries": 2, "method": "cc", "sdd_mandate": { "id": "12345678901", "iban": "PT50002700000001234567833", "key": "Key Example", "name": "Name Example", "email": "customer@example.com", "phone": "911234567", "account_holder": "Acount Name Example", "country_code": "PT", "max_num_debits": "12" } } Response samples 201 Content type application/json Copy Expand all Collapse all { "status": "ok", "message": [ "Your request was successfully created" ], "id": "4c67e74b-a256-4e0a-965d-97bf5d01bd50", "method": { "type": "cc", "sdd_mandate": { }, "entity": "10611", "reference": "987654321", "url": "https://www.easypay.pt/_s/c11.php?e=10611&r=987654321&v=19&t_key=example+key&c=EN&l=EN", "last_four": "1234", "card_type": "VISA", "expiration_date": "01/22", "iban": "PT50000000000000000000000", "status": "pending" }, "customer": { "id": "4c67e74b-a256-4e0a-965d-97bf5d01bd50" } } Deletes subscription payment AUTHORIZATIONS: accountIdapiKey Responses 204 No content 400 Bad Request 401 Unauthorized 403 Forbidden 404 Resource Not Found 429 Too Many Requests 500 Internal Error DELETE /subscription/{id} Shows subscription payment details AUTHORIZATIONS: accountIdapiKey Responses 200 Success 401 Unauthorized 403 Forbidden 404 Resource Not Found 429 Too Many Requests 500 Internal Error GET /subscription/{id} Response samples 200 Content type application/json Copy Expand all Collapse all { "transactions": [ { } ], "id": "4c67e74b-a256-4e0a-965d-97bf5d01bd50", "expiration_time": "2017-12-12 16:05", "currency": "EUR", "customer": { "id": "22ea3cc9-424b-489a-91b7-8955f643dc93", "name": "Customer Example", "email": "customer@example.com", "phone": "911234567", "phone_indicative": "+351", "fiscal_number": "PT123456789", "key": "Key Example", "language": "PT" }, "key": "Example Key", "value": 17.5, "frequency": "1D", "max_captures": 10, "start_time": "2017-12-12 16:05", "failover": true, "capture_now": true, "retries": 2, "method": { "type": "cc", "sdd_mandate": { }, "entity": "10611", "reference": "987654321", "url": "https://www.easypay.pt/_s/c11.php?e=10611&r=987654321&v=19&t_key=example+key&c=EN&l=EN", "last_four": "1234", "card_type": "VISA", "expiration_date": "01/22", "iban": "PT50000000000000000000000", "status": "pending" }, "created_at": "2017-12-12 16:05:02" } Updates subscription payment details AUTHORIZATIONS: accountIdapiKey REQUEST BODY SCHEMA: application/json Subscription Payment object to edit existing one status string Enum: "active" "inactive" Only available to change between active and inactive expiration_time string <Y-m-d H:i> Optional currency string Default: "EUR" Enum: "EUR" "BRL" customer object (schemas) key string <= 50 characters Merchant identification key value number <double> >= 0.5 Value will be rounded to 2 decimals max_captures number Required only when no expiration_time is set failover boolean Default: false After all retries failed, the payment cycle can have another try with another Single Method retries number Default: 0 Number of retries on every payment cycle, the chosen frequency will define the max number of possible retries method string (Payment_Subscription_Method_Available) Enum: "cc" "dd" sdd_mandate object (schemas) Only required if 'method' is 'dd' Responses 200 Success 304 Not Modified 400 Bad Request 401 Unauthorized 403 Forbidden 404 Resource Not Found 429 Too Many Requests 500 Internal Error PATCH /subscription/{id} Request samples Payload Content type application/json Copy Expand all Collapse all { "status": "inactive", "expiration_time": "2017-12-12 16:05", "currency": "EUR", "customer": { "id": "22ea3cc9-424b-489a-91b7-8955f643dc93", "name": "Customer Example", "email": "customer@example.com", "phone": "911234567", "phone_indicative": "+351", "fiscal_number": "PT123456789", "key": "Key Example", "language": "PT" }, "key": "Example Key", "value": 17.5, "max_captures": 10, "failover": true, "retries": 2, "method": "cc", "sdd_mandate": { "id": "12345678901", "iban": "PT50002700000001234567833", "key": "Key Example", "name": "Name Example", "email": "customer@example.com", "phone": "911234567", "account_holder": "Acount Name Example", "country_code": "PT", "max_num_debits": "12" } } Response samples 200 Content type application/json Copy Expand all Collapse all { "status": "ok", "message": [ "Your request was successfully created" ], "id": "4c67e74b-a256-4e0a-965d-97bf5d01bd50", "expiration_time": "2017-12-12 16:05", "currency": "EUR", "customer": { "id": "22ea3cc9-424b-489a-91b7-8955f643dc93", "name": "Customer Example", "email": "customer@example.com", "phone": "911234567", "phone_indicative": "+351", "fiscal_number": "PT123456789", "key": "Key Example", "language": "PT" }, "key": "Example Key", "value": 17.5, "frequency": "1D", "max_captures": 10, "start_time": "2017-12-12 16:05", "failover": true, "capture_now": true, "retries": 2, "method": { "type": "cc", "sdd_mandate": { }, "entity": "10611", "reference": "987654321", "url": "https://www.easypay.pt/_s/c11.php?e=10611&r=987654321&v=19&t_key=example+key&c=EN&l=EN", "last_four": "1234", "card_type": "VISA", "expiration_date": "01/22", "iban": "PT50000000000000000000000", "status": "pending" }, "created_at": "2017-12-12 16:05:02" } Payment Generic Operations These operations can be used on all our payment types: single, frequent and subscription Shows capture details AUTHORIZATIONS: accountIdapiKey Responses 200 Success 401 Unauthorized 403 Forbidden 404 Resource Not Found 429 Too Many Requests 500 Internal Error GET /capture/{id} Response samples 200 Content type application/json Copy Expand all Collapse all { "transaction_key": "string", "capture_date": "string", "account": { "id": "22ea3cc9-424b-489a-91b7-8955f643dc93" }, "status": "success", "splits": [ { } ], "payment_type": "single", "payment_id": "bfd3518d-fe73-4fb8-b8e6-0ce38cd3ced8", "id": "4c67e74b-a256-4e0a-965d-97bf5d01bd50", "descriptive": "Descriptive Example", "value": 17.5 } Captures a Single Auth, Frequent and Frequent Auth AUTHORIZATIONS: accountIdapiKey REQUEST BODY SCHEMA: application/json Payment configuration object to generate a payment transaction_key string <= 50 characters Your internal key identifying this capture capture_date string <Y-m-d> account object Optional - only applicable to multi-account clients splits Array of objects (Splits_Details) Optional: only used for split payments mbway_sdk object force_3ds boolean Default: false Whether or not you want to force the 3DS authentication on Credit Cards (used only on Frequent capture without authorisation) descriptive required string <= 255 characters This will appear in the bank statement/mbway application value required number <double> >= 0.5 Value will be rounded to 2 decimals Responses 201 Success 400 Bad Request 403 Forbidden 412 Precondition Failed 422 Unprocessable Entity 428 Precondition Required 429 Too Many Requests 500 Internal Error POST /capture/{id} Request samples PayloadPHPCURL Content type application/json Copy Expand all Collapse all { "transaction_key": "string", "capture_date": "2017-11-11", "account": { "id": "22ea3cc9-424b-489a-91b7-8955f643dc93" }, "splits": [ { } ], "mbway_sdk": { "purchase_token": "626E6AA2224D017917D839D4D39296B49441A1D10DA7E8DB6E7E1A4356DDE75429531BEB32190C6D736FA12C7A116CA5F3FCAEE72570406F51371A0CB6E14B6B", "initial_timestamp": "2018-01-01 23:59:59", "merchant_operation_id": "TESTACCOUNT5436", "payload": "{'purchase_token':'EDEB342D3588DDDEEE3E070476E72A6B222E3456C1C825D3E89A734005CE81F69986045424984F55B3233CBFD090A8A564071BBB493F34C4849C964','initial_timestamp':'2018-09-20T10:46:08+01:00','merchant_operation_id':'TESTACCOUNT5436','payload':{'amount':1000,'currencyCode':'9782'}}" }, "force_3ds": false, "descriptive": "Descriptive Example", "value": 17.5 } Response samples 201 Content type application/json Copy Expand all Collapse all { "method": { "type": "CC", "url": "https://cc.easypay.pt/3ds/v2.0/7018c8ce-1d79-4c47-97e1-1bbe8d6cceee" }, "status": "ok", "message": [ "Your request was successfully created" ], "id": "4c67e74b-a256-4e0a-965d-97bf5d01bd50" } Shows authorisation details AUTHORIZATIONS: accountIdapiKey Responses 200 Success 401 Unauthorized 403 Forbidden 404 Resource Not Found 429 Too Many Requests 500 Internal Error GET /authorisation/{id} Response samples 200 Content type application/json Copy Expand all Collapse all { "transations": [ { } ], "id": "4c67e74b-a256-4e0a-965d-97bf5d01bd50", "status": "pending", "message": "string", "currency": "EUR", "customer": { "id": "22ea3cc9-424b-489a-91b7-8955f643dc93", "name": "Customer Example", "email": "customer@example.com", "phone": "911234567", "phone_indicative": "+351", "fiscal_number": "PT123456789", "key": "Key Example", "language": "PT" }, "key": "Example Key", "value": 10, "value_captured": 10, "method": { "type": "mb", "entity": "10611", "reference": "987654321", "url": "https://www.easypay.pt/_s/c11.php?e=10611&r=987654321&v=19&t_key=example+key&c=EN&l=EN", "last_four": "1234", "card_type": "VISA", "expiration_date": "01/22", "status": "pending" } } Shows void details AUTHORIZATIONS: accountIdapiKey Responses 200 Success 401 Unauthorized 403 Forbidden 404 Resource Not Found 429 Too Many Requests 500 Internal Error GET /void/{id} Response samples 200 Content type application/json Copy Expand all Collapse all { "transaction_key": "string", "authorisation": { "id": "4c67e74b-a256-4e0a-965d-97bf5d01bd50", "status": "pending", "message": "string", "currency": "EUR", "customer": { }, "key": "Example Key", "value": 10, "value_captured": 10, "method": { } }, "status": "pending", "id": "4c67e74b-a256-4e0a-965d-97bf5d01bd50", "descriptive": "Descriptive Example" } Voids a Single Auth or Frequent Auth AUTHORIZATIONS: accountIdapiKey REQUEST BODY SCHEMA: application/json Void details transaction_key string <= 50 characters Your internal key identifying this void descriptive required string <= 255 characters This will appear in the bank statement/mbway application Responses 201 Success 400 Bad Request 403 Forbidden 412 Precondition Failed 429 Too Many Requests 500 Internal Error POST /void/{id} Request samples PayloadPHPCURL Content type application/json Copy Expand all Collapse all { "transaction_key": "string", "descriptive": "Descriptive Example" } Response samples 201 Content type application/json Copy Expand all Collapse all { "status": "ok", "message": [ "Your request was successfully created" ], "id": "4c67e74b-a256-4e0a-965d-97bf5d01bd50" } Shows refund details AUTHORIZATIONS: accountIdapiKey Responses 200 Success 401 Unauthorized 403 Forbidden 404 Resource Not Found 429 Too Many Requests 500 Internal Error GET /refund/{id} Response samples 200 Content type application/json Copy Expand all Collapse all { "transaction_key": "string", "iban": "PT50002700000001234567833", "email": "customer@example.com", "phone": "911234567", "account_holder": "Account Name Example", "status": "success", "value": 17.5, "id": "4c67e74b-a256-4e0a-965d-97bf5d01bd50" } Refunds a Single Transaction or Frequent Transaction AUTHORIZATIONS: accountIdapiKey REQUEST BODY SCHEMA: application/json Refund details transaction_key string <= 50 characters Your internal key identifying this refund iban string <= 34 characters Optional - Iban from the bank account email string <= 50 characters Optional - Email from the bank account holder phone string <= 20 characters Optional - Phone from the bank account holder account_holder string <= 100 characters Optional - Bank account holder name value required number <double> > 0 Value will be rounded to 2 decimals Responses 201 Success 400 Bad Request 403 Forbidden 412 Precondition Failed 429 Too Many Requests 500 Internal Error POST /refund/{id} Request samples PayloadPHPCURL Content type application/json Copy Expand all Collapse all { "transaction_key": "string", "iban": "PT50002700000001234567833", "email": "customer@example.com", "phone": "911234567", "account_holder": "Account Name Example", "value": 17.5 } Response samples 201 Content type application/json Copy Expand all Collapse all { "status": "ok", "message": [ "Your request was successfully created" ], "id": "4c67e74b-a256-4e0a-965d-97bf5d01bd50" } Notification On Easypay Backoffice please configure your url's for each type of notification on menu: Web Services->Configuration API 2.0->Notifications and check the your notification history log on menu: Web Services->Notifications API 2.0. There is also a configuration to include a security header (x-easypay-code) on all notifications. Our system default notification payloads can be customized to any format if needed. Generic Notification AUTHORIZATIONS: accountIdapiKey REQUEST BODY SCHEMA: application/json We will send you this json in our notifications id string <uuid> ID of the related notified resource key string Merchant identification key type string Enum: "authorisation" "capture" "frequent_create" "void" "refund" "chargeback" "subscription_create" "subscription_capture" "out_payment" status string Enum: "failed" "success" messages Array of strings date string <Y-m-d H:i:s> Responses 200 Success 400 Bad Request 403 Forbidden 429 Too Many Requests 500 Internal Error POST /your-generic-notification-endpoint Request samples Payload Content type application/json Copy Expand all Collapse all { "id": "1bbc14c3-8ca8-492c-887d-1ca86400e4fa", "key": "Example Key", "type": "capture", "status": "success", "messages": [ "Your request was successfully created" ], "date": "2022-01-01 10:20:30" } Response samples 200 Content type application/json Copy Expand all Collapse all { "status": "ok", "message": [ "Your request was successfully created" ] } Authorisation Notification AUTHORIZATIONS: accountIdapiKey REQUEST BODY SCHEMA: application/json We will send you this json in our notification id string <uuid> value number <double> currency string Default: "EUR" key string Merchant identification key expiration_time string <Y-m-d H:i> customer object (schemas) method string account object authorisation object Responses 200 Success 400 Bad Request 403 Forbidden 429 Too Many Requests 500 Internal Error POST /your-authorisation-notification-endpoint Request samples Payload Content type application/json Copy Expand all Collapse all { "id": "8264433a-44eb-4163-bafb-f5fa137494f2", "value": 1, "currency": "EUR", "key": "Example Key", "expiration_time": "2022-01-01 10:20", "customer": { "id": "22ea3cc9-424b-489a-91b7-8955f643dc93", "name": "Customer Example", "email": "customer@example.com", "phone": "911234567", "phone_indicative": "+351", "fiscal_number": "PT123456789", "key": "Key Example", "language": "PT" }, "method": "mb", "account": { "id": "4c67e74b-a256-4e0a-965d-97bf5d01bd50" }, "authorisation": { "id": "4c67e74b-a256-4e0a-965d-97bf5d01bd50" } } Response samples 200 Content type application/json Copy Expand all Collapse all { "status": "ok", "message": [ "Your request was successfully created" ] } Transaction Notification AUTHORIZATIONS: accountIdapiKey REQUEST BODY SCHEMA: application/json We will send you this json in our notification id string <uuid> value number <double> currency string Default: "EUR" key string Merchant identification key expiration_time string <Y-m-d H:i> customer object (schemas) method string transaction object (Transaction) account object Responses 200 Success 400 Bad Request 403 Forbidden 429 Too Many Requests 500 Internal Error POST /your-notification-endpoint Request samples Payload Content type application/json Copy Expand all Collapse all { "id": "8264433a-44eb-4163-bafb-f5fa137494f2", "value": 1, "currency": "EUR", "key": "Example Key", "expiration_time": "2022-01-01 10:20", "customer": { "id": "22ea3cc9-424b-489a-91b7-8955f643dc93", "name": "Customer Example", "email": "customer@example.com", "phone": "911234567", "phone_indicative": "+351", "fiscal_number": "PT123456789", "key": "Key Example", "language": "PT" }, "method": "mb", "transaction": { "id": "3ce815ab-c16a-4b83-88ed-16f260cdf047", "key": "Example Key", "date": "2022-01-01 10:20:30", "values": { }, "transfer_date": "2022-12-12", "document_number": "CLIENTIDTEST2345678201808010900" }, "account": { "id": "4c67e74b-a256-4e0a-965d-97bf5d01bd50" } } Response samples 200 Content type application/json Copy Expand all Collapse all { "status": "ok", "message": [ "Your request was successfully created" ] } Reports Report Transactions List your transactions AUTHORIZATIONS: accountIdapiKey QUERY PARAMETERS start_date string <Y-m-d H:i> Example: start_date=2017-12-12 16:05 Filter from this date end_date string <Y-m-d H:i> Example: end_date=2017-12-12 16:05 Filter until this date page number Example: page=2 Page Number records_per_page number Default: "20" Example: records_per_page=2 Limit records per page (Max: 2500) Responses 200 Success 403 Forbidden 412 Precondition Failed 500 Internal Error GET /report/transactions Request samples CURL Copy curl -XGET -H "AccountId: 5fe2e102-dfee-4880-bd87-1d9a6ec6fdd2" -H "ApiKey: b0ea270d-9f50-4bbc-af58-44fed3df4b2b" \ -G --data-urlencode "start_date=2019-01-07 15:10" --data-urlencode "end_date=2019-02-05 15:14" --data-urlencode "page=1" --data-urlencode "records_per_page=10" \ https://api.prod.easypay.pt/2.0/report/transactions Response samples 200 Content type application/json Copy Expand all Collapse all { "data": [ { } ], "meta": { "page": { }, "records": { }, "links": { } } } Out Payment These operations will allow our clients to transfer their funds from Easypay Accounts to a Sepa Bank Account. Lists out payments Full report with all the out payments from your Account Id AUTHORIZATIONS: accountIdapiKey QUERY PARAMETERS page number Example: page=2 Page Number records_per_page number Default: "20" Example: records_per_page=2 Limit records per page (Max: 100) type string Example: type=normal Filter by type method string Example: method=transfer Filter by method id string Example: id=b100175d-e347-4501-8388-5d4b00b8551b Filter by id key string Example: key=Out Payment Key Example Filter by out payment key value number <double> Example: value=17.5 Filter by value Responses 200 Success 403 Forbidden 429 Too Many Requests 500 Internal Error GET /out_payment Response samples 200 Content type application/json Copy Expand all Collapse all { "data": [ { } ], "meta": { "page": { }, "records": { }, "links": { } } } Create out payment Get your strong authentication RSA private key from Easypay Backoffice on menu: Web Services->Configuration API 2.0->Keys. AUTHORIZATIONS: accountIdapiKey HEADER PARAMETERS Signature required string Example: rYkjshp6JmWrMnFzxCXb5ZpU7bj+x1z8b8Si+9LhXZuTY7SEsARYR7U0NzaV4tbJliFt/cMOZQGrTYng== RSA signature Base64 generated with algorithm SHA256 using a account strong authentication private Key on the raw body or id REQUEST BODY SCHEMA: application/json Payment configuration object to generate a payment customer required object (schemas) key string <= 50 characters Merchant identification key value required number <double> >= 0.5 Value will be rounded to 2 decimals type string Default: "normal" Enum: "normal" "instant" Optional - only applicable to method transfer schedule_at string <Y-m-d H:i:s> Schedule date to execute the payment account object out_account required object method required string (Payment_OutPayment_Method_Available) Default: "transfer" Value: "transfer" timestamp required string Unix timestamp UTC, must be no more than 1 minute before or after real time, if not the strong authentication signature will not be valid Responses 201 Success 400 Bad Request 403 Forbidden 429 Too Many Requests 500 Internal Error POST /out_payment Request samples PayloadPHP Content type application/json Copy Expand all Collapse all { "customer": { "id": "22ea3cc9-424b-489a-91b7-8955f643dc93", "name": "Customer Example", "email": "customer@example.com", "phone": "911234567", "phone_indicative": "+351", "fiscal_number": "PT123456789", "key": "Key Example", "language": "PT" }, "key": "Example Key", "value": 17.5, "type": "normal", "schedule_at": "2017-12-12 16:05:02", "account": { "id": "4c67e74b-a256-4e0a-965d-97bf5d01bd50" }, "out_account": { "account_holder": "Acount Name Example", "iban": "PT50002700000001234567833", "email": "customer@example.com", "phone": "911234567", "key": "Key Example", "country_code": "PT" }, "method": "transfer", "timestamp": "1136239445" } Response samples 201 Content type application/json Copy Expand all Collapse all { "status": "ok", "message": [ "Your request was successfully created" ], "id": "4c67e74b-a256-4e0a-965d-97bf5d01bd50", "method": { "type": "transfer", "status": "pending" }, "out_account": { "id": "4c67e74b-a256-4e0a-965d-97bf5d01bd50" }, "customer": { "id": "4c67e74b-a256-4e0a-965d-97bf5d01bd50" } } Deletes out payment If the payment is not processed, it will be cancelled. Get your strong authentication RSA private key from Easypay Backoffice on menu: Web Services->Configuration API 2.0->Keys. AUTHORIZATIONS: accountIdapiKey Responses 204 No content 400 Bad Request 401 Unauthorized 403 Forbidden 404 Resource Not Found 429 Too Many Requests 500 Internal Error DELETE /out_payment/{id} Shows out payment details AUTHORIZATIONS: accountIdapiKey Responses 200 Success 401 Unauthorized 403 Forbidden 404 Resource Not Found 429 Too Many Requests 500 Internal Error GET /out_payment/{id} Response samples 200 Content type application/json Copy Expand all Collapse all { "transactions": [ { } ], "id": "4c67e74b-a256-4e0a-965d-97bf5d01bd50", "customer": { "id": "22ea3cc9-424b-489a-91b7-8955f643dc93", "name": "Customer Example", "email": "customer@example.com", "phone": "911234567", "phone_indicative": "+351", "fiscal_number": "PT123456789", "key": "Key Example", "language": "PT" }, "key": "Example Key", "value": 17.5, "type": "normal", "schedule_at": "2017-12-12 16:05:02", "account": { "id": "4c67e74b-a256-4e0a-965d-97bf5d01bd50" }, "out_account": { "account_holder": "Acount Name Example", "iban": "PT50002700000001234567833", "email": "customer@example.com", "phone": "911234567", "key": "Key Example", "country_code": "PT", "id": "4c67e74b-a256-4e0a-965d-97bf5d01bd50" }, "method": { "type": "transfer", "status": "pending" } } Config Account URL configuration for notifications and credit card transactions Get Account Config AUTHORIZATIONS: accountIdapiKey Responses 200 Success 403 Forbidden 429 Too Many Requests 500 Internal Error GET /config Response samples 200 Content type application/json Copy Expand all Collapse all { "generic": "https://www.easypay.pt/generic", "authorisation": "https://www.easypay.pt/authorisation", "transaction": "https://www.easypay.pt/transaction", "visa_fwd": "https://www.easypay.pt/visa_fwd", "visa_detail": "https://www.easypay.pt/visa_detail", "account": "b2080452-bad1-4455-8ae7-9f5ea552a274", "payment_methods": [ "mb" ] } Patch Account Config AUTHORIZATIONS: accountIdapiKey REQUEST BODY SCHEMA: application/json Payment configuration object to generate a payment generic string Default: "https://www.easypay.pt/generic" URL for generic notification authorisation string Default: "https://www.easypay.pt/authorisation" URL for authorisation notification transaction string Default: "https://www.easypay.pt/transaction" URL for transaction notification visa_fwd string Default: "https://www.easypay.pt/visa_fwd" URL for redirect clients on credit card forward visa_detail string Default: "https://www.easypay.pt/visa_detail" URL for credit card payment detail Responses 200 Success 400 Bad Request 403 Forbidden 429 Too Many Requests 500 Internal Error PATCH /config Request samples Payload Content type application/json Copy Expand all Collapse all { "generic": "https://www.easypay.pt/generic", "authorisation": "https://www.easypay.pt/authorisation", "transaction": "https://www.easypay.pt/transaction", "visa_fwd": "https://www.easypay.pt/visa_fwd", "visa_detail": "https://www.easypay.pt/visa_detail" } Response samples 200 Content type application/json Copy Expand all Collapse all { "generic": "https://www.easypay.pt/generic", "authorisation": "https://www.easypay.pt/authorisation", "transaction": "https://www.easypay.pt/transaction", "visa_fwd": "https://www.easypay.pt/visa_fwd", "visa_detail": "https://www.easypay.pt/visa_detail", "account": "b2080452-bad1-4455-8ae7-9f5ea552a274", "payment_methods": [ "mb" ] } Road Map Our future implementations on Easypay API Transfers (Available from 2022) Lists all transfers AUTHORIZATIONS: accountIdapiKey QUERY PARAMETERS page number Example: page=2 Page Number Responses 200 Success 403 Forbidden 429 Too Many Requests 500 Internal Error GET /transfer Response samples 200 Content type application/json Copy Expand all Collapse all { "data": [ { } ], "meta": { "page": { }, "records": { }, "links": { } } } Transfers (Available from 2022) Create Transfer AUTHORIZATIONS: accountIdapiKey REQUEST BODY SCHEMA: application/json Payment configuration object to generate a payment to required string <IBAN or CIN uuid> value required float date string <Y-m-d> Date to execute the transfer captive_balance_immediately boolean Default: false Send true if you want to captive the balance immediately Responses 201 Success 400 Bad Request 403 Forbidden 429 Too Many Requests 500 Internal Error POST /transfer Request samples Payload Content type application/json Copy Expand all Collapse all { "to": "string", "value": 250, "date": "string", "captive_balance_immediately": false } Response samples 201 Content type application/json Copy Expand all Collapse all { "status": "pending", "message": [ "Your request was successfully created" ], "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "to": "string", "value": 250, "date": "string", "captive_balance_immediately": false } Transfers (Available from 2022) Deletes/Cancels transfer AUTHORIZATIONS: accountIdapiKey Responses 204 No content 400 Bad Request 401 Unauthorized 403 Forbidden 404 Resource Not Found 429 Too Many Requests 500 Internal Error DELETE /transfer/{id} Transfers (Available from 2022) Shows transfer details AUTHORIZATIONS: accountIdapiKey Responses 200 Success 401 Unauthorized 403 Forbidden 404 Resource Not Found 429 Too Many Requests 500 Internal Error GET /transfer/{id} Response samples 200 Content type application/json Copy Expand all Collapse all { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "status": "pending", "to": "string", "value": 250, "date": "string", "captive_balance_immediately": false } Single Payment [Bulk] (Available from 2022) Delete multiple single payments AUTHORIZATIONS: accountIdapiKey REQUEST BODY SCHEMA: application/json Payment configuration object to generate a payment Array id required string <uuid> Responses 202 Success 400 Bad Request 401 Unauthorized 403 Forbidden 413 Request Entity Too Large 429 Too Many Requests 500 Internal Error DELETE /single/bulk/delete Request samples Payload Content type application/json Copy Expand all Collapse all [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08" } ] Response samples 202 Content type application/json Copy Expand all Collapse all { "status": "ok", "message": [ "Your request was successfully created" ], "report": { "id": "4c67e74b-a256-4e0a-965d-97bf5d01bd50" } } Single Payment [Bulk] (Available from 2022) Update/create multiple single payments AUTHORIZATIONS: accountIdapiKey REQUEST BODY SCHEMA: application/json Payment configuration object to generate a payment Array expiration_time string <Y-m-d H:i> Optional currency string Default: "EUR" Enum: "EUR" "BRL" customer object (schemas) key string <= 50 characters Merchant identification key value required number <double> >= 0.5 Value will be rounded to 2 decimals type string Default: "sale" Enum: "sale" "authorisation" Optional - only applicable to method cc or mbw method required string (Payment_Single_Method_Available) Enum: "mb" "cc" "mbw" "dd" "bb" "vi" account object sdd_mandate object (schemas) Only required if 'method' is 'dd' Responses 202 Success 400 Bad Request 401 Unauthorized 403 Forbidden 413 Request Entity Too Large 429 Too Many Requests 500 Internal Error PATCH /single/bulk/upsert Request samples Payload Content type application/json Copy Expand all Collapse all [ { "expiration_time": "2017-12-12 16:05", "currency": "EUR", "customer": { }, "key": "Example Key", "value": 17.5, "type": "sale", "method": "mb", "account": { }, "sdd_mandate": { } } ] Response samples 202 Content type application/json Copy Expand all Collapse all { "status": "ok", "message": [ "Your request was successfully created" ], "report": { "id": "4c67e74b-a256-4e0a-965d-97bf5d01bd50" } } Single Payment [Bulk] (Available from 2022) Create multiple single payments AUTHORIZATIONS: accountIdapiKey REQUEST BODY SCHEMA: application/json Payment configuration object to generate a payment Array expiration_time string <Y-m-d H:i> Optional currency string Default: "EUR" Enum: "EUR" "BRL" customer object (schemas) key string <= 50 characters Merchant identification key value required number <double> >= 0.5 Value will be rounded to 2 decimals type string Default: "sale" Enum: "sale" "authorisation" Optional - only applicable to method cc or mbw method required string (Payment_Single_Method_Available) Enum: "mb" "cc" "mbw" "dd" "bb" "vi" Responses 202 Success 400 Bad Request 401 Unauthorized 403 Forbidden 413 Request Entity Too Large 429 Too Many Requests 500 Internal Error POST /single/bulk/create Request samples Payload Content type application/json Copy Expand all Collapse all [ { "expiration_time": "2017-12-12 16:05", "currency": "EUR", "customer": { }, "key": "Example Key", "value": 17.5, "type": "sale", "method": "mb" } ] Response samples 202 Content type application/json Copy Expand all Collapse all { "status": "ok", "message": [ "Your request was successfully created" ], "report": { "id": "4c67e74b-a256-4e0a-965d-97bf5d01bd50" } } Reports (Available from 2022) Shows report details AUTHORIZATIONS: accountIdapiKey Responses 200 Success 400 Bad Request 401 Unauthorized 403 Forbidden 404 Resource Not Found 413 Request Entity Too Large 429 Too Many Requests 500 Internal Error GET /report/{id} Response samples 200 Content type application/json Copy Expand all Collapse all { "status": "processing", "id": "4c67e74b-a256-4e0a-965d-97bf5d01bd50", "type": "payment", "date_range": { "init": "string", "end": "string" }, "operation": "refunds", "customer": { "id": "22ea3cc9-424b-489a-91b7-8955f643dc93", "name": "Customer Example", "email": "customer@example.com", "phone": "911234567", "phone_indicative": "+351", "fiscal_number": "PT123456789", "key": "Key Example", "language": "PT" }, "account": { "id": "22ea3cc9-424b-489a-91b7-8955f643dc93" }, "payment": { "type": "single", "method": { } } } Reports (Available from 2022) Create a new report AUTHORIZATIONS: accountIdapiKey REQUEST BODY SCHEMA: application/json Payment configuration object to generate a payment type required string Enum: "customer" "payment" "account" date_range object operation string This is something like a sub-type of the report, list this, list that, list all, etc payment object account object customer object Responses 202 Success 400 Bad Request 401 Unauthorized 403 Forbidden 413 Request Entity Too Large 429 Too Many Requests 500 Internal Error POST /report Request samples Payload Content type application/json Copy Expand all Collapse all { "type": "payment", "date_range": { "init": "string", "end": "string" }, "operation": "refunds", "payment": { "type": "single", "method": [ ] }, "account": { "id": "4c67e74b-a256-4e0a-965d-97bf5d01bd50" }, "customer": { "id": "4c67e74b-a256-4e0a-965d-97bf5d01bd50" } } Response samples 202 Content type application/json Copy Expand all Collapse all { "status": "ok", "message": [ "Your request was successfully created" ], "report": { "id": "4c67e74b-a256-4e0a-965d-97bf5d01bd50" } } Checkout Requirements Setup UI configurations Requirements A Easypay account configured for the new APIs A CIN with CCs configured You should also familiarize yourself with the Payment Operations available on our API 2.0 Depending on your needs you might have to implement the API Notifications workflow Worflow Create the Checkout via our API 2.0 (server side), you can find the request details here You should save the response manifest on your side, this will be usefull if there is a page refresh. In the event of a refresh from the client-side, you can check the checkout request status using this endpoint The manifest will contain a JWT with a timeout of 30 minutes If for some reason the checkout isn't complete in that time, you should cancel that checkout request and create a new one Load the UI js into your page Wait for the user to open the Popup and enter it's details, once it happens, a callback will be executed Back on the server, if you need to check any other details of the payment, you can use the Payment Operations available to get the details you need It's important to store the checkout.id and payment.id retrieved using the SDK Cancels a checkout This cancels the Checkout and deletes the payment associated with it if possible. AUTHORIZATIONS: accountIdapiKey Responses 204 No content 400 Bad Request 401 Unauthorized 403 Forbidden 404 Resource Not Found 429 Too Many Requests 500 Internal Error DELETE /checkout/{id} Shows checkout details AUTHORIZATIONS: accountIdapiKey Responses 200 Success 401 Unauthorized 403 Forbidden 404 Resource Not Found 429 Too Many Requests 500 Internal Error GET /checkout/{id} Response samples 200 Content type application/json Copy Expand all Collapse all { "status": "success", "messages": [ "Your request was successfully created" ], "checkout": { "status": "pending", "id": "4c67e74b-a256-4e0a-965d-97bf5d01bd50" }, "payment": { "status": "pending", "id": "4c67e74b-a256-4e0a-965d-97bf5d01bd50" }, "method": { "entity": "10611", "reference": "987654321", "url": "https://www.easypay.pt/_s/c11.php?e=10611&r=987654321&v=19&t_key=example+key&c=EN&l=EN", "last_four": "1234", "card_type": "VISA", "expiration_date": "01/22", "iban": "PT50000000000000000000000", "status": "pending" }, "id": "4c67e74b-a256-4e0a-965d-97bf5d01bd50" } Create Checkout AUTHORIZATIONS: accountIdapiKey REQUEST BODY SCHEMA: application/json Checkout request details type required Array of strings Payment types requested. Options available are: 'single' and 'frequent' payment required object order required object config Array of any UI configurations customer required object (schemas) Responses 201 Success 400 Bad Request 403 Forbidden 429 Too Many Requests 500 Internal Error POST /checkout Request samples PayloadPHP Content type application/json Copy Expand all Collapse all { "type": [ "single", "frequent" ], "payment": { "methods": [ ], "type": "sale", "capture": { }, "expiration_time": "2017-12-12 16:05", "currency": "EUR", "key": "Example Key", "sdd_mandate": { }, "max_value": 20, "min_value": 2, "unlimited_payments": false, "frequency": "1D", "max_captures": 10, "start_time": "2017-12-12 16:05", "failover": true, "capture_now": true, "retries": 2 }, "order": { "items": [ ], "key": "Example Key", "value": 17.5 }, "config": [ null ], "customer": { "id": "22ea3cc9-424b-489a-91b7-8955f643dc93", "name": "Customer Example", "email": "customer@example.com", "phone": "911234567", "phone_indicative": "+351", "fiscal_number": "PT123456789", "key": "Key Example", "language": "PT" } } Response samples 201 Content type application/json Copy Expand all Collapse all { "session": "eyJhbGciOiJIUzUxMiIsInR5cCI6ckpXVCJ9.eyJleHAiOjE1OTg2MjUzMjYsImlhdCI6MTU5ODYyMzUyNiwiaXNzIjoiUGF5bWVudCBBUEkgMi4wIENoZWNrb3V0IFNlc3Npb24gTWFuYWdlciIsImNpbiI6MiwiY2hrIjoxNTIsImFjYyI6IjI5NzI0MWVjLWRlY2QtNDUwMS1iY2JmLTdkZWI1NjEyNjQ2NCIsImFwayI6ImRyaTVmODhjLTkzMDMtNGM4NC1iZmM3LWU0NWEyYjFmNTIzOSJ9.XUno_fiSOQrFORu4uCLqoWLB5M4kkAmx5um1b8vknjvfj_E4uHj4NqqN4-t8Vg0L3_UdYo6ptVcHe0gwDKX3Rw", "config": [ null ], "id": "4c67e74b-a256-4e0a-965d-97bf5d01bd50" }