openapi: '3.0.0' info: description: This is the betmarket offline wallet API title: Betmarket Offline Wallet API version: "1.0" servers: - url: /api components: schemas: SupplierTransactionResponse: properties: transactionId: type: string type: object securitySchemes: OAuth2: type: oauth2 flows: clientCredentials: tokenUrl: https://betmarket-auth.int.oap.betmarket.se/api/oauth/token scopes: write:gametransaction: Grants ability to send transactions to offline wallet security: - OAuth2: [] paths: /suppliers/{supplierId}/transactions: description: Add a transaction to offline wallet parameters: - description: Supplier ID in: path name: supplierId schema: type: string required: true post: security: - OAuth2: [write:gametransaction] requestBody: description: Transaction required: true content: application/x-www-form-urlencoded: schema: type: object required: - supplierTransactionId - supplierBindingId - type - amount - currency properties: supplierTransactionId: description: Supplier assigned transaction ID type: string supplierBindingId: description: ID binding multiple transactions to the same entity, e.g. WAGER and RESULT for same game round type: string supplierReference: description: Reference used in game supplier API to take actions on a wager, e.g. cancelations type: string token: description: Token used to create session, required for WAGER and PURCHASE type: string type: description: Type of transaction type: string enum: - WAGER - RESULT - PURCHASE - REFUND - CLAIM_TO_AGENT amount: description: Amount, e.g. 10.54 type: string currency: description: Currency, e.g. EUR type: string ticketName: description: When type is WAGER, name of ticket e.g. name of lottery type: string ticketDescription: description: When type is WAGER, description of ticket e.g. numbers chosen for a lottery type: string ticketData: description: When type is WAGER, description of ticket in a structured way, e.g. numbers chosen for a lottery type: object responses: "200": description: Transaction is accepted content: application/json: $ref: '#/components/schemas/SupplierTransactionResponse' "400": description: Bad arguments