Payment-Refund-v2: Difference between revisions

From Barion Documentation
Jump to navigation Jump to search
Line 56: Line 56:
|-
|-


| PaymentRequestId || string || The identifier of the payment in the shop's system.
| RefundedTransactions || [[RefundedTransaction]][] || An array containing the details of the refunded transactions.
 
|-
 
| POSId || Guid || The public identifier of the shop that created the payment.
 
|-
 
| POSName || string || The name of the shop that created the payment.
 
|-
 
| POSOwnerEmail || string || The e-mail address of the owner of the shop that created the payment.
 
|-
 
| Status || [[PaymentStatus]] || The current status of the payment in the Barion system.
 
|-
 
| PaymentType || string || The type of the payment. Can be <code>Immediate</code> or <code>Reservation</code>.
 
|-
 
| AllowedFundingSources || string[] || The allowed funding sources that were defined when creating the payment.
 
|-
 
| FundingSource || string || The funding source that was used to complete the payment. If the payment is not yet completed, this is empty.
 
|-
 
| FundingInformation || [[FundingInformation]] || Detailed information about the funding source that was used to complete the payment. If the payment is not yet completed, this is empty.
 
|-
 
| GuestCheckout || bool || Indicates wether the payment allows guest checkout.
 
|-
 
| CreatedAt || DateTime || The timestamp showing when the payment was created.
 
|-
 
| StartedAt || DateTime || The timestamp showing when a reservation payment was started. If the payment type is not reservation, this is empty.
 
|-
 
| CompletedAt || DateTime || The timestamp showing when the payment was completed. If the payment is not yet completed, this is empty.
 
|-
 
| ValidUntil || DateTime || Timestamp showing the expiration time of the payment time window. The payment must be completed before this elapses.
 
|-
 
| ReservedUntil || DateTime || Timestamp showing the expiration time of the reservation time window. The reserved payment must be finished before this elapses. If the payment type is not reservation, this is empty.
 
|-
 
| Transactions || [[DetailedPaymentTransaction]][] || An array containing a detailed structure of all transactions associated with the payment.
 
|-
 
| Total || decimal || The total amount of the payment <u>at the time of the request</u>. If a reservation was finished with a lower amount, or a previously completed payment was refunded, this can be less than at the time of creation.
 
|-
 
| Currency || string || The 3 character ISO 4217 currency code of the payment.
 
|-
 
| SuggestedLocale || string || Indicates in which language the Barion Smart Gateway should be shown for the payer.
 
|-
 
| FraudRiskScore || int || A risk score computed by the anti-fraud analysis, between a range of 0 (completely legit) to 100 (certain fraud).
 
|-
 
| CallbackUrl || string || The URL (including the payment identifier) where the Barion system will send (or already sent) a request to whenever there is a change in the state of the payment.
 
|-
 
| RedirectUrl || string|| The URL (including the payment identifier) where the payer gets (or already got) redirected to after the payment is or was completed or cancelled.


|}
|}

Revision as of 13:04, 3 February 2017

Barion API: Execute the refund of a payment

GET /v2/Payment/Refund

The /payment/refund API endpoint is used to execute a refund of an existing, completed payment.

Prerequisites before use:

v2 This API endpoint is available in API v2 only.

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 payment in the Barion system.
TransactionsToRefund TransactionToRefund[]
  • Required
An array containing the payment transactions to refund.

Output properties

Property name Property type Description
PaymentId Guid The identifier of the payment in the Barion system.
RefundedTransactions RefundedTransaction[] An array containing the details of the refunded transactions.