Created with Sketch.
Created with Sketch.

AuthorizeRecurringPayment

POST /CheckOut2Api/Commerce/AuthorizeRecurringPayment

The method issues a recurring payment by a partner. Input parameters needs to be the original externalid (from checkout session where user consent was given) plus recurringToken from that response.

Input Parameters

NameData TypeDefault ValueDescription
ExternalIdStringNone. Must be specified.An ID acquired when initializing a Check-Out session.
RecPmtTokenStringNone. Must be specified.A random unique ID generated by the Check-Out when partner offer.
PriceDecimalNone. Must be specifiedThe total amount to pay. Must be greater than 0.
ItemsClass List of ItemsNone. At least one item must be specified.A list of items representing the individual rows on an invoice. Individual items may have a negative value but the total sum of all items must be positive.
OrderReferenceStringNone. Must be specified.An ID that identifies the order for which the purchase is to be made.

Items

The class represents a single row that appears on an invoice. Typically a purchased commodity but it can also be a more abstract think such as a discount with a negative value.

PropertyData TypeDefault ValueDescription.
DescriptionString (max. 35 characters)None. Must be specified.A shorter description of the item (that would typically appear on an invoice line)
NotesString (max. 35 characters)An empty stringAn optional longer description of the item that might or might not be displayed on the invoice.
AmountDecimalNone. Must be specified.The item amount. Can be negative, zero or positive.
TaxCodeStringNone, Must be specified.The tax code. 6, 10,12,14,24,25,
TaxAmountDecimal0.00The item tax amount. Can be zero or positive.

Example request

{
  "ExternalId": "19ac0d1ee909c302d212b4324d9194b5",
  "RecPmtToken" : "5a64a5847abedb9aab8eca79ff54fb59"
  "Price" : 100.00,
  "OrderReference" : "123456",
  "Items": [
    {
      "Amount": 90.00,
      "Description" : "quitar",
      "Notes" : "black",
      "TaxCode" : "25",
       "TaxAmount" : 18.00
    },
    {
      "Amount": 10,
      "Description" : "piano"
      "Notes" : "white",
      "TaxCode" : "25",
      "TaxAmount" : 2.00
    }
  ],
}

Return Value

If successful, the method returns a HTTP status code 200 (OK) plus new externalid as content.

When authorization is successful – Avarda expects a purchase order for the actual delivery sent in to this new externalid.