Create a Recurring Payment

Definition: POST /v1/payments/recurrent

A recurring payment is created in the same manner a one-off payment is created. In addition, you need to send the PreapprovalID and the information specific to each payment method.

For recurring Card payments (69) and Klarna Invoice (75), you do not need a preapproval, you only need to send in the preapprovalID field the initial GlobalPay PaymentID.

If you want to get more information about a recurring payment you can use the same actions like for a one-off payment. Please check Get information on a specific payment, for more details.

Request:

POST https://paytest.smart2pay.com/v1/payments/recurrent
Authorization: Basic MzAyMDE6aEo1Um9iWXg5cjdGZk53Q3ZIWTlMWEhxcXIrRkV6cmM3YUp2UVFrNEdhejFtZzdSeXk=

{
 "Payment": {
   "PreapprovalID":1744,
   "MerchantTransactionID": "s2ptest_f28",
   "Amount": 100,
   "Currency": "BRL",
   "MethodID": 46,
   "Customer": {  
     "Email" : "test_user_4432956@testuser.com"
    },
   "BillingAddress":{
     "Country": "BR"
      }
   }
}

Response:

HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8

{
  "Payment": {
    "ID": 2610866,
    "SkinID": null,
    "ClientIP": null,
    "Created": "20160913150342",
    "MerchantTransactionID": "s2ptest_f28",
    "Amount": 100,
    "Currency": "BRL",
    "ReturnURL": null,
    "Description": null,
    "MethodID": 46,
    "MethodOptionID": null,
    "IncludeMethodIDs": null,
    "ExcludeMethodIDs": null,
    "PrioritizeMethodIDs": null,
    "SiteID": null,
    "NotificationDateTime": null,
    "Customer": {
      "ID": 1209,
      "MerchantCustomerID": null,
      "Email": "test_user_4432956@testuser.com",
      "FirstName": null,
      "LastName": null,
      "Gender": null,
      "SocialSecurityNumber": null,
      "Phone": null,
      "Company": null,
      "DateOfBirth": null
    },
    "BillingAddress": {
      "ID": 335,
      "City": null,
      "ZipCode": null,
      "State": null,
      "Street": null,
      "StreetNumber": null,
      "HouseNumber": null,
      "HouseExtension": null,
      "Country": "BR"
    },
    "ShippingAddress": null,
    "Articles": null,
    "Details": null,
    "ReferenceDetails": null,
    "CustomParameters": null,
    "PreapprovalID": 1744,
    "Status": {
      "ID": 2,
      "Info": "Success",
      "Reasons": null
    },
    "MethodTransactionID": null,
    "TokenLifetime": null,
    "Capture": null,
    "RedirectURL": null
  }
}