Create a recurring payment

To initiate a recurring payment, you need to use the recurring_id received from the initial credit card payment. We will use the Payment:authorize API to create the recurring payment using this token.

2.1 API Reference

The Payment.Authorize API reference, including the option to execute real-time requests, can be found at: https://developer.pay.nl/reference/d8a03bda20cafdf5fb63243c496b614a-2


2.2 Request

A request via the Payment:Authorize API looks something like this:

curl --request POST \
     --url https://payment.pay.nl/v1/Payment/authorize/json \
     --header 'accept: application/json' \
     --header 'authorization: Basic dG9rZW46ZWQ2Nzg3OTQyOWM0ODkwYT*******A==' \
     --header 'content-type: application/json' \
     --data '
{
  "transaction": {
    "type": "MIT",
    "serviceId": "SL-1234-5678",
    "description": "Recurring payment",
    "amount": 1,
    "ipAddress": "139.130.4.5"
  },
  "payment": {
    "method": "token",
    "token": {
      "id": "VY-9212-9171-2390"
    }
  }
}

2.3 Response

A response via the Payment:Authorize looks something like this:

{
  "request": {
    "result": "1",
    "errorId": "",
    "errorTag": "",
    "errorMessage": "",
    "errorFieldName": ""
  },
  "payment": {
    "bankCode": "00",
    "bankMessage": "Authorized (Auth: 124619)",
    "approvalCode": "124619",
    "schemeTransactionId": "486222464777636",
    "cvcCheck": "",
    "threeDs": "FALSE",
    "avsResult": ""
  },
  "transaction": {
    "transactionId": "EX-9707-2672-4952",
    "orderId": "52220793076X2340",
    "paymentProfileId": "706",
    "state": "100",
    "stateName": "PAID",
    "amount": {
      "value": "1",
      "currency": "EUR"
    },
    "created": "1786366476",
    "identifierName": "John Doe",
    "identifierPublic": "427592******6155",
    "identifierHash": "61d95fe057b0b642c07d31f05b5d0dccdded009c248d782eab7cbbdef21b8e3f2939d5095455e755cba34832e47f4cd46717f1673341371dd9350187242fc51f",
    "startIpAddress": "139.130.4.5",
    "completedIpAddress": "139.130.4.5",
    "orderNumber": "",
    "amountOriginal": {
      "value": "1",
      "currency": "EUR"
    },
    "amountPaidOriginal": {
      "value": "1",
      "currency": "EUR"
    },
    "amountPaid": {
      "value": "1",
      "currency": "EUR"
    },
    "amountRefundOriginal": {
      "value": "0",
      "currency": "EUR"
    },
    "amountRefund": {
      "value": "0",
      "currency": "EUR"
    },
    "entranceCode": "b63cb190b7e79136b3613a665faa524f4d2e5db1"
  }
}

The recurring payment has now been successfully created using the recurring_id from the initial credit card payment. The same recurring_id can be used for future recurring payments for the associated customer.


2.4 Recipe

This recipe provides a quick, step-by-step guide to help you create a recurring credit card payment using the recurring_id


2.5 Errorcodes

errorIderrorTagerrorMessage
PAY-2011invalidRequestInvalid request; amount is missing in payload or value is not accepted. Amount must be a positive integer
PAY-2204paymentDeclinedOnly full 3DSecure transactions can be processed
PAY-2804invalidCardNumberInvalid card number provided
PAY-3205referToCardIssuerIt is not possible to process your payment at this time. Consult your bank or card issuer for more information. (Do not honour).
PAY-3209notSufficientFundsYou have insufficient funds to complete this transaction
PAY-3603cardNotFoundCould not load card details




Did this page help you?