Authorizations allow you to allocate a given amount in a credit card to be captured later. You can create authorizations via the checkout API or via the Prows 2 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. Up to 10 capture requests can be made provided they do not exceed the total authorized amount and no release has been called upon the specified authorization. If your use case is to do a partial capture and release the remaining funds make sure you issue the release first.
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 do partial releases multiple times provided the total released amount does not exceed the authorized amount. You can’t perform a release after a capture has been made.
If the amount parameter is omitted in the ReleaseRequest, all the authorized amount is released.
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) |
number4 | Last 4 digits from credit card |
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], number4=[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 |