Proof of payment webhook

An introduction to the payment proof webhook

For customers in Mexico that need to verify documents such as utility bills, the payment proof webhook provides the payment proof data as soon as all asynchronous processes are complete and the data is available. This webhook is the recommended method for receiving payment proof data.

Triggering the payment proof webhook

In order to trigger the payment proof webhook, the following API endpoints must be called in order:

  1. First create a flow and call the start endpoint.
  2. Call the omni/add/qr-code-text endpoint. You can find additional documentation api docs here. This will add the QR code text as a custom field to the session started in step #1. Below is an example cURL request.
  3. Lastly, call the omni/process/payment-proof endpoint. Once processing is complete a webhook containing the payment proof data will be sent the URL specified in the configuration tab of the dashboard. If you haven't configured your callback URL yet, see the our webhook introduction page. Below is an example cURL request.
    curl --location --request POST 'https://demo-api.incodesmile.com/omni/process/payment-proof' \
    --header 'Accept: application/json' \
    --header 'Content-Type: application/json' \
    --header 'api-version: 1.0' \
    --header 'x-api-key: YOUR API KEY' \
    --header 'X-Incode-Hardware-Id: YOUR SESSION TOKEN' \
    --data ''
    

Endpoint Details

POST https://{your-defined-url}

Request

Below is an example of the payload that you will get when the webhook triggers

{
  "requestId": "cba1e997-sbaf-1234-abc5-n456bb2343c3",
  "rfcIssuer": "SLI1234567",
  "issuerName": "SOME ISSUER NAME",
  "rfcReceiver": "MP1231231",
  "receiverName": "SOME CLIENT NAME",
  "fiscalInvoice": "SOME FISCAL INVOICE ID",
  "issueDate": "2021-06-19T12:33:20",
  "certificationDate": "2021-06-19T12:33:20",
  "rfcPac": "MBS42143234",
  "totalCfdi": "$1,962.36",
  "voucherEffect": "Nómina",
  "cancellationStatus": "Cancelable sin aceptación",
  "validationCode": "fc413452345.34563",
  "status": "OK"
}

If you are authenticating your webhook requests , the webhook will contain the Authorization header along with the OAuth2.0 bearer token:

Authorization: Bearer <ACCESS_TOKEN>

If you configured additional custom headers, they will be included as well.

Response

To avoid our retry policy to keep sending the same notification over and over, make sure your endpoint returns one of the following:

  • Status code 204 No content
  • Status code 200 OK with a response type application/json, for example { "success" : true }
{
	"success" : true 
}