MG+ K2 Common Wallet API Integration Quick Guide
Breadcrumbs

Wallet Transactions - Withdraw

This request is used to withdraw player funds from the platform.

  1. Find your API URL. This can be found in MG+ Backoffice, or given to you by your Account Manager.

    image-20240327-075225.png
  2. Create a request.

    1. Replace the URL with your API URL and DemoAgent with your Agent Code.

      1. In the request example, this is the api-demo.k2net.io and the DemoAgent portions of the endpoint.

    2. Set the Authorization token to be your STS Token.

      1. In the request example, this is the (STS Token) portion of the request header.

Request Example

POST https://api-demo.k2net.io/api/v1/agents/DemoAgent/WalletTransactions


Request Headers

Content-Type: application/x-www-form-urlencoded
Authorization: (STS Token)


Request Body

{
  playerId: "playerId"
  type: "Withdraw"
  amount: "100"
  idempotencyKey: "e0cf53a1-5a95-47ff-b661-a1ba44db9fde"
  externalTransactionId: "425079f4-c9cf-4739-ba8e-7a53a25c2ed2TEST"
}


  1. You should receive a 201 response.

Response Example

201 Response Body Example

JSON
{
  "details": [
    {
      "product": "SMG",
      "status": "Succeeded",
      "amount": 100.0000
    }
  ],
  "idempotencyKey": "e0cf53a1-5a95-47ff-b661-a1ba44db9fde",
  "id": "0355D0630199430B0001000000002F04CDA8",
  "status": "Succeeded",
  "type": "Withdraw",
  "playerId": "playerId",
  "amount": 100.0000,
  "externalTransactionId": "425079f4-c9cf-4739-ba8e-7a53a25c2ed2TEST",
  "createdDateUTC": "2022-02-16T06:28:38.613",
  "uri": "https://api-demo.k2net.io/api/v1/agents/DemoAgent/WalletTransactions/0355D0630199430B0001000000002F04CDA8"
}


Checklist

  • Did you use the correct API URL from your Account Manager or MG+ Backoffice?
  • Did you put /api/v1/ after your API URL?
  • Did you use the POST method?
  • Did you put the STS Token in the Authorization request header?
  • Have you included all the required parameters?