WiPay
Payments APIv1.0.15

Payment Request

Send a payment request to WiPay's Hosted Payment Page

POST
/payments/request
account_numberinteger

WiPay merchant account number. Use 1234567890 for sandbox testing.

country_codestring

WiPay processing platform as an uppercase ISO 3166-1 alpha-2 country code. Supported: BB, GD, GY, JM, TT. This does not prefill the customer's billing-country or phone controls.

Match^[A-Z]{2}$
currencystring

ISO 4217 currency code (uppercase). Valid values can be fetched using the Supported Currencies helper endpoint; the usable values are the items in the returned JSON array.

Match^[A-Z]{3}$
environmentstring

Transaction environment. Valid values can be fetched using the Supported Environments helper endpoint; the usable values are the items in the returned JSON array.

Value in"live" | "sandbox"
fee_structurestring

Determines who pays the processing fee. Valid values can be fetched using the Supported Fee Structures helper endpoint; the usable values are the keys of the returned JSON object.

Value in"customer_pay" | "merchant_absorb" | "split"
methodstring

Payment method. credit_card_co uses the full WiPay checkout page. 3co_simple uses a simplified WiPay checkout page designed for iframe or redirect flows. The legacy value credit_card is deprecated and should not be used for new integrations.

Value in"credit_card_co" | "3co_simple"
order_idstring

Your unique order identifier. Alphanumeric, hyphens, and underscores. Must not begin or end with - or _. Recommended max length: 16.

Match^(?![_-])[a-zA-Z0-9_-]+(?<![_-])$
originstring

Your application identifier.

Match^(?![_-])[a-zA-Z0-9_-]+(?<![_-])$
Length1 <= length <= 32
response_urlstring

URL that receives the transaction response redirect.

Formaturi
Length1 <= length <= 255
totalnumber

Transaction amount (2 decimal places). Must be within the min/max limits for the selected currency.

emailstring

Customer email address. Must differ from the merchant's registered email.

Formatemail
Lengthlength <= 50
data?string

Optional integrator-supplied pass-through string echoed in the transaction response and webhook payloads. JSON is recommended for structured values but not required.

Lengthlength <= 4096
version?string

Your application version. Semantic Versioning recommended (e.g. 1.0.0).

Lengthlength <= 16
fname?string

Customer first name.

Lengthlength <= 30
lname?string

Customer last name. Requires fname.

Lengthlength <= 30
name?string

Customer full name (alternative to fname+lname). Auto-split on last space.

Lengthlength <= 60
addr1?string

Billing address line 1.

Lengthlength <= 50
addr2?string

Billing address line 2. Requires addr1.

Lengthlength <= 50
city?string

Billing city.

Lengthlength <= 30
state?string

Billing state/province ISO 3166-2 code. Valid values can be fetched using the Get States/Subdivisions helper endpoint; the usable values are the keys of the returned JSON object.

Lengthlength <= 30
zipcode?string

Billing postal/zip code.

Lengthlength <= 10
country?string

Optional customer billing country as an uppercase ISO 3166-1 alpha-2 code. For credit_card_co and 3co_simple, prefills both the Billing Country and phone dialing-country selectors; for the United States, use US. A complete valid E.164 phone value overrides this value only for the phone selector.

Match^[A-Z]{2}$
phone?string

Optional customer phone number in E.164 format. A complete valid E.164 number prefills the phone field and selects its matching dialing country, overriding country only for the phone selector.

Match^\+[1-9]\d{1,14}$

Response Body

curl -X POST "https://tt.wipayfinancial.com/plugins/payments/request" \  -H "Content-Type: application/json" \  -d '{    "account_number": 1234567890,    "country_code": "TT",    "currency": "TTD",    "environment": "sandbox",    "fee_structure": "customer_pay",    "method": "credit_card_co",    "order_id": "order123",    "origin": "MyApp",    "response_url": "https://example.com/payment/callback",    "total": 25,    "email": "user@example.com"  }'
{
  "url": "https://tt.wipayfinancial.com/checkout/payment?...",
  "message": "OK",
  "transaction_id": "SB-12-1-order123-20260310120000"
}
{
  "url": "https://example.com/payment/callback?status=error&reasonDescription=...",
  "message": "The country code field is required.",
  "transaction_id": ""
}
{
  "message": "string",
  "url": "http://example.com",
  "transaction_id": "string"
}

Checkout Prefill

The country-related request fields have separate purposes:

  • country_code selects the WiPay processing platform. Use the platform associated with the merchant account, such as JM; do not change it to represent the customer's billing country.
  • country optionally prefills the customer's Billing Country selector and the phone dialing-country selector. Use an uppercase ISO 3166-1 alpha-2 code such as US.
  • phone optionally prefills the phone field. A complete valid E.164 number selects its matching dialing country instead of the country value for the phone selector.

For example, a payment processed on the Jamaica platform for a customer with a United States billing address and phone number can include:

{
  "country_code": "JM",
  "country": "US",
  "phone": "+12025550123"
}

For both credit_card_co and 3co_simple, country sets both selectors when phone is omitted or is not a complete valid E.164 number. A complete valid E.164 phone value overrides country only for the phone selector; country continues to set the Billing Country selector. For AVS requests, provide a valid state when the selected billing country has subdivisions; use Get States/Subdivisions to retrieve accepted values.

Notes

  1. The transaction_id is assigned at the time of the request, before the customer completes checkout.
  2. The sandbox API Key is 123, but it is used only for server-side hash verification, not as the request account_number.
  3. A successful request response only means WiPay created the hosted checkout session and assigned a transaction-attempt reference. Do not treat that response as payment confirmation. Wait for the redirect to your response_url and verify the result server-side.
  4. A transaction attempt can remain pending briefly while WiPay waits for the gateway's final result. See Hosted Checkout Flows for the hosted-checkout lifecycle.
  5. If you also consume Payments API webhooks, use the browser redirect for the immediate checkout result and the webhook event for later lifecycle changes.
  6. Use data for integration-specific context you want echoed back after checkout, such as a cart ID or invoice ID. JSON is recommended for structured values but not required. See Pass-Through Data.