Ginger Payments

Transaction report

Search your orders and download them as a CSV transaction report through the Ginger Payments API.

Use the search endpoint to find orders and download them as a CSV report, for example for your bookkeeping or reconciliation. Send a POST request to /v1/search/orders/ with a query. Add ?format=csv to get CSV instead of JSON.

curl "https://api.dev.gingerpayments.com/v1/search/orders/?format=csv" \
  --user "$API_KEY:" \
  --header "Content-Type: application/json" \
  --data '{
    "query": "*"
  }' \
  --output orders.csv

The query * returns all orders.

Request fields

FieldDescription
querySearch query. * matches all orders. See Filter results.
sizeNumber of results per page.
startPosition of the first result, for simple paging.
sortField and direction to sort on, for example created asc.
search_afterCursor for paging through large result sets. See Page through large results.

Filter results

Filter on a field with field:value. Filter on a range with field:[from TO to].

GoalQuery
All orders*
Only completed ordersstatus:completed
Orders created on one daycreated:[2026-09-01 TO 2026-09-01]
curl "https://api.dev.gingerpayments.com/v1/search/orders/?format=csv" \
  --user "$API_KEY:" \
  --header "Content-Type: application/json" \
  --data '{
    "query": "status:completed"
  }'

Page, limit and sort

Use start and size to page through results, and sort to order them:

curl https://api.dev.gingerpayments.com/v1/search/orders/ \
  --user "$API_KEY:" \
  --header "Content-Type: application/json" \
  --data '{
    "query": "*",
    "size": 100,
    "start": 1,
    "sort": "created asc"
  }'

Simple paging returns at most 10,000 results. For more, use search_after.

Page through large results

search_after works like a cursor, so you can page through more than 10,000 results.

Send the first request

Set search_after to "-1":

curl https://api.dev.gingerpayments.com/v1/search/orders/ \
  --user "$API_KEY:" \
  --header "Content-Type: application/json" \
  --data '{
    "query": "*",
    "size": 100,
    "search_after": "-1",
    "sort": "created asc"
  }'

The response contains a sort value.

Request the next page

Send the same request with the sort value of the previous response in search_after:

curl https://api.dev.gingerpayments.com/v1/search/orders/ \
  --user "$API_KEY:" \
  --header "Content-Type: application/json" \
  --data '{
    "query": "*",
    "size": 100,
    "search_after": "1234566",
    "sort": "created asc"
  }'

Repeat

Keep using the latest sort value until you have all the results you need.

Keep in mind:

  • Use the same sort in every request, so the results stay in order.
  • Use the same size in every request.
  • Use either start or search_after, never both.

Report columns

Every row of the CSV report is one transaction, together with the fields of its order. The report has many columns; these are the most important ones:

ColumnDescription
idOrder ID.
merchant_order_idYour own order reference.
created, completedWhen the order was created and completed.
currency, amountCurrency and amount of the order, in the smallest currency unit.
statusOrder status.
transaction.idTransaction ID.
transaction.statusTransaction status.
transaction.payment_methodPayment method, such as credit-card.
transaction.payment_method_brandCard brand, such as visa or mastercard.
transaction.amount_with_decimalsTransaction amount in the main currency unit, such as 9.95.
transaction.credit_debitDirection of the money: credit for a payment you receive, debit for money going out, such as a refund or a payout.
transaction.refund_of_transaction_idFor a refund: the ID of the original transaction.
transaction.payment_method_details.truncated_panMasked card number.
transaction.settlement_currency, transaction.settlement_amountCurrency and amount of the settlement.
transaction.fee_currency, transaction.fee_amountCurrency and amount of the fee.
customer.merchant_customer_idYour own customer reference.
merchant_id, project_idYour merchant and project.

A shortened example with a few of the columns:

id,merchant_order_id,created,currency,amount,status,transaction.id,transaction.payment_method,transaction.payment_method_brand,transaction.status,transaction.amount_with_decimals
8bb4c444-66ea-4eba-b7c8-fb7ae32bb4fe,EXAMPLE001,2026-10-09T10:43:13.905092+00:00,GBP,995,completed,e0b704ee-e0de-4aec-9e4c-dc597e54418d,credit-card,visa,accepted,9.95
21c22e76-8d87-4312-a8c0-544e8e9fc09d,EXAMPLE002,2026-10-09T10:46:56.076889+00:00,GBP,975,error,53d4a698-50e2-4325-b036-0cff44062b5b,credit-card,mastercard,declined,9.75

On this page