API Reference

Configuring Webhooks

Use the Flow1st Console to generate the Webhooks for your integrations

Overview

Webhooks are configured in order to notify the Flow1st Partner’s backend server on the final status of an order.

List of Webhooks

The following table describes the Webhook and Callback configuration required for a Flow1st Integration.

HTTP Headers

Header NameDescription
AccessTokenThis is the Access Token field returned from the Authentication - Generate Access Token response. This should be in the format Bearer <AccessToken>
Content-Typeapplication/json
X-SIGNATUREThis is the header that will contain the signature of the request. Refer to the Generating Signatures section above
X-TIMESTAMPThis is the current time in ISO-8601 format. This should be the same timestamp as the one used to generate the Signature

Order Complete Webhook Event List of Fields

Name

Type

Mandatory

Description

reference

String

Y

The recipientIdentifier that was sent in the response of the Complete Order Request

externalReference

Number

Y

The externalReference that was sent in the Complete Order Request

quantity

Number

Y

The quantity that was sent in the Complete Order Request

recipientIdentifier

String

Y

The recipientIdentifier that was sent in the Complete Order Request

email

String

Y

The email that was sent in the Complete Order Request

voucherCodes

Array of VoucherCode

N

If the product in the order is a voucher based product (i.e. it requires voucher codes), then this webhook will return the codes as a list of VoucherCode objects equal to the quantity of VoucherCodes requested for the product

status

String

Y

The status of an order. Possible values:

  • NEW
  • ABANDONED
  • CANCELLED
  • PENDING
  • PARTIALLY_FULFILLED
  • SUCCESSFUL
  • FAILED
  • REFUND
  • PARTIAL_REFUND
  • CHARGEBACK

VoucherCode Fields

NameTypeMandatoryDescription
VoucherCodeArray of VoucherCodePropertyYThis is a list of VoucherCodeProperty objects that make up the voucher code. All VoucherCodeProperty objects combined represent one VoucherCode.

VoucherCodeProperty Fields

Partners need to assume that VoucherCodeProperty objects will be different per product as each product uses a different set of properties for their codes.

NameTypeMandatoryDescription
labelStringYThis is the name of the voucher code property (e.g. PIN, Code, etc.)
valueStringYThis is the actual value of the property

Example Order Complete Webhook Payload

{
 "reference": "C-1239884379-P",
 "externalReference": "EXT-87456321",
 "productBundleSku": "BUNDLE-SKU-001",
 "quantity": 1,
 "recipientIdentifier": "USER-998877",
  "email": "[email protected]",
  "voucherCodes": [
     [
       {
         "label": "Code",
         "value": "444100070555"
       }
     ]
    ],
 "status": "PENDING"
}