Main Endpoints
Create payment
This endpoint allows you to create an outgoing payment from your Nexpay account
POST
/api/2/eurowallet/paymentsThis endpoint is a core functionality of the Nexpay API. Before you begin integrating this endpoint, please carefully review the instructions for managing the payment flow.
Request
Mandatory parameters
requestTime
integer required
Request time
Format: unix timestamp
Precision: milliseconds
Precision: milliseconds
account
string required
Your IBAN account at Nexpay, from which the funds will be transferred
amount
string required
Payment amount
Format: Decimal string with at most two fractions and value greater than 0.00
beneficiaryName
string required
Name of the payment recipient
beneficiaryAccount
string required
Recipient’s bank account number
beneficiaryReference
string required
Payment reference (transaction details)
transactionSignature
string required
Transaction signature (see detailed description here)
Conditional Parameters
If you make a payment via the SWIFT network (networkType = SWIFT), you will need to specify additionally:
beneficiaryBankBic
string required
Recipient’s bank BIC code
beneficiaryBankName
string optional
Recipient’s bank name
beneficiaryAddressStreet
string required
Recipient’s street address
beneficiaryAddressTown
string required
Recipient’s city address
beneficiaryAddressCountry
string required
Recipient’s country
currency
string optional
Payment currency (this parameter should be indicated for
non-EUR payments sent through the SWIFT network):Possible values:
Default:
GBP, CHF, AED, ARS, AUD, BHD, CAD, CZK, DKK, HKD, HUF, ILS, JPY, KWD, MXN, NZD, PLN, RON, SEK, SGD, TRY, ZAR (check the list of currencies here)Default:
EUROptional parameters
The parameters listed below are optional:
networkType
string optional
Payment rails through which the payment should be made
Possible values:
If the parameter is not provided, the
SEPA, SWIFTIf the parameter is not provided, the
SEPA network is chosen by defaultcommissionAccount
string optional
Your IBAN account at Nexpay, from which the commission will be charged
The account should be marked as commission account in the client portal beforehand
beneficiaryAddress
string optional
Recipient’s full address
This parameter can be optionally provided when making payment through the SEPA network
externalPaymentId
string optional
The custom internal identifier shared between you and your end-customer (it is strongly recommended to always include this parameter into request)
Allowed characters:
Maximum variable size:
a-z, A-Z, &, -, %, whitespace and tabMaximum variable size:
36executionTime
string optional
The date and time when the payment should be scheduled to execute.
Format:
yyyy-MM-ddThh:mm:ss (ISO 8601), UTC time zone, no longer than three months from the current datescheduledRejectionTime
string optional
The date and time at which the payment should be automatically cancelled.
Format:
Please note that having a
yyyy-MM-ddThh:mm:ss (ISO 8601), UTC time zonePlease note that having a
PENDING status does not guarantee that payment will rejected after the selected time. The payment can be considered as rejected only after receiving the REJECTED status either through the payment status endpoint or after receiving a webhook. In some cases, the payment amount might be returned to your account with a delay.Response
paymentId
string required
The payment identifier generated by Nexpay (identical to
clientPaymentId)status
string required
Payment status
Possible values:
PENDING, COMPLETED, REJECTEDError codes
| Code | Message |
|---|---|
200 | Mandatory parameter missing |
20000 | Invalid request time |
20010 | Beneficiary name too long |
20020 | Beneficiary name too short |
20030 | Reference information for beneficiary too long |
20040 | Invalid transaction signature |
20050 | Invalid payment network type |
20060 | Beneficiary bank BIC too long |
20061 | Beneficiary bank BIC too short |
20080 | Beneficiary bank name too long |
20090 | Beneficiary address street too short |
20091 | Beneficiary address street too long |
20100 | Beneficiary address town too short |
20101 | Beneficiary address town too long |
20111 | Beneficiary address country invalid |
20120 | Invalid execution date time |
Examples
POST url: /api/2/eurowallet/payments
POST data: requestTime=1560246703074&account=LT023080010000000239&amount=45.00&beneficiaryName=John Smith&beneficiaryAddress=New Street 25&beneficiaryAccount=LT633080010000000208&beneficiaryReference=Invoice #314950-392&externalPaymentId=223102a35db34864b2057fa1fb1089000000&transactionSignature=c8888edc979b3ef4a54a6bb6c3fbc11e37df42ff1c9fe2fc2a12df70d68c9a22
POST url: /api/2/eurowallet/payments
POST data: requestTime=1769600453140&account=LT383080020000001094&commissionAccount=LT113080020000001095&amount=1&networkType=SEPA&beneficiaryName=Beneficiary%20name&beneficiaryAccount=LT883550000000123456&beneficiaryReference=SEPA%20Instant%20test&externalPaymentId=1769600453140&transactionSignature=747f0d750e5a404e5da296710015dc5db9f5f1563ec859f4eaf992e6242d2b387b975b47c4be3423b6fa8a45332d4c47b3d376e5e3de17487d2fef5965062498
POST url: /api/2/eurowallet/payments
POST data: requestTime=1560246703074&account=LT023080010000000239&amount=45.00&networkType=SWIFT&beneficiaryName=John Smith&beneficiaryAccount=LT633080010000000208&beneficiaryReference=Invoice #314950-392&beneficiaryBankBic=&beneficiaryBankName=Test Bank&externalPaymentId=223102a35db34864b2057fa1fb1089000000&beneficiaryAddressStreet=Street&beneficiaryAddressTown=Town&beneficiaryAddressCountry=LV&transactionSignature=c8888edc979b3ef4a54a6bb6c3fbc11e37df42ff1c9fe2fc2a12df70d68c9a22
{
"paymentId": "30",
"status": "PENDING"
}
Commentaries
Network type
graph LR
Start(( ))
A{Is networkType provided?}
B{Is networkType = SWIFT?}
C[Check for SEPA Instant eligibility]
D{Are SEPA Instant conditions met?}
E[Route payment via SEPA]
F[Route payment via SEPA Instant]
G[Route payment via SWIFT]
End1(( ))
End2(( ))
End3(( ))
Start --> A
A -- Yes --> B
A -- No --> C
B -- Yes --> G --> End3
B -- No --> C
C --> D
D -- Yes --> F --> End2
D -- No --> E --> End1
classDef startEnd fill:#000,stroke:#e53935,stroke-width:2px
classDef action fill:#e3f2fd,stroke:#1e88e5,stroke-width:1.5px
class Start,End1,End2,End3 startEnd
Currently, you can make a payment via the following payment networks (rails): SEPA, SEPA Instant, and SWIFT.
When making a payment, you can specify through which payment network it should be sent - networkType parameter.
- This parameter is optional
- If the parameter is not provided, the payment will go through
SEPAorSEPA Instant - If the
networkType = SEPA, the payment will go throughSEPAorSEPA Instant - The system automatically determines which channel to send the payment through:
SEPAorSEPA Instant - If the
SEPA Instantconditions are met, the payment will be sent through this channel by default. Otherwise, it will be sent throughSEPA SEPA Instantconditions include, but are not limited to:(a)whether this payment channel is available to your account,(b)whether the recipient bank is a member of this payment network, and(c)whether the payment amount complies with the Nexpay internal limit.- To send a payment via the
SWIFTsystem, it is necessary to specify this parameter
Signature
Parameter order
When preparing the payment creation request, it is critically important to place parameters in the exact order as it is written below.
- requestTime
- account
- commissionAccount (optional)
- amount
- networkType (optional)
- beneficiaryName
- beneficiaryAddress (optional)
- beneficiaryAccount
- beneficiaryReference
- externalPaymentId (optional, recommended)
- executionTime (optional)
- scheduledRejectionTime (optional)
- transactionSignature (required)
SEPA pseudo-code example
message = "requestTime=" + requestTime + "&account=" + account + "&amount=" + amount + "&beneficiaryName=" + beneficiaryName + "&beneficiaryAddress=" + beneficiaryAddress + "&beneficiaryAccount=" + beneficiaryAccount + "&beneficiaryReference=" + beneficiaryReference + "&externalPaymentId=" + externalPaymentId
transactionSignature = lower_case(hex(hmac_sha512(message.getBytes("UTF-8"), secret_key)))
example: requestTime=1560246703074&account=LT023080010000000239&amount=45.00&beneficiaryName=John Smith&beneficiaryAddress=New Street 25&beneficiaryAccount=LT633080010000000208&beneficiaryReference=Invoice #314950-392&externalPaymentId=223102a35db34864b2057fa1fb1089000000
- requestTime
- account
- commissionAccount (optional)
- amount
- networkType (mandatory in order to trigger SWIFT)
- beneficiaryName
- beneficiaryAccount
- beneficiaryReference
- beneficiaryBankBic
- beneficiaryBankName (optional)
- externalPaymentId (optional, recommended)
- beneficiaryAddressStreet
- beneficiaryAddressTown
- beneficiaryAddressCountry
- currency (optional)
- executionTime (optional)
- scheduledRejectionTime (optional)
- transactionSignature (required)
SWIFT pseudo-code example
message = "requestTime=" + requestTime + "&account=" + account + "&amount=" + amount + "&networkType=" + networkType + "&beneficiaryName=" + beneficiaryName + "&beneficiaryAccount=" + beneficiaryAccount + "&beneficiaryReference=" + beneficiaryReference + "&beneficiaryBankBic=" + beneficiaryBankBic + "&beneficiaryBankName=" + beneficiaryBankName + "&externalPaymentId=" + externalPaymentId + "&beneficiaryAddressStreet=" + beneficiaryAddressStreet + "&beneficiaryAddressTown=" + beneficiaryAddressTown + "&beneficiaryAddressCountry=" + beneficiaryAddressCountry
transactionSignature = lower_case(hex(hmac_sha512(message.getBytes("UTF-8"), secret_key)))
example: requestTime=1560246703074&account=LT023080010000000239&amount=45.00&beneficiaryName=John Smith&beneficiaryAddress=New Street 25&beneficiaryAccount=LT633080010000000208&beneficiaryReference=Invoice #314950-392&externalPaymentId=223102a35db34864b2057fa1fb1089000000