Ginger Payments

API reference

Every endpoint of the Ginger Payments API, with its fields, examples and responses.

The Ginger Payments API is a REST API with JSON requests and responses. The documentation explains how to combine the endpoints into a working integration; this reference describes each endpoint in detail.

Base URLs

URLUse it for
https://api.dev.gingerpayments.comEvery endpoint, except storing cards.
https://tokens.dev.gingerpayments.comStoring cards in the card vault, for card details you collect yourself. Never send card data to https://api.dev.gingerpayments.com.

The API is only available over HTTPS with TLS 1.2 or newer.

Authentication

Authenticate every request with HTTP Basic authentication. Your project's API key is the username, and the password is empty:

curl https://api.dev.gingerpayments.com/v1/orders/$ORDER_ID/ \
  --user "$API_KEY:"

Keep your API key secret

The API key gives full access to your project. Only use it from your server. Never put it in a browser, mobile app or public repository.

Responses and errors

A 2xx response means Ginger Payments accepted your request, not that the payment succeeded: check the status of the order. Rejected requests return an error object with the HTTP status, a type and a short explanation in value.

See API basics for all status codes and error types.

Endpoints

On this page