| Requires any of the roles: | Admin, TeamAdmin | Requires the permission: | Tickets.Add |
| POST | /refund/process |
|---|
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class RefundOrderOutcome:
status: Optional[str] = None
payment_reference: Optional[str] = None
payment_id: Optional[str] = None
event_id: Optional[int] = None
event_name: Optional[str] = None
holder_name: Optional[str] = None
holder_email: Optional[str] = None
amount_refunded: Optional[Decimal] = None
partial: Optional[bool] = None
ticket_token_ids: Optional[List[str]] = None
freed_seat_ids: Optional[List[int]] = None
borgun_refund_transaction_id: Optional[str] = None
message: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class RefundResult:
success: Optional[bool] = None
status_code: Optional[int] = None
message: Optional[str] = None
refunded_count: Optional[int] = None
skipped_count: Optional[int] = None
failed_count: Optional[int] = None
total_refunded: Optional[Decimal] = None
outcomes: Optional[List[RefundOrderOutcome]] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class RefundRequest:
event_id: Optional[int] = None
refund_all_for_event: Optional[bool] = None
ticket_token_ids: Optional[List[str]] = None
payment_references: Optional[List[str]] = None
reason: Optional[str] = None
user_id: Optional[int] = None
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /refund/process HTTP/1.1
Host: stubbur-app.azurewebsites.net
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<RefundRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
<EventId>0</EventId>
<PaymentReferences xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</PaymentReferences>
<Reason>String</Reason>
<RefundAllForEvent>false</RefundAllForEvent>
<TicketTokenIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</TicketTokenIds>
<UserId>0</UserId>
</RefundRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<RefundResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
<FailedCount>0</FailedCount>
<Message>String</Message>
<Outcomes>
<RefundOrderOutcome>
<AmountRefunded>0</AmountRefunded>
<BorgunRefundTransactionId>String</BorgunRefundTransactionId>
<EventId>0</EventId>
<EventName>String</EventName>
<FreedSeatIds xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:int>0</d4p1:int>
</FreedSeatIds>
<HolderEmail>String</HolderEmail>
<HolderName>String</HolderName>
<Message>String</Message>
<Partial>false</Partial>
<PaymentId>String</PaymentId>
<PaymentReference>String</PaymentReference>
<Status>String</Status>
<TicketTokenIds xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>String</d4p1:string>
</TicketTokenIds>
</RefundOrderOutcome>
</Outcomes>
<RefundedCount>0</RefundedCount>
<SkippedCount>0</SkippedCount>
<StatusCode>0</StatusCode>
<Success>false</Success>
<TotalRefunded>0</TotalRefunded>
</RefundResult>