Skip to main content
Message encoding prevents errors and ambiguity caused by special characters during transmission. Proper encoding ensures data integrity across all API communications.

Encoding Requirements

Byte Data (Signatures & Encrypted Content)

All binary data including signatures and encrypted content must be Base64 encoded before transmission. Method: Base64 encoding

HTTPS URL Data

URLs must be percent-encoded before transmission to handle special characters correctly. Method: URL encoding (percent-encoding)

Character Sets

Request Body

  • Encoding: UTF-8
  • Content-Type: application/json; charset=UTF-8
All JSON request bodies should be UTF-8 encoded. Special characters in string values are automatically handled by JSON serialization.

Signature Calculation

When calculating signatures, the content to be signed must be properly encoded:
1

Construct String

Build the string to sign from HTTP method, URI, headers, and body
2

Encode to Bytes

Convert the string to UTF-8 bytes
3

Sign

Apply RSA-SHA256 signature algorithm
4

Base64 Encode

Encode the binary signature as Base64

Common Encoding Scenarios

Best Practices

Double Encoding: Be careful not to encode data twice. If you URL-encode a value and then include it in a JSON body that gets URL-encoded again, you’ll have double-encoded data that won’t decode correctly.