Payment-Complete-v2: Difference between revisions

From Barion Documentation
Jump to navigation Jump to search
No edit summary
mNo edit summary
 
(5 intermediate revisions by 3 users not shown)
Line 12: Line 12:
* [[Calling_the_API|Calling the Barion API]]
* [[Calling_the_API|Calling the Barion API]]


<span class="api-ver">v3</span> This API endpoint is available in '''API v3''' 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 41: Line 45:
|-
|-


| Status || [[PaymentStatus]]|| The status of the payment in the Barion system.  
| PaymentStatus || [[PaymentStatus]]|| The status of the payment in the Barion system.  


|-
|-
 
| IsSuccessful || bool || Indicates whether the charge was successful
| RecurrenceResult || RecurrenceResult || Indicates the result of an authorized payment scenario. The result depends on the values of the '''InitiateRecurrence''' and '''RecurrenceId''' properties supplied in the request.
 
* If '''InitiateRecurrence''' was <code>true</code>, and a new authorized payment was successfully created, this will be <code>None</code> (because no actual token charge took place yet)
 
* If '''InitiateRecurrence''' was <code>false</code>, but a previously authorized payment identifier was supplied in '''RecurrenceId''', the system will try to charge the funding source associated with the authorized payment. If this charge is successful, the result is <code>Successful</code>. If the system could not charge the funding srouce, the result is <code>Failed</code>. If the given identifier is invalid or does not exist, the result is <code>NotFound</code>.
 
|-
|-
 
| TraceId || string || Identifies the nature of the token payment.  
| Transactions || [[ProcessedTransaction]][] || An array containing all transactions associated with the payment. If the Barion system deducts fees from the shop after payments, this also contains these additional fee transactions beside the payment transactions that were sent in the request.
 
|-
 
| CallbackUrl || string || The URL (including the payment identifier) where the Barion system will send a request to whenever there is a change in the state of the payment. If an explicit URL was not supplied, this will be the callback URL associated with the shop that started the payment.
 
|-
|-
|}
|}

Latest revision as of 10:49, 15 November 2022

Barion API: Complete a payment

POST /v2/Payment/Complete

The /payment/CompletePayment API endpoint is used to complete a formerly prepared and 3DS authenticated payment in the Barion system.

Prerequisites before use:

v2 This API endpoint is available in API v2 only.

Authentication

Barion Shop 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 * Required 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 * Required The identifier of the formerly initialized and authenticated payment, generated by the Barion system.

Output properties

Property name Property type Description
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.
PaymentStatus PaymentStatus The status of the payment in the Barion system.
IsSuccessful bool Indicates whether the charge was successful
TraceId string Identifies the nature of the token payment.