Buyers are identities representing a business
Once on-boarded, Buyers can create payment runs and pay their suppliers in your application.
Weavr Payment Run Plug-in API provides a simple and flexible way for Embedders to add payment execution capabilities in their application.
By integrating Weavr Payment Run plug-in API in your application, you can embed banking and payment capabilities within your app to boost productivity for your users in a seamless experience.
Each request to the API must include an api_key that represents your account. You can obtain an API Key by registering for a Embedder account here.
Almost all endpoints require a secondary authentication token auth_token that represents the user for whom the request is being executed.
The collection makes use of environment variables to pre-fill details associated with your Sandbox account, such as your account’s API Key. You can download your Sandbox Account environment file from the Sandbox Portal.
A Payment run contains a list of supplier payments. A Payment run can be
CREATOR roleCONTROLLER roleCONTROLLER roleNote 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.
curl -i -X POST \
'https://api.weavr.io/_mock/products/payment-run/openapi/v1/payment_runs/{payment_run_id}/confirm' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'api-key: YOUR_API_KEY_HERE' \
-H 'idempotency-ref: string'OK
A unique identifier by which you identify the payment run with on your system.
The tag field is a custom field that can be used to search and filter.
The current status of the payment run.
PENDING_CHALLENGE: Waiting for the payment run to complete the SCA challengeThe status of the payment
QUEUED: The payment run creation is an asynchronous process. This status indicates that the payment run is currently being validatedPENDING_CHALLENGE: Waiting for the payment run to complete the SCA challengePENDING_FUNDING: Pending until the necessary funds are initiated. Initiate the funding process via the /payment_runs/{id}/fund endpointAWAITING_FUNDS: Waiting for the required funds to be available to execute paymentEXECUTING: Payment is being executed and awaiting final status confirmationCOMPLETED: Payment executed successfullyFAILED: Payment executed, but failedCANCELLED: Payment cancelled, because payment run was cancelledPENDING_CONFIRMATION: Payment run is pending confirmation by a CONTROLLER userRETURNED: Payment sent, but was returned backSCA_FAILED: Payment run failed due to SCA either expiring or max attempts reached. You can restart the payment run by calling the /payment_runs/{id}/restart endpointThe unique identifier by which you identify the associated payable on your system.
The unique identifier by which you identify this payment on your system.
The currency and amount to be paid to the supplier.
The currency expressed in ISO-4217 code.
The long form description of the payment. This information is also shared with the supplier. The allowed length is dependent on the payment type: SEPA and SWIFT <= 35 characters Faster Payments <= 18 characters
Represent the supplier bank account typically used in Outgoing Wire Transfer transactions.
The supplier name. The allowed length and pattern is dependent on the bankAccountDetails type:
SepaBankDetails: >= 1 character and <= 150 charactersFasterPaymentsBankDetails: >= 1 character and <= 140 characters with a pattern of ^[a-zA-Z0-9\/\-?:().,’+\s#=!"%&*<>;{@\r\n]*$ (please note that the ’ symbol is the unicode value U+2019 (right single quotation mark) and not the unicode value U+0027 (apostrophe))The supplier's bank country in ISO 3166 alpha-2 format.
The type of supplier account. Required only when FasterPaymentsBankDetails are specified.
Details of the supplier bank account, depending on the type of transfer chosen.
Bank details used in case the wire transfer is executed over Faster Payments.
Account number, required for wire transfer over Faster Payments.
Sort code, required for wire transfer over Faster Payments.
{ "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" }
Start the the funding process of a payment run.
Specify the funding source of the payment run by providing an id to an already linked account.
Depending on the maximum payment amount constraints imposed by the bank that is providing the account, the payment run may be split in 2 or more groups. Note that you'll need to complete a funding process for each instruction returned.
Required user role: CONTROLLER
curl -i -X GET \
'https://api.weavr.io/_mock/products/payment-run/openapi/v1/payment_runs/{payment_run_id}/fund?linkedAccountIds=652d25b73541d8084a88a38d' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'api-key: YOUR_API_KEY_HERE'{ "count": 10, "responseCount": 100, "fundingInstructions": [ { … } ] }
curl -i -X POST \
'https://api.weavr.io/_mock/products/payment-run/openapi/v1/payment_runs/{payment_run_id}/cancel' \
-H 'api-key: YOUR_API_KEY_HERE' \
-H 'idempotency-ref: string'No contentSimulators enable you to trigger processes in Sandbox that in Production are triggered from an external action rather than from your application. this way you can test scenarios that otherwise you would only encounter in the Live environment.
Note: These endpoints are only available on Sandbox and won’t work in the Live environment.