TicketUserServices

<back to all web services

RefundRequest

Requires Authentication
Requires any of the roles:Admin, TeamAdminRequires the permission:Tickets.Add
The following routes are available for this service:
POST/refund/process
import Foundation
import ServiceStack

public class RefundRequest : Codable
{
    public var eventId:Int?
    public var refundAllForEvent:Bool?
    public var ticketTokenIds:[String] = []
    public var paymentReferences:[String] = []
    public var reason:String?
    public var userId:Int?

    required public init(){}
}

public class RefundResult : Codable
{
    public var success:Bool?
    public var statusCode:Int?
    public var message:String?
    public var refundedCount:Int?
    public var skippedCount:Int?
    public var failedCount:Int?
    public var totalRefunded:Double?
    public var outcomes:[RefundOrderOutcome] = []

    required public init(){}
}

public class RefundOrderOutcome : Codable
{
    public var status:String?
    public var paymentReference:String?
    public var paymentId:String?
    public var eventId:Int?
    public var eventName:String?
    public var holderName:String?
    public var holderEmail:String?
    public var amountRefunded:Double?
    public var partial:Bool?
    public var ticketTokenIds:[String] = []
    public var freedSeatIds:[Int] = []
    public var borgunRefundTransactionId:String?
    public var message:String?

    required public init(){}
}


Swift RefundRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

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: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	eventId: 0,
	refundAllForEvent: False,
	ticketTokenIds: 
	[
		String
	],
	paymentReferences: 
	[
		String
	],
	reason: String,
	userId: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	success: False,
	statusCode: 0,
	message: String,
	refundedCount: 0,
	skippedCount: 0,
	failedCount: 0,
	totalRefunded: 0,
	outcomes: 
	[
		{
			status: String,
			paymentReference: String,
			paymentId: String,
			eventId: 0,
			eventName: String,
			holderName: String,
			holderEmail: String,
			amountRefunded: 0,
			partial: False,
			ticketTokenIds: 
			[
				String
			],
			freedSeatIds: 
			[
				0
			],
			borgunRefundTransactionId: String,
			message: String
		}
	]
}