Support

A typical Fleapay API callback

  1. How do I use a callback?
  2. What does the callback object look like?

How do I use a callback?

  1. First, you must specify your callback server (URI) in your account settings.
  2. Your callback server must handle two types of requests: HTTP GET and HTTP POST
  3. Fleapay will make HTTP GET request to your callback URI when a user completes a transaction.
    Note: the expected response should be a callback object.
  4. The received object parameter 'callback_uri' can either specify another location for the POST to occur or it can use the original callback URI. If no response is received, Fleapay will default to the original callback URI
  5. After a successful transaction, Fleapay servers will notify your server of changes by issuing a HTTP POST to your 'callback_uri'.
    Note: the expected response should be an order object.
  6. Your users will then be taken back to the 'return_uri'. If the object was not received in the HTTP GET request, Fleapay will fallback to the originator URI (or referrer).


What does the callback object look like?

The expected response content-type is JSON. Acceptable MIME types are the following:

  • application/json (RFC-4627)
  • application/x-javascript
  • text/javascript
  • text/x-javascript
  • text/x-json
        
{
    callback_uri: "http://www.mysite.com/fleapay_callback_uri",
    return_uri: "http://www.mysite.com/successful_transaction"
}
    	
    

 

Company

Stay in touch

Get help

Email us