Payment-Capture-v2: Difference between revisions
Jump to navigation
Jump to search
Stankovicsa (talk | contribs) (Created page with "{{PageTitle|title=Barion API: Capture of a payment}} {| style="margin-left:2em;" align="right" | __TOC__ |} {{api_callmethod |method=POST |uri=/v2/Payment/Capture }} The <c...") |
m (replaced reference to v2 GetPaymentState with v4 PaymentState) |
||
(5 intermediate revisions by 2 users not shown) | |||
Line 10: | Line 10: | ||
}} | }} | ||
The <code>/payment/capure</code> API endpoint is used to capture (finish) an existing, previously authorized payment. | The <code>/payment/capure</code> API endpoint is used to capture (finish) an existing, previously authorized payment. All transactions are finished with the amount specified in this request, regardless of the amount specified in the StartPayment. | ||
Prerequisites before use: | Prerequisites before use: | ||
Line 17: | Line 17: | ||
* [[Calling_the_API|Calling the Barion API]] | * [[Calling_the_API|Calling the Barion API]] | ||
* API: [[Payment-Start-v2 | /Payment/Start]] | * API: [[Payment-Start-v2 | /Payment/Start]] | ||
* API: [[Payment- | * API: [[Payment-PaymentState-v4|/v4/Payment/<PaymentId>/PaymentState]] | ||
<span class="api-ver">v2</span> This API endpoint is available in '''API v2''' only. | <span class="api-ver">v2</span> This API endpoint is available in '''API v2''' only. | ||
== Authentication == | |||
[[Barion Shop Authentication]] | |||
== Use cases == | == Use cases == | ||
Line 44: | Line 48: | ||
| Transactions || [[TransactionToFinish]][] || | | Transactions || [[TransactionToFinish]][] || | ||
* Required | * Required | ||
|| An array containing the payment transactions to | || An array containing the payment transactions to capture. All transactions must be supplied. | ||
|} | |} | ||
Line 56: | Line 60: | ||
|- | |- | ||
| PaymentId || Guid || The identifier of the | | PaymentId || Guid || The identifier of the payment, generated by the Barion system. | ||
|- | |- |
Latest revision as of 10:24, 25 March 2024
Barion API: Capture of a payment
POST | /v2/Payment/Capture |
---|
The /payment/capure
API endpoint is used to capture (finish) an existing, previously authorized payment. All transactions are finished with the amount specified in this request, regardless of the amount specified in the StartPayment.
Prerequisites before use:
- Creating an account in Barion
- Creating a shop in Barion
- Calling the Barion API
- API: /Payment/Start
- API: /v4/Payment/<PaymentId>/PaymentState
v2 This API endpoint is available in API v2 only.
Authentication
Use cases
This API endpoint is designed to be used in the following scenarios:
Input properties
Property name | Property type | Limitations and constraints | Description |
---|---|---|---|
POSKey | Guid |
|
The secret API key of the shop, generated by Barion. This lets the shop to authenticate through the Barion API, but does not provide access to the account owning the shop itself. |
PaymentId | Guid |
|
The identifier of the payment in the Barion system. |
Transactions | TransactionToFinish[] |
|
An array containing the payment transactions to capture. All transactions must be supplied. |
Output properties
Property name | Property type | Description |
---|---|---|
IsSuccessful | bool | Result of the transaction |
PaymentId | Guid | The identifier of the payment, generated by the Barion system. |
PaymentRequestId | string | The payment identifier supplied by the API caller in the request. |
Status | PaymentStatus | The status of the payment in the Barion system. |
Transactions | ProcessedTransaction[] | Related transactions |