| POST | /bets/payout |
|---|
"use strict";
export class Reference {
/** @param {{id?:string,value?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
id;
/** @type {string} */
value;
}
/** @typedef {number} */
export var ProductCategory;
(function (ProductCategory) {
ProductCategory[ProductCategory["Sportsbook"] = 0] = "Sportsbook"
ProductCategory[ProductCategory["RNG"] = 1] = "RNG"
})(ProductCategory || (ProductCategory = {}));
export class ProductReference {
/** @param {{id?:string,value?:string,category?:ProductCategory,productProvider?:Reference}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
id;
/** @type {string} */
value;
/** @type {ProductCategory} */
category;
/** @type {Reference} */
productProvider;
}
export class ProductInstanceRef {
/** @param {{id?:string,name?:string,product?:ProductReference}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
id;
/** @type {string} */
name;
/** @type {ProductReference} */
product;
}
export class Origin {
/** @param {{device?:Reference,location?:Reference,locationGroup?:Reference,organization?:Reference,productInstance?:ProductInstanceRef}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {Reference} */
device;
/** @type {Reference} */
location;
/** @type {Reference} */
locationGroup;
/** @type {Reference} */
organization;
/** @type {ProductInstanceRef} */
productInstance;
}
/** @typedef {number} */
export var PaymentOrigin;
(function (PaymentOrigin) {
PaymentOrigin[PaymentOrigin["POS"] = 0] = "POS"
PaymentOrigin[PaymentOrigin["SMS"] = 1] = "SMS"
PaymentOrigin[PaymentOrigin["Internet"] = 2] = "Internet"
})(PaymentOrigin || (PaymentOrigin = {}));
export class PayoutRecap {
/** @param {{winnings?:number,taxAmount?:number,payout?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
winnings;
/** @type {number} */
taxAmount;
/** @type {number} */
payout;
}
export class BetPayout {
/** @param {{id?:string,origin?:Origin,betPaidOutAt?:string,payload?:{ [index:string]: string; },paymentOrigin?:PaymentOrigin,payoutRecap?:PayoutRecap}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
id;
/** @type {Origin} */
origin;
/** @type {string} */
betPaidOutAt;
/** @type {{ [index:string]: string; }} */
payload;
/** @type {PaymentOrigin} */
paymentOrigin;
/** @type {PayoutRecap} */
payoutRecap;
}
export class ReportBetPayouts {
/** @param {{betPayouts?:BetPayout[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {BetPayout[]} */
betPayouts;
}
JavaScript ReportBetPayouts DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /bets/payout HTTP/1.1
Host: fbihtaapi.bettor.webhop.biz
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"betPayouts":[{"id":"String","origin":{"device":{"id":"String","value":"String"},"location":{"id":"String","value":"String"},"locationGroup":{"id":"String","value":"String"},"organization":{"id":"String","value":"String"},"productInstance":{"id":"String","name":"String","product":{"id":"String","value":"String","category":0,"productProvider":{"id":"String","value":"String"}}}},"betPaidOutAt":"0001-01-01T00:00:00.0000000Z","payload":{"String":"String"},"paymentOrigin":0,"payoutRecap":{"winnings":0,"taxAmount":0,"payout":0}}]}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}