If you want to receive notifications informing you of payment status updates, you need to create on your server an URL to receive and HTTP POST request from Paybyrd and configure it in your subscription.

Set up your URL

When your server is ready to handle the notifications, you need to set up your URL into your merchant account. To achieve this you need to call the following endpoint:

curl --request PUT \
  --url https://gateway.paybyrd.com/api/v1/webhook \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: 07005f74-c87e-11eb-b8bc-0242ac130003' \
  --data '
{
  "url": "https://your-url.com/webhook"
}'

See the full API reference here.

Receive the hook from Paybyrd

In your server, you will receive a request from Paybyrd with the transactionId which the status has changed. We expect a HTTP success status response from your server, which can be 200 OK, 201 CREATED, 202 ACCEPTED, otherwise Paybyrd will consider that your server was not able to handle the notification. Paybyrd has a retry policy of 12 attempts.

This is a sample payload of the hook sent by us:

{
  "transactionId": "c1e4317c-94a2-46f5-ae95-1b79eaad9ede"
}

Once the hook is received, you may query the transaction in order to obtain detailed information about its status.


What’s Next

See how to query transactions