ZEN transfers API
Go to zen.comGo to myZEN.com
Documentation
Documentation
  • Sandbox
  • Plugin integration
  • Checkout integration
  • API business
  • API reference
  • Merchant panel
  • Brandbook
Go to zen.comGo to myZEN.com
Documentation
Documentation
  • Sandbox
  • Plugin integration
  • Checkout integration
  • API business
  • API reference
  • Merchant panel
  • Brandbook
  1. Manage payment drafts
  • Overview
  • Dictionary
  • Environments
  • Authentication
    • mTLS
    • API key
  • Notifications
    • About
  • Information about accounts
    • Get the list of accounts
    • Get account details
  • Payment management
    • About
    • Calculation of available channels, fees and payment limits
    • Get the list of purpose codes
    • Create a payment
    • Get payment details
  • Manage payment drafts
    • About
    • Create a draft payment
    • Get the draft list
    • Get payment draft details
    • Delete a saved payment draft
  • Transaction History Management
    • Get payment history on account
    • Get payment confirmation
  1. Manage payment drafts

Create a draft payment

payment drafts.jpg
Endpoint is used to order payments. The paymentId parameter is returned in response, which is used in endpoints to get payment details or get payment confirmation in PDF.
1
Create a POST request
WARNING
Request header with Authorization parameter is obliged for all requests sent to ZEN.COM API. Authorization value is the apiKey parameter which is generated and provided by ZEN.COM to the Client. This key is unique to each Customer and should not be shared or used by third parties.
Create a POST request.
Body parameters
ParameterDescriptionTypeRequiredValidation
accountIdid of the account from which the payment is madestring ($uuid)yes
externalIdid generated by the Customer - this parameter will protect the process against duplicate payments. If you send the same externalId with: (1) the same body will return 201 result_code ALREADY_CREATED; (2) a different body, 404 EXTERNAL_ID_ALREADY_EXIST will be returnedstringyesregexp: '^[a-zA-Z0-9?&:-/=.,#]+$' min=1 max=128
amount.valuepayment amountnumber ($double)yes>0, not blank, currency precision
amount.currencypayment currencystring (ISO 4217 standard)yesmin=3 max=3 not blank
titletitlestringyesRegExp = a-zA-Z0-9À-ÿĀ-ſ/ \-?:(),.'"+\r\n\t min=1 max=140 not blank
chargeTypecharge Typeenum SHA, OUR, LOCAL, STANDARD, INSTANTaccording to the endpoint response GET/payments/v1.0/precalculation
purposeCodethe purpose for which the payment is made, required for BH, AE, CN countriesstringrequired for payments to AE, BH, CN countries, code list available for get using the endpoint GET/constans/v1.0/purpose-codesmin=3 max=3
receiver.accountNumberreceiver's account numberstringyesregexp: [A-Z0-9]+ min=6 max=34
receiver.typereceiver typeenum INDIVIDUAL, BUSINESSyes
receiver.firstNamereceiver's first namestringonly required for type = INDIVIDUALRegExp = a-zA-ZÀ-ÿĀ-ſ ."'- min=1 max=70
receiver.lastNamereceiver's last namestringonly required for type = INDIVIDUALRegExp = a-zA-ZÀ-ÿĀ-ſ ."'- min=1 max=70
receiver.companyNamereceiver's company namestringonly required for type = BUSINESSRegExp = a-zA-Z0-9À-ÿĀ-ſ/ \-?:(),.'"+ min=1 max=150
receiver.bicbicstringbic or routingCode requiredmin=7 max=11
routingCodeTyperouting code typeenum SORT_CODErequired if routingCode existsmin=1 max=100
receiver.routingCoderouting codestringbic or routingCode requiredmin=6 max=16
receiver.address.cityreceiver's citystringrequired if endpoint GET/payments/v1.0/precalculation will return SWIFT or LOCAL FULL ADDRESS in the chargeTypesData.channel fieldRegExp = a-zA-Z0-9À-ÿĀ-ſ/ \-?:(),.'"+ min=1 max=50
receiver.address.postCodereceiver's post codestring (according to country code)required if endpoint GET/payments/v1.0/precalculation will return SWIFT or LOCAL FULL ADDRESS in the chargeTypesData.channel fieldmin=1 max=50
receiver.address.addressLinereceiver's addressstringrequired if endpoint GET/payments/v1.0/precalculation will return SWIFT or LOCAL FULL ADDRESS in the chargeTypesData.channel fieldRegExp = a-zA-Z0-9À-ÿĀ-ſ/ \-?:),.'"+\r\n\t min=1 max=140
receiver.address.countryreceiver's countrystring (two-letter ISO country code)required if endpoint GET/payments/v1.0/precalculation will return SWIFT or LOCAL FULL ADDRESS in the chargeTypesData.channel fieldmin=2 max=2
💡
Example of JSON
2
Send the request
Send the POST request to:
1.
test environment: https://api-services.zen-test.com/payments/v1.0/drafts
2.
production environment: https://api-services.zen.com/payments/v1.0/drafts
3
Receive the ZEN.COM response
Receive the ZEN.COM response.
Parameters
ParameterDescriptionTypeNullable
resultCodethe field indicates whether the payment has been created or it is another call with the same parametersenum CREATED (if the payment was created correctly the first time) / ALREADY_CREATED (if there is a duplicate request with the same externalId and body)no
paymentIdpayment idstring ($uuid)no
💡
Example response
{
  "resultCode": "CREATED",
  "paymentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
Errors
HTTP codeBusiness codeDescription
400VALIDATION_ERRORthe data has not been validated
403FORBIDDENno access to the resource
404ACCOUNT_NOT_FOUNDno account with the specified accountId was found
409EXTERNAL_ID_ALREADY_EXISTthe externalId provided has already been used for another payment
422INVALID_DATAincorrect data on the request
500INTERNAL_SERVER_ERRORserver error, please contact ZEN
💡
Example error response
{
   "error":{
      "code":"INTERNAL_SERVER_ERROR",
      "message":"Unexpected error. Contact ZEN"
   }
}
Modified at 2026-03-17 14:25:51
Previous
About
Next
Get the draft list
Built with