Skip to main content

Conventions

This section outlines the key conventions used across Purse API, including URLs, data formats, regional standards, and phone formats.

API URLs

Purse API provides separate URLs for Preproduction and Production environments:

Preprod API URL

Use this URL for testing and development in the Preprod environment:

  • https://api.purse-sandbox.com

Prod API URL

Use this URL for live transactions in the Prod environment:

  • https://api.purse-live.com

IP Information

Purse API uses specific IP addresses when sending webhook notifications to your configured endpoints.

API Webhook IPs

Production:

  • 34.22.174.22
  • 34.89.137.175
  • 34.155.54.71

Preproduction:

  • 35.195.66.77
  • 34.141.13.87

Dashboard IPs

Production:

  • 34.76.246.8

Preproduction:

  • 34.77.104.205
Dashboard IPs

Dashboard IPs can be used by merchant to deposit files into SFTPs or GCP buckets.

Data Format

Purse API sends and receives data in JSON format.

Ensure all requests and responses conform to valid JSON structures.

Financial Amounts

Amounts must be sent in the smallest currency unit (e.g., cents for EUR/USD).

Example:

  • 42.99 EUR is represented as 4299 in API requests.
Currency Precision Warning

Currencies have different decimal places:

  • EUR (Euro)2 decimal places (1.23 EUR123)
  • JPY (Japanese Yen)0 decimal places (500 JPY500)
  • KWD (Kuwaiti Dinar)3 decimal places (4.567 KWD4567)

Refer to the ISO 4217 standard for details.

Country & Region Codes

Country Codes

Follow the ISO 3166-1 alpha-2 standard.
Example:

  • FranceFR
  • United StatesUS

Province Codes

Follow the ISO 3166-2 standard for subdivisions.
Example:

  • Hauts-de-France (France)FR-HDF
  • California (USA)US-CA

Language & Locale

Language Codes

Follow the ISO 639-1 standard.
Example:

  • Frenchfr
  • Englishen

Locale Codes

Follow the BCP-47 standard, combining language + country.
Example:

  • French in Francefr-FR
  • English in Canadaen-CA

Date & Time Format

Purse API uses ISO-8601 date formats, including timezone information.

Example formats:

  • UTC Time: 2023-10-30T15:40:00Z
  • With Timezone: 2023-10-30T15:40:00+02:00
Why include timezones?

Since Purse operates across multiple countries, providing timezone information ensures accurate transaction logging.

Currency Codes

Currencies follow the ISO-4217 standard.

Examples:

  • Euro (EUR)EUR
  • US Dollar (USD)USD
  • Japanese Yen (JPY)JPY

Phone Number Format

Phone numbers follow the E.164 international standard.

Format:

  • [+][country code][subscriber number including area code]
  • Maximum 15 digits

Examples:

  • France: +33612345678
  • USA: +14155552671
  • Mexico: +526645951538

Summary of Conventions

FeatureStandard Used
API URLshttps://api.purse-sandbox.com/ (Preprod) / https://api.purse-live.com/ (Prod)
Data FormatJSON
Financial AmountsCurrency minor unit (e.g., 42.99 EUR4299)
Country CodesISO 3166-1 alpha-2
Province CodesISO 3166-2
Language CodesISO 639-1
Locale CodesBCP-47
Datetime FormatISO-8601
Currency CodesISO-4217
Phone FormatE.164