Authorizations allow you to allocate a given amount in a MB Way number to be captured later. You can create authorizations via the checkout API, Prows 2 API or the Payment API .
Request a capture of an authorization, that is a settlement of the payment transaction. The authorization must be accepted first.
You can do a partial capture. The total captured amount must not exceed the total authorized amount and no release has been called upon the specified authorization.
If the amount parameter is omitted in the CaptureRequest, all the authorized amount is captured.
Request | POST /api/v2/authorizations/id/capture |
---|---|
URL params | authorization id |
Data params | CaptureRequest |
Returns | Operation |
A callback will be sent in case of failure or success with a reference to the created checkout (checkout_id) if exists and type of operation. In this case is “CAPTURE”.
You can pass a request_id to track this request. Check the Idempotency page.
Request a release of an authorization. The authorization must be accepted first. You can only release the full amount of an authorization. If you perform a partial capture, the remaining amount will be released automatically after 7 days.
Request | POST /api/v2/authorizations/id/release |
---|---|
URL params | authorization id |
Data params | ReleaseRequest |
Returns | Operation |
A callback will be sent in case of failure or success with a reference to the created checkout (checkout_id) if exists and type of operation. In this case is “RELEASE”.
You can pass a request_id to track this request. Check the Idempotency page.
Gets all authorizations with optional date range and pagination.
Parameter | When to use |
---|---|
id | Authorization id to search |
startdate | Search operations since date (yyy-mm-dd format) |
enddate | Search operations until date (yyyy-mm-dd format) |
method | Return only MB Way authorizations. By default, all are returned. Value=MBWAY |
phone | MB Way number |
offset | Page number |
limit | How many records per page to return (the maximum accepted value is “30”) |
ext_invoiceid | merchant reference for this payment |
Request | GET /api/v2/authorizations |
---|---|
Query params | startdate=[string], enddate=[string], limit=[int], offset=[int], ext_invoiceid=[string], phone=[int] |
Data params | none |
Returns | Operation Array |
Gets the current status of a single authorization with “captures” and “releases” details.
Request | GET /api/v2/authorizations/id |
---|---|
URL params | authorization id |
Data params | none |
Returns | Operation |
Field | Type | In/Out | Mandatory | Description | Validations |
---|---|---|---|---|---|
amount | float | I | N | amount to capture | min=0.2 |
ext_customerid | string | I | N | Merchant customer ID (for reference | maxlen=45 |
ext_email | string | I | N | Customer email (for reference) | maxlen=100 |
ext_invoiceid | string | I | N | Merchant transaction reference | maxlen=45 |
ext_employee | string | I | N | employee name (max 45 chars) | maxlen=45 |
notes | string | I | N | Merchant notes | maxlen=255 |
Field | Type | In/Out | Mandatory | Description | |
---|---|---|---|---|---|
amount | float | I | N | amount to capture | min=0.2 |
ext_customerid | string | I | N | Merchant customer ID (for reference) | maxlen=45 |
ext_email | string | I | N | Customer email (for reference) | maxlen=100 |
ext_invoiceid | string | I | N | Merchant transaction reference | maxlen=45 |
ext_employee | string | I | N | employee name (max 45 chars) | maxlen=45 |
notes | string | I | N | Merchant notes | maxlen=255 |