⚙️Make a payment using Vendor Pay

Use Vendor Pay to schedule payments to vendors and suppliers and consolidate multiple payment requests into a single payment.

When you create a Vendor Pay payment request, assign it a scheduler. The scheduler determines when the request becomes eligible for processing. Vitesse groups eligible requests that share the same schedule, source account and stored recipient, then checks available funds.

If the available funds cover only some requests, Vitesse processes those it can fund and keeps the remaining requests queued until more funds become available. The schedule sets when processing can begin; it does not specify when the vendor will receive the funds.

Endpoints

EnvironmentMethod and URL
StagingPOST https://api.staging.vitesse.io/v1/payment-initiation/paymentRequests
Production – UK HubPOST https://api.vitesse.io/v1/payment-initiation/paymentRequests
Production – US HubPOST https://api.us.vitesse.io/v1/payment-initiation/paymentRequests

For help choosing an environment, see ⚙️Environments.

Access requirements

Configure the following access:

OAuth scopeIdentity client role
payment-requestspayment-requests.manager

For more information about scopes, see ⚙️Authentication. For information about the access granted by specific roles, see Identity client roles.

Before you begin

  • Identify the account the payment should come from.
    Use List accounts to find the account and its AccountId.

  • Find the vendor's details. Obtain its Vitesse-assigned StoredRecipientId or your organisation's ExternalStoredRecipientId.
    Use Stored recipients to create or find the vendor's details.

  • Identify the configured scheduler that will determine when the payment request is sent.
    Use List schedulers​ to find the scheduler. You can use your organisation's default scheduler or specify another scheduler by its PaymentSchedulerId.

Prepare the payment request

  1. Use the steps in Make a payment to build each request, including references and custom metadata.
  2. For Vendor Pay, reference a stored recipient and include a Scheduler object to specify the payment schedule, as described below:

    Reference the stored recipient

    Supply the vendor’s stored recipient identifier in StoredRecipient. Use StoredRecipientId for the identifier assigned by Vitesse:

    "StoredRecipient": {
      "StoredRecipientId": "d872b36a-8e54-4c19-a627-9f03b1256e48"
    }

    Alternatively, use ExternalStoredRecipientId for your organisation's identifier for that stored recipient:

    "StoredRecipient": {
      "ExternalStoredRecipientId": "VENDOR-1042"
    }

    Supply only one stored recipient identifier per request. The stored recipient must contain the details required for the chosen payment method, destination country and currency.

    Choose a scheduler

    To use your organisation's default scheduler, include:

    "Scheduler": {
    "Default": true
    }

    To use a specific scheduler, include its identifier:

    "Scheduler": {
      "PaymentSchedulerId": "880e8400-e29b-41d4-a716-446655440003"
    }

    Supply only one scheduler.

    📘

    Changing a scheduler does not change the scheduling already applied to existing payment requests.

    Changes to a scheduler apply to new payment requests. Existing requests keep their original scheduled processing time. To use a different schedule for an existing request, cancel the request if its status permits cancellation. Confirm that Vitesse cancelled it before creating a replacement request using the scheduler you want.

Send the request

This example uses Staging to request a payment of 183.47 GBP to a stored recipient using the default scheduler:

curl --request POST \
  --url 'https://api.staging.vitesse.io/v1/payment-initiation/paymentRequests' \
  --header 'Authorization: Bearer <access-token>' \
  --header 'Content-Type: application/json' \
  --header 'Accept: application/json' \
  --data '{
    "SendAccountId": 3761,
    "SendCurrency": "GBP",
    "ReceiveCurrency": "GBP",
    "SendValue": 183.47,
    "PaymentMethod": "BankAccount",
    "StoredRecipient": {
      "StoredRecipientId": "d872b36a-8e54-4c19-a627-9f03b1256e48"
    },
    "Scheduler": {
      "Default": true
    },
    "PaymentDescription": "Vehicle repair",
    "RecipientReference": "INV-5838386",
    "ExternalReference1": "CLAIM-123456",
    "ExternalReference2": "INV-5838386"
  }'

Replace <access-token> with a valid access token that contains the required scope, and any example values with your own details.

Submit further payment requests as needed. Vitesse determines which requests it can consolidate and fund; your application does not need to create the consolidated payment.

Expected response

A successful request returns 200 OK with the payment request details. This confirms that Vitesse created the scheduled payment request. It does not confirm that Vitesse created a consolidated payment, or that the vendor has received the payment.

Retain the PaymentRequestId to monitor the request, match it to your records or request cancellation.

Monitor the payment

Subscribe to webhook events or retrieve the payment request using its PaymentRequestId to track its progress. See Retrieve a payment request for more information.

At the scheduled processing time, Vitesse checks available funds and determines which payment requests it can include in a consolidated payment. Vitesse queues any payment requests that it cannot fund until funds become available.

For notifications, see Webhooks. For statuses and their meanings, see Payment lifecycle.

Identify the batch payment and its requests

When Vitesse consolidates payment requests into one scheduled batch payment, it automatically generates a unique RecipientReference for that payment.

The vendor may not see the RecipientReference supplied on any individual request.

Use the PaymentRequestsFittedBatchSucceeded webhook to fetch the generated RecipientReference and identify the payment requests included in the batch.  Each payment request’s PaymentRequestId and supplied external references help you match the payment to the invoices or other records in your system. For payload details, see Webhook subscription event reference.

Troubleshoot the payment request

If the request fails, use the returned HTTP status code to identify the likely cause and corrective action.

Check that:

  • The source account and stored recipient identifiers are correct.
  • The stored recipient contains the details required for the payment method, destination country and currency.
  • You specified a configured scheduler or an available default scheduler.
  • The access token contains the required scope and the identity client has the required role.

If a payment request remains queued, check whether it has become due and whether sufficient funds are available. Also check that the batch payment balance is more than zero. For information about credit notes and queuing, see Vendor Pay batching.

Do not assume that a missing webhook notification means insufficient funding. Check the payment request or queue information to establish the reason, rather than submitting the payment again.

For error response formats, additional HTTP status codes and error-handling guidance, see ⚙️Error responses.

Next steps

Continue monitoring each payment request until you know its outcome.

If you no longer want to proceed with a request, see Cancel a payment for the conditions and procedure for cancellation.

If you want to configure schedulers, see Manage schedulers​.