API Reference

Creating pay demands to request payments for your users

Once you have configured Webhooks and onboarded your users, you can collect payments there are two ways to achieve this:

Add new Pay Demand for a User

To initiate a pay demand for an individual payment, you should specify a reference to clarify the payment's purpose for the payee. Additionally, you have the option to attach custom metadata, which will be included in the webhook events related to this payment.

{
  "request": {
    "currency": "GBP",
    "metadata": {
      "amount": "4242",
      "organisationId": "bad65947-f9af-40a5-b799-edaea3602acf"
    },
    "reference": "INV-00042",
    "amount": "42.42"
  },
  "idempotencyId": "a7835447-2bba-4012-9988-8336b141a09e"
}

{
  "payDemandId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "payeeName": "John Doe",
  "reference": "INV-00042",
  "currency": "GBP",
  "amount": "42.42",
  "paymentUri": "https://app.sandbox.crezco.com/payment/pIkRoi0240uVFKydXKeyqA",
	"metadata": {
      "amount": "4242",
      "organisationId": "bad65947-f9af-40a5-b799-edaea3602acf"
    }
}

If the request is successful, you can then either redirect the payer to the paymentUri where they will be able to pay your user. Or alternatively if you wish to add custom redirect parameters, you can create a custom redirect payment link and then forward the payer to the redirect URI in the response.