Create payment
/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
Precision: milliseconds
Conditional Parameters
If you make a payment via the SWIFT network (networkType = SWIFT), you will need to specify additionally:
PRIVATE, CORPORATEIn case of
PRIVATE, fields beneficiaryFirstName and beneficiaryLastName need to be provided.In case of
CORPORATE, field beneficiaryName needs to be provided.beneficiaryEntityType is set to PRIVATE.beneficiaryEntityType is set to CORPORATE.non-EUR payments sent through the SWIFT network)Optional parameters
The parameters listed below are optional:
SEPA, SWIFTIf the parameter is not provided, the
SEPA network is chosen by defaulta-z, A-Z, &, -, %, whitespace and tabMaximum variable size:
36yyyy-MM-ddThh:mm:ss (ISO 8601), UTC time zone, no longer than three months from the current dateyyyy-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
clientPaymentId)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 |
SWIFT payment field rules
Due to specific requirements for different currencies and countries, some SWIFT payment fields are required only under certain conditions. This section describes all context specific field rules that are required for SWIFT payments.
Payments to Canada, The United States, and Mexico
Beneficiaries in Canada, The United States, and Mexico require the full address:
beneficiaryAddressStreetbeneficiaryAddressTownbeneficiaryAddressCountrybeneficiaryAddressStatebeneficiaryAddressPostCode
Payments to The United Arab Emirates
The purposeOfPayment field is required, if the bank country is The United Arab Emirates.
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&beneficiaryEntityType=CORPORATE&beneficiaryName=Test company&beneficiaryAccount=LT633080010000000208&beneficiaryReference=Invoice #314950-392&beneficiaryBankBic=TESTME22XXX&beneficiaryBankName=Test bank&externalPaymentId=223102a35db34864b2057fa1fb1089000000&beneficiaryAddressStreet=Test street 25&beneficiaryAddressTown=Test town&beneficiaryAddressCountry=LT¤cy=GBP&transactionSignature=c8888edc979b3ef4a54a6bb6c3fbc11e37df42ff1c9fe2fc2a12df70d68c9a22
{
"paymentId": "30",
"status": "PENDING"
}
Commentaries
Network type
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)
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)
- beneficiaryEntityType
- beneficiaryName (optional)
- beneficiaryFirstName (optional)
- beneficiaryLastName (optional)
- beneficiaryAccount
- beneficiaryReference
- beneficiaryBankBic
- beneficiaryBankName (optional)
- externalPaymentId (optional, recommended)
- beneficiaryAddressStreet
- beneficiaryAddressTown
- beneficiaryAddressCountry
- beneficiaryAddressState (optional)
- beneficiaryAddressPostCode (optional)
- purposeOfPayment (optional)
- currency (optional)
- executionTime (optional)
- scheduledRejectionTime (optional)
- transactionSignature (required)
message = "requestTime=" + requestTime + "&account=" + account + "&amount=" + amount + "&networkType=" + networkType + "&beneficiaryEntityType=" + beneficiaryEntityType + "&beneficiaryName=" + beneficiaryName + "&beneficiaryAccount=" + beneficiaryAccount + "&beneficiaryReference=" + beneficiaryReference + "&beneficiaryBankBic=" + beneficiaryBankBic + "&beneficiaryBankName=" + beneficiaryBankName + "&externalPaymentId=" + externalPaymentId + "&beneficiaryAddressStreet=" + beneficiaryAddressStreet + "&beneficiaryAddressTown=" + beneficiaryAddressTown + "&beneficiaryAddressCountry=" + beneficiaryAddressCountry + "¤cy=" + currency
transactionSignature = lower_case(hex(hmac_sha512(message.getBytes("UTF-8"), secret_key)))
example: requestTime=1560246703074&account=LT023080010000000239&amount=45.00&networkType=SWIFT&beneficiaryEntityType=CORPORATE&beneficiaryName=Test company&beneficiaryAccount=LT633080010000000208&beneficiaryReference=Invoice #314950-392&beneficiaryBankBic=TESTME22XXX&beneficiaryBankName=Test bank&externalPaymentId=223102a35db34864b2057fa1fb1089000000&beneficiaryAddressStreet=Test street 25&beneficiaryAddressTown=Test town&beneficiaryAddressCountry=LT¤cy=GBP