4.7 Transfers Requests
Available calls:
4.7.1 Return the history of transfers performed by an agent
Method and URL:
GET /v1/transfers/
Request Parameters:
username [ string ] (optional):
The user to get transfer from.
Must be a customer of the agent. If omitted, retrieves transfers for all users.
date_from [ ISO 8601 date string ] (optional):
Return transfers from this date on.
date_to [ ISO 8601 date string ] (optional):
Return transfers until this date.
Return Data: A list of objects with the data of the requested transfers.
Output Format:
from_username [ string ]
The MollyBet account username of the agent that performed the transfer.
to_username [ string ]
The MollyBet account username of the customer that received the transfer.
to_group [ string ]
The MollyBet account group of the customer that received the transfer.
post_date [ ISO 8601 date string ]
The date the transfer took effect.
ccy_code [ string ]
The ISO 4217 3-letters code of the currency of the transfer.
description [ string ]
The description provided when the transfer was created.
amount_from [ float ]
How much the agent sent. This is the same as the amount set when registering the transfer.
amount_to [ float ]
The negative of how much the customer received (i.e. how much was deducted from the customer's balance).
discount [ float ]
The discount applied to the transfer (how much more the customer received than the agent sent).
For every transfer, amount_to + amount_from + discount = 0.
4.7.2 Register a new transfer between the agent and a customer
Method and URL:
POST /v1/transfers/
Request Parameters:
username [ string ]:
The customer the transfer is being register for.
amount [ float ]:
The amount transferred, in the customer account currency.
Positive values represent money given by the agent to the customer; negative values represent money received by the agent from the customer.
discount [ float ] (optional, default: 0.0):
An adjustment for the new balance of the customer after the transfer, on top of the amount.
Positive values are always in the customer's favour. You send amount, they receive amount + discount.
description [ string ] (optional, default: ""):
An optional memo for the transfer.
only_if_available [ bool ] (optional, default: false):
Disallow the transfer if it would leave the customer with a negative balance.