3.23. /api/v4/update-recurring-payment
Introduction
/api/v4/update-recurring-payment is a synchronous API command. If request is accepted with no errors, the Payment Gateway finds the recurring payment profile by the provided recurring-payment-id and updates this profile. The recurring transactions will be processed according to the updated recurring payment profile using the payment data saved in this profile. Update recurring payment is initiated through HTTPS POST request by using URLs and the parameters specified below. Use OAuth RSA-SHA256 for authentication.
API URLs
Integration |
Production |
---|---|
https://sandbox.payneteasy.eu/paynet/api/v4/update-recurring-payment/ENDPOINTID |
https://gate.payneteasy.eu/paynet/api/v4/update-recurring-payment/ENDPOINTID |
Request Parameters
Note
Parameter Name |
Description |
Value |
---|---|---|
client-orderid |
Connecting Party order ID. |
Necessity : RequiredType : StringLength : 128 |
recurring-payment-id |
Recurring ID assigned to the order by QA. |
Necessity : RequiredType : StringLength : 128 |
Merchant login |
Connecting Party’s login name. |
Necessity : RequiredType : StringLength : 20 |
Endpoint |
Endpoint ID. |
Necessity : RequiredType : NumericLength : 10 |
credit-card-number |
Payer’s credit card number. card-printed-name can only be specified when card number is specified. |
Necessity : ConditionalType : NumericLength : 19 |
card-printed-name |
Payer`s card printed name. Required when card number is specified. |
Necessity : ConditionalType : StringLength : 128 |
expire-year |
Payer`s card expire year. Can only be specified when card number is specified. Required when card number is specified. |
Necessity : ConditionalType : NumericLength : 4 |
expire-month |
Payer`s card expire month. Can only be specified when card number is specified. Required when card number is specified. |
Necessity : ConditionalType : NumericLength : 2 |
amount |
Amount of currency must be the same as currency on the project assigned. Upon reaching finish date, Recurring payment will go into stop status. Supported for SRC and DST type. Required if amount-from and amount-to or amount-sequence are not used. |
Necessity : ConditionalType : NumericLength : 10 |
amount-from |
If the combination of amount-from and amount-to is chosen, every charge will be of random amount between these two numbers. Supported for SRC and DST type. Required if amount or amount-sequence are not used. |
Necessity : ConditionalType : NumericLength : 10 |
amount-to |
If the combination of amount-from and amount-to is chosen, every charge will be of random amount between these two numbers. Supported for SRC and DST type. Required if amount or amount-sequence are not used. |
Necessity : ConditionalType : NumericLength : 10 |
amount-sequence |
If amount sequence is chosen, client will be charged amounts from this list. Example of setting up amount sequence: 10.5, 24.6, 32.0. If repeats number is higher than amount sequence number of elements, every new charge will be with last amount in amount sequence. In order for charges to begin from the first amount in the chain, current repeats number must be set as 0. Supported for SRC and DST type. Required if amount-from and amount-to or amount are not used. |
Necessity : ConditionalType : NumericLength : 10 |
period |
Possible values are: day, week and month. In case if daily is chosen, client will be charged every day. If week - every 7 days. If monthly is chosen, client will be charged on the same date of the month, from the starting date, no matter how many days there are in a month. Interval and period can only be specified or omitted together. Not supported for DST. |
Necessity : ConditionalType : StringLength : 32 |
interval |
Interval is a multiplier applied to the period. For example, if interval of 2 and period ‘Daily’ is selected, client will be charged once every 2 days. Interval and period can only be specified or omitted together. Not supported for DST. |
Necessity : ConditionalType : IntLength : - |
customer-ip |
Payer`s IP address. Supported for SRC and DST type. |
Necessity : OptionalType : StringLength : 45 |
country |
Payer`s country. |
Necessity : OptionalType : StringLength : 2 |
city |
Payer`s city. |
Necessity : OptionalType : StringLength : 128 |
address1 |
Payer`s address. |
Necessity : OptionalType : StringLength : 256 |
first-name |
Payer`s first-name. |
Necessity : OptionalType : StringLength : 128 |
last-name |
Payer`s last-name. |
Necessity : OptionalType : StringLength : 128 |
order_desc |
Description of Recurring payment. |
Necessity : OptionalType : StringLength : 65K |
zip-code |
Payer`s zip-code. |
Necessity : OptionalType : StringLength : 10 |
birthday |
Payer`s birthday date. |
Necessity : OptionalType : 8/Numeric, DD.MM.YYYYLength : 8 |
Payer`s email. |
Necessity : OptionalType : StringLength : 128 |
|
ssn |
Social security number field. |
Necessity : OptionalType : StringLength : 32 |
phone |
Payer’s full international phone number, including country code. Not supported for DST. |
Necessity : OptionalType : StringLength : 128 |
state |
Payer’s state. Please see Mandatory State codes for a list of valid state codes. Required for USA, Canada and Australia. Not supported for DST. |
Necessity : OptionalType : StringLength : 2-3 |
start-date |
Date, when first charge is scheduled. If start date is set as a current date and type is set as auto, first charge will be made today. |
Necessity : OptionalType : 8/Numeric, DD.MM.YYYYLength : 8 |
finish-date |
Date, when the Payer will be charged last time. |
Necessity : OptionalType : 8/Numeric, DD.MM.YYYYLength : 8 |
max-repeats-number |
Index of recurring transaction, first charge will hold the index of 0. Current repeats number increases even if a charge was unsuccessful. When current repeats number reaches max repeats number, Recurring payment goes into stop status and client is charged no more. If a charge was made automatically, no additional charges will be made(unless done manually), even if a recurring payment is stopped and rescheduled again. |
Necessity : OptionalType : IntLength : - |
purpose |
Purpose of transaction. |
Necessity : OptionalType : StringLength : 128 |
notify_url |
Notify url field. server_callback_url parameter can also be used. For more information please see Connecting Party Callbacks. |
Necessity : OptionalType : StringLength : 1024 |
server_callback_url |
Connecting Party URL which will receive callback request once the transaction reaches final status. Connecting Party may use Server Callback URL for custom processing of the transaction completion, e.g. to collect payment data in the Connecting Party’s information system. See callback details in Connecting Party callback parameters. Send either notify_url or server_callback_url, not both. |
Necessity : OptionalType : StringLength : 128 |
Note
Response Parameters
Note
Warning
/api/v4/create-recurring-payment is a synchronous API command. The response will be returned after the recurring payment profile will be created on Payment Gateway side.
Response Parameters |
Description |
---|---|
type |
The type of response. Example: update-recurring-payment-response, validation-error, error. If type equals validation-error or error, error-message and error-code parameters contain error details. |
status |
If request is accepted, this parameter has approved value. This is not a transaction status. |
serial-number |
Unique number assigned by Payneteasy server to particular request from the Connecting Party. |
error-message |
If status is declined or error this parameter contains the reason for decline or error details. |
error-code |
The error code in case of declined or error status. |
Request Example
POST /paynet/api/v4/update-recurring-payment/ HTTP/1.1
User-Agent: curl/8.4.0
Accept: */*
Authorization: OAuth oauth_consumer_key="ErwinTestMerchant", oauth_nonce="XBhUVJU4N8fBnNRGfY91Z3wuZ6iNgjVM", oauth_signature="RIRufAZeoBZBMpVlr7Bt%2Bc6fDTUxZJgxjJUlTo7Pm9zlGeZAl427VF6c%2B0lkGvZfATlooYBK%2FeoZaUU5gJITePycMmZr2gPzAk8xCielclB8N0j5Rp3ga0A%2B3uJDTgQdvsrosYK4tsES%2BPsR6qjhf%2FqWGHbpwCooXbMLwI9a9yMdkwmcRNQGPWAz7I%2FJ8gdDLvkjM0H8fZRp%2Bz%2FSAd3%2FgX%2F%2BCJv7bMn26hOGUxJua7u5GIKX6mmZ5FpV71xdy04ebPu4qAXGPGNKBZXLJGqzYfYVlW9XWKKkFhUA4RLYUZqnfokHA8uy3zb8IY8tKZOjXxmytlFKdVr%2BYAiHxlMt%2BEq%2BlovLAXWENbIXvJYhRiX%2F3QO2cq2ZznAsanZQiyU7AT3O9lnLHuvKc2wbuFKr277lNR24cykI3ja%2FGMR%2F8T%2BXjZKFF%2F1sYVRGd93CQDx6NHnH98vp%2Bv3PMopOmLWwggyOApmDBDsa8jYoU1TDOs6gNRTsXIyFiSwl3e48fNAp%2FjFZfUl90K8wGusNzrof05UdTPR%2B7zpv4jL1hd1XyN%2F4x7aNNQ28tm5LSoVU6t%2BQkvwRm%2FNxnDKMYEE9rq7s4Uq5KTzAmM89pAu52WFbDQXYoZgy3vm%2B0SsJDXH0IVXsDpLDt1zcJClWoeXxT0fqOcEojJhuosvbcI%2FIaEpxWH8%3D", oauth_signature_method="RSA-SHA256", oauth_timestamp="1721312815", oauth_version="1.0"
Content-Length: 624
Content-Type: application/x-www-form-urlencoded
Connection: keep-alive
address1=1234%20Peace%20street
&amount=55
&birthday=1980-01-02
&card-printed-name=JOHN%20SMITH
&recurring-payment-id=1492124
&city=Chicago
&client-orderid=1575634981130
&country=US
&credit-card-number=4464920026265488
¤cy=USD
&customer-ip=1.2.3.4
&email=john.smith%40example.com
&expire-month=12
&expire-year=2040
&finish-date=2040-01-01
&first-name=John
&interval=1
&last-name=Smith
&max-repeats-number=1000
¬ify-url=http%3A%2F%2Fexample.com%2Fnotify-me
&order_desc=testing%20purposes
&period=week
&phone=12345678
&purpose=No%20purpose%20at%20all
&ssn=1234
&start-date=2030-01-01
&state=IL
&zip-code=123456
&server_callback_url=https://httpstat.us/200
Success Response Example
HTTP/1.1 200
Server: server
Date: Thu, 18 Jul 2024 14:27:39 GMT
Content-Type: text/html;charset=utf-8
Connection: keep-alive
Keep-Alive: timeout=60
Vary: Accept-Encoding
X-XSS-Protection: 1
X-Content-Type-Options: nosniff
Strict-Transport-Security: max-age=31536000
Content-Language: en-US
Strict-Transport-Security: max-age=31536000
Content-Length: 107
type=update-recurring-payment-response
&serial-number=00000000-0000-0000-0000-000002f36d82
&status=approved
Fail Response Example
HTTP/1.1 500
Server: server
Date: Thu, 18 Jul 2024 14:41:27 GMT
Content-Length: 61
Connection: keep-alive
Keep-Alive: timeout=60
X-XSS-Protection: 1
X-Content-Type-Options: nosniff
Strict-Transport-Security: max-age=31536000
Internal server error [00b20f25-2933-48e3-973b-0664114b8492]
Postman Collection
Request Builder
Enter your private key in PKCS#1 container to use debug. See RSA-SHA256 for details.
Debug form
Normalized parameters string to sign, according to OAuth 1.0a rules |
---|
POST body parameters to submit |
---|
OAuth 1.0a headers to submit. |
---|
HEX Encoded Signature |
---|
Base64 Encoded Signature |
---|
|