Start single payment

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Optional payment parameters

Use customerIp to supply the customer's IP address for country-based routing. When it is omitted or empty, Truegate uses the API request's IP address, which may be your backend server's address.

customPaymentDescriptor overrides the default project-name payment descriptor. dynamicConditions supplies string values for routing conditions configured for your project. It accepts at most 16 keys, with at most 64 characters per key or value; matching trims and lowercases keys and values. Keys must be unique after normalization. These optional fields and metadata are not included in the request signature.

email and externalUserId each accept at most 255 characters.

Additional customer fields

The response can include requiredFields, an array of { name, type } entries, where type is string or number. Forward it to your frontend along with transactionId. Collect the requested values before card submission and pass them to the SDK through userDetails; for example, Razorpay requires phone and zipcode. See Additional customer fields.

Errors

When the payment cannot be started, Truegate explains why. An unknown projectId also returns 404, without error. The response is 404 with a stable error.code and a readable error.details.message:

{
  "statusCode": 404,
  "timestamp": "2026-10-15T21:05:44.908Z",
  "path": "/api/v1/pay/start",
  "message": "No payment route supports currency SGD",
  "error": {
    "code": "ROUTE_CURRENCY_NOT_SUPPORTED",
    "details": {
      "message": "No payment route supports currency SGD",
      "mismatchedConditions": ["currency"]
    }
  }
}

mismatchedConditions is present for routing errors only. Values: country, currency, amount, dynamicConditions. The customer country is detected from customerIp, or from the request IP when customerIp is not sent.

CodeMeaningWhat to check
ROUTING_NOT_CONFIGUREDYour project has no routing rules.Add a routing rule to the project.
ROUTE_COUNTRY_NOT_SUPPORTEDNo routing rule accepts the customer country.Add the country to a routing rule, or check customerIp.
ROUTE_CURRENCY_NOT_SUPPORTEDNo routing rule accepts the currency.Add the currency to a routing rule, or charge in a supported currency.
ROUTE_AMOUNT_OUT_OF_RANGEThe amount is outside the limits of every routing rule.Adjust the rule's minimum or maximum amount.
ROUTE_DYNAMIC_CONDITIONS_NOT_MATCHEDdynamicConditions do not match any routing rule.Send the keys and values your routing rules expect.
ROUTE_CONDITIONS_NOT_MATCHEDNo routing rule matches all conditions at once. mismatchedConditions lists them.Make one rule accept all listed conditions.
NO_PAYMENT_METHODS_AVAILABLEA routing rule matches, but it has no active payment methods.Enable a payment method on the matching rule.

Use error.code in your integration; message texts can change.

Request signature

Sign only these fields, in order:

projectId → externalUserId → email → currency → amount

See Signing requests for the HMAC-SHA-256 algorithm and code example.

Body Params

Send me a signed request

string
required
string
required
string
required
length ≤ 255
string
required
length ≤ 255
string
enum
required

Currency codes accepted by the API. Availability for a payment depends on the project, product plan, and payment processor configuration.

string
required
metadata
object
string

Customer IP address used to determine the customer country for payment routing. If omitted or empty, the API uses the request IP address. Not included in the request signature.

string

Optional payment descriptor sent to the payment processor. If omitted or empty, the subscription plan name is used for a subscription payment, or the project name for a single payment. Not included in the request signature.

dynamicConditions
object

Optional values for configured payment routing conditions. At most 16 keys; each key and value is at most 64 characters. Keys and values are trimmed and lowercased for matching. Keys must be unique after that normalization. This field is not included in the request signature.

Responses

Language
LoadingLoading…
Response
Choose an example:
application/json