Payment-Reject-v2: Difference between revisions
Jump to navigation
Jump to search
Created page with "__TOC__ {| class="wikitable" ! style="width:80px;" | POST | <code>/v2/Payment/Reject</code> |} The <code>/payment/reject</code> API endpoint is used to cancel a payment in the Barion system before the payer completes it. After a successful call, the payer can no longer pay it. Prerequisites before use: * Creating an account in Barion * Creating a shop in Barion * Calling the Barion API * Initializing a payment <small>v..." |
link update |
||
| Line 9: | Line 9: | ||
Prerequisites before use: | Prerequisites before use: | ||
* [[Creating an account in Barion]] | * [[Creating an account|Creating an account in Barion]] | ||
* [[Creating a shop in Barion]] | * [[Creating a shop|Creating a shop in Barion]] | ||
* [[Calling the API|Calling the Barion API]] | * [[Calling the API|Calling the Barion API]] | ||
* [[Payment-Start-v2|Initializing a payment]] | * [[Payment-Start-v2|Initializing a payment]] | ||
| Line 21: | Line 21: | ||
== Use cases == | == Use cases == | ||
This API endpoint is designed to be used in the following scenarios: | This API endpoint is designed to be used in the following scenarios: | ||
* [[Responsive Web Payment]] | * [[Responsive web payment|Responsive Web Payment]] | ||
Only payments in '''Prepared''' status can be rejected, meaning the payer has not completed them yet. The result is the same as when the payer clicks '''"Back to shop without payment"''' on the Barion Smart Gateway: | Only payments in '''Prepared''' status can be rejected, meaning the payer has not completed them yet. The result is the same as when the payer clicks '''"Back to shop without payment"''' on the Barion Smart Gateway: | ||
Latest revision as of 15:00, 21 October 2026
| POST | /v2/Payment/Reject
|
|---|
The /payment/reject API endpoint is used to cancel a payment in the Barion system before the payer completes it. After a successful call, the payer can no longer pay it.
Prerequisites before use:
- Creating an account in Barion
- Creating a shop in Barion
- Calling the Barion API
- Initializing a payment
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:
Only payments in Prepared status can be rejected, meaning the payer has not completed them yet. The result is the same as when the payer clicks "Back to shop without payment" on the Barion Smart Gateway:
- the payment status becomes Canceled,
- its unpaid transactions become Rejected,
- Barion sends a callback to the shop.
Use other endpoints for payments in other stages:
- to release an authorized delayed capture payment, use Payment/CancelAuthorization,
- to return money from a completed payment, use Payment/Refund.
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 authenticate through the Barion API, but does not provide access to the account owning the shop itself. |
| PaymentId | Guid |
|
The identifier of the payment to reject, as returned by Payment/Start. If the payment is already Canceled or Expired, or is in any other status, the call returns an error.
|
Output properties
| Property name | Property type | Description |
|---|---|---|
| PaymentId | Guid | The identifier of the payment, the same as in the request. |
| IsSuccessful | bool | true if the payment was rejected successfully.
|