Skip to content

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" }