Recurrent payment creation

The request is generated on the side of the merchant and transferred with the help of POST method to URL  https://api.wayforpay.com/regularApi

Recurrent payment may be created according to the successfully paid orderReference .

 

There is available the flowing frequency of recurrent payments:

  • single – write off once at the specified date;
  • daily – write-offs with indication of start and end date of the daily write-offs;
  • weekly – payment with the frequency once per week;
  • monthly – payment once per month, at the specified date.

Request parameters:

Parameter

Description

Type

requestType

Request type: CREATE

Mandatory

merchantAccount

Merchant identifier

Mandatory

merchantPassword

Merchant password

Mandatory

regularMode

Write-off frequency:

- once

- daily

- weekly

- monthly

Mandatory

amount

Recurrent payment amount

Mandatory

currency

Recurrent payment currency

Mandatory

dateNext

Date of the first payment in DD.MM.YYYY format

Mandatory

dateEnd

End date in DD.MM.YYYY format

Mandatory

orderReference

Order number in the merchant system, under which there was created successful payment

Mandatory

email

Client e-mail, where there will be sent notification as to recurrent payment

Optional

 

Response parameters:

Parameter

Description

Example

reasonCode

Rejection code

4100

reason

Rejection reason

Ok

 

Examples of request and response:

Request example:

{
"requestType": "CREATE",
"merchantAccount": "test_merch_n1",
"merchantPassword": "d485396ae413eb60dc251b0899b261c2",
"regularMode": "once",
"amount": "2",
"currency": "UAH",
"dateBegin": "04.05.2015",
"dateEnd": "05.05.2015",
"orderReference": "P21435306374431",
"email": "dev.test@mail.com"
}

 

Response example:

{
"reasonCode": 4100,
"reason": "Ok",
"orderReference": "P21435306374431"
}