Deposit Query
SportsPay's Deposit Query lets you retrieve information about deposits, including the individual transactions in each deposit.
1. Deposit List
Retrieve the deposits made after a given deposit. This is useful for reconciliation: store the last deposit number you processed and ask for everything after it.
1.1 Deposit List Request
The minimum required information is the merchant's Terminal ID (TERMID), Password (PASS), TYPE=Q and SUBTYPE=DL.
Optionally include LASTDEP, the last deposit number you already have. For example, LASTDEP=10031 returns deposit 10032 onwards. If you omit LASTDEP, or send a deposit number that doesn't exist, you get the merchant's entire deposit history.
Refer to Deposit Query API Reference
Example Deposit List Request:
curl --request POST \
--url {gateway_endpoint}/ \
--header "Content-Type: application/json" \
--data '{
"TERMID": "your_termid",
"PASS": "your_pass",
"TYPE": "Q",
"SUBTYPE": "DL",
"LASTDEP": "10031"
}'Response
TEXT:DEPOSIT LISTon success, or the error message.CODE:0000on success; any other code is an error.MERCHID: Merchant ID.PREVDEP: TheLASTDEPyou sent.NEWDEP: Array of deposits, each containing:DEPNUM: Deposit number.DATE: Deposit date.AMOUNT: Deposit amount.NUMITEMS: Number of items in the deposit.
2. Deposit Info
Retrieve a specific deposit, optionally with the transactions it contains, or find the deposit a transaction was paid in.
2.1 Deposit Info Request
At a minimum, include TERMID, PASS, TYPE=Q and SUBTYPE=DI, plus one of the following:
DEPNUM: the deposit number. AddBLOCKto control whether items are included (see below).GATEREF: the gateway reference of a transaction. Returns the summary of the deposit it was paid in.REFNUMandAUTHNUM: the reference and authorization numbers of a transaction. Returns the summary of the deposit it was paid in.
Summary or detail (DEPNUM only)
Deposit items are returned in blocks of 10. BLOCK=0 returns the summary only. BLOCK=1 returns the summary plus the first 10 items, BLOCK=2 the next 10, and so on. NUMBLOCKS in the response tells you how many blocks there are. If you omit BLOCK, the default is BLOCK=1.
Refer to Deposit Query API Reference
Example Deposit Info Request (Summary):
curl --request POST \
--url {gateway_endpoint}/ \
--header "Content-Type: application/json" \
--data '{
"TERMID": "your_termid",
"PASS": "your_pass",
"TYPE": "Q",
"SUBTYPE": "DI",
"DEPNUM": "10032",
"BLOCK": "0"
}'Example Deposit Info Request (Detail):
curl --request POST \
--url {gateway_endpoint}/ \
--header "Content-Type: application/json" \
--data '{
"TERMID": "your_termid",
"PASS": "your_pass",
"TYPE": "Q",
"SUBTYPE": "DI",
"DEPNUM": "10032",
"BLOCK": "1"
}'Example Deposit Info Request using GATEREF:
curl --request POST \
--url {gateway_endpoint}/ \
--header "Content-Type: application/json" \
--data '{
"TERMID": "your_termid",
"PASS": "your_pass",
"TYPE": "Q",
"SUBTYPE": "DI",
"GATEREF": "Bk3x9m2q7w4t8pz"
}'Example Deposit Info Request using REFNUM & AUTHNUM:
curl --request POST \
--url {gateway_endpoint}/ \
--header "Content-Type: application/json" \
--data '{
"TERMID": "your_termid",
"PASS": "your_pass",
"TYPE": "Q",
"SUBTYPE": "DI",
"REFNUM": "0000960102",
"AUTHNUM": "06638I"
}'Response
TEXT:DEPOSIT INFOon success, or the error message.CODE:0000on success; any other code is an error.MERCHID: Merchant ID.DEPNUM: Deposit number.DEPDATE: Deposit date.AMOUNT: Total amount of the deposit.NUMITEMS: Number of items in the deposit.DATE,TIME,DUR: When the query was processed and how long it took.
When items are included (DEPNUM with BLOCK of 1 or more), the response also contains:
BLOCK: The block returned.NUMBLOCKS: Total number of blocks.ITEMS: The transactions in this block, each containing:TERMID: Terminal ID of the transaction.TYPE: Transaction type (e.g.,SALE).CARDNUM: Masked card number.CHARGED: Amount charged.WITHHELD: Amount withheld.DEPOSITED: Amount deposited.GATEREF,REFNUM,AUTHNUM,INVOICE: The transaction's references, where available.
Updated 10 days ago
