API Reference

On this page:

Sections

The following sections detail the contents of the POSTs and responses, between your server and ours. The format and size of each field is given, along with accepted values and characters.

Overview

All transactions are synchronous HTTPS POSTs sent from a script on your servers to the Opayo gateway. The same script reads the Response component of the POST to determine success or failure.

POSTs can be sent using any HTTPS compatible objects including:

  • cURL in PHP
  • HttpWebRequest in.NET
  • Apache HttpComponents in Java

Data is sent as URL Encoded Name=Value pairs separated with ampersand (&) characters and sent to the Opayo Server URL with a Service name set to the message type in question.

 

Note: Please ensure you send your requests with the Content-Type header: application/x-www-form-urlencoded

 

Character and String Validation

The format and length of each field is detailed with example strings, values, and the valid characters listed in the following table.

Characters

Symbols and their descriptions

Characters

Description

0 to 9

 Digits

0 to 99

 Digits from zero to 99

Uppercase A to Z

 Uppercase letters

Mixed case A to z

 Letters

á

 Letters and accents

@

 At symbol

#

 Hash or pound symbol

$

 Dollars

^

 Carets

&

 Ampersands

*

 Asterisks

( )

 Parentheses

_

 Underscores

-

 Hyphens

+

 Plus

=

 Equals

{ }

 Curly brackets

[ ]

 Square brackets

:

 Colons

;

 Semi-colons

"

 Double quotes

|

 Pipes or vertical bars

/ \

 Forward and Back-slashes

~

 Tildes

,

 Commas

.

 Periods

?

 Question marks

!

 Exclaimation marks

 

 Spaces

CRLF

 Carriage Return or Line Feed (New Line)

 

Strings

Valid strings

Value

Description

BASE64

Valid Base64 characters including letters, digits, plus and forward slash

BOOLEAN

  • True or False

  • 0 or 1

HTML

Valid HTML with no active content. Script will be filtered. Includes all valid letters, numbers, punctuation and accented characters

ISO639

ISO 639-2 (2-letter language codes)

ISO3166

ISO 3166-1 (2-letter country codes)

ISO4217

ISO 4217 (3-letter currency codes)

RFC1738

RFC 1738 compliant HTTP(S) URL. Non-compliant characters should be URL encoded. For example spaces encode to %20.

RFC532N

RFC 5321/5322 (see also RFC 3696). Compliant email addresses.

US

Valid 2-letter US States