Skip to content

Payment runs

A Payment run contains a list of supplier payments. A Payment run can be

  • created by a user with a CREATOR role
  • confirmed by a user with a CONTROLLER role
  • funded by a user with a CONTROLLER role

Note that the Controller user must have their mobile device enrolled to SCA.

Before a payment run can be executed, it must be funded. Users with the CONTROLLER role must link their company's bank account(s) that are represented as Linked Accounts, which than can be used as the funding source for a payment run.

Depending on the bank's constraints it may not be possible to deposit the total amount of funds required for a payment run, in which case the payment run will be automatically split into funding groups. All funding groups must be funded and executed for the payment run to be marked as completed.

Note that even if the payment is created successfully, you still need to check its status in order to determine if it is completed orfailed.

Create a payment run

Request

Create a new payment run containing a list of outstanding supplier payments.

Note that all the supplier payments in a payment run is limited to one currency. The currency of the payment run are enabled upon the Buyer’s registration.

Required user role: CREATOR

Security
apiKey and authToken
Headers
idempotency-refstring

A unique call reference generated by the caller that, taking into consideration the payload as well as the operation itself, helps avoid duplicate operations. Idempotency reference uniqueness is maintained for at least 24 hours.

Bodyapplication/json
paymentRunRefstring

A unique identifier by which you identify the payment run with on your system.

Example:"94fddfb2-297d-423d-9157-4200b7beb834"
tagstring, <= 50 characters^[a-zA-Z0-9_-]+$

The tag field is a custom field that can be used to search and filter.

descriptionstring

The long form description of the payment run

Example:"September payment run 01"
paymentsArray of objects, [ 1 .. 1000 ] items(Payment)required

The list of payments associated with the payment run

curl -i -X POST \
  https://sandbox.weavr.io/payment-run/v1/payment_runs \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'api-key: YOUR_API_KEY_HERE' \
  -H 'idempotency-ref: string' \
  -d '{
    "paymentRunRef": "94fddfb2-297d-423d-9157-4200b7beb834",
    "tag": "string",
    "description": "September payment run 01",
    "payments": [
      {
        "externalRef": "c99cd66c-82fc-4a01-977b-61a2f5a247a1",
        "paymentRef": "c99cd66c-82fc-4a01-977b-61a2f5a247a1",
        "paymentAmount": {
          "currency": "GBP",
          "amount": 1
        },
        "reference": "string",
        "supplier": {
          "name": "string",
          "address": "string",
          "bankName": "string",
          "bankAddress": "string",
          "bankCountry": "st",
          "type": "PERSONAL",
          "bankAccountDetails": {
            "accountNumber": "stringst",
            "sortCode": "string",
            "secondaryReference": "string"
          }
        }
      }
    ]
  }'

Responses

OK

Bodyapplication/json
idstring^[0-9a-fA-F]{24}$read-onlyrequired
paymentRunRefstring

A unique identifier by which you identify the payment run with on your system.

Example:"94fddfb2-297d-423d-9157-4200b7beb834"
tagstring, <= 50 characters^[a-zA-Z0-9_-]+$

The tag field is a custom field that can be used to search and filter.

descriptionstring

The long form description of the payment run

Example:"September payment run 01"
createdBystring^[0-9]+$read-onlyrequired
Example:"110747174434373672"
statusstringread-onlyrequired

The current status of the payment run.

  • QUEUED: The payment run creation is an asynchronous process. This status indicates that the payment run is currently being validated
Value:"QUEUED"
Example:"PENDING_CONFIRMATION"
statusReasonstring
paymentsArray of objects(Payment)required
createdAtstring, (date-time)read-onlyrequired
Response
{ "id": "string", "paymentRunRef": "94fddfb2-297d-423d-9157-4200b7beb834", "tag": "string", "description": "September payment run 01", "createdBy": "110747174434373672", "status": "PENDING_CONFIRMATION", "statusReason": "string", "payments": [ {} ], "createdAt": "2019-08-24T14:15:22Z" }