Riverty/Afterpay

Riverty (formerly Afterpay) is a payment system allowing consumers to pay after receiving the goods.
The Afterpay name is legacy, riverty is an alias of afterpay, the only valid entry points are shown below.

📘

Note

  • In the callback response the payment type (pt), will be either riverty or afterpay, depending on which entry point was used.
  • The options entry point will return afterpay as payment type.

After a consumer has chosen to pay with Riverty, CURO will create a Riverty transaction which is "Not Shipped". After you ship the products to the consumer, the order needs to be captured (confirmed) so that Riverty will start collecting from the consumer.
This can be done in the back-office, or via the Capture entry point.

If there's something wrong with the order, it is also possible to Cancel the order in the back-office.
Riverty requires extra containers specified below to initiate a transaction.

📘

Note

The Riverty generic payment response.

  • If you do not specify all the required fields, you will receive an error or warning container in the response, depending on what is missing.
  • The payment container in the response will include an external field to indicate an external redirect, or a redirect to the standard internal Riverty FORM where the consumer can fill out the missing data.
  • If you collect all required data on your own website, you are required to show the Riverty Terms and Conditions and have the user agree to them via a checkbox. Riverty will also want to review your checkout procedure for approval — please contact your account manager for more details.

Riverty Payment

Entry point: /rest/v1/curo/payment/afterpay/

See the Riverty request parameters in the API reference.

EXTRA REST request elements

Field nameTypeRequiredDescription
[request]containerrequiredGeneral container for this resource. Includes the generic request items.
[consumer]containerrequiredConsumer information for this transaction. (See the Consumer and Shipping elements for riverty).
[cartitems]containerrequiredThe cart items of the webshop order. (See the CartItems elements.)
📘

Note

The Riverty (non-generic) payment response.

  • The returned url depends on whether the information sent to Riverty was processed completely and successfully:
  • incomplete → URL to the default CURO Riverty form. You will also have a warning container indicating which fields are missing.
  • success → URL to url_pending (or url_failure if no pending URL is given); the URL will receive status=pending to indicate it was accepted but must be Captured for Riverty.

Riverty Request samples

Below is a sample of an incomplete request for Riverty (missing some required variables). In this case you will receive a url to a FORM where the consumer can complete the data and submit it to Riverty.

A response for a correct transaction is also shown — in that case you will receive a url to your (provided) success or pending url.

JSON Request Example

POST /rest/v1/curo/payment/riverty/ HTTP/1.1
Accept: application/json
Content-Type: application/json
{
    "site_id" : 1234,
    "currency_id" : "EUR",
    "amount" : 100,
    "reference" : "Reference 1",
    "description" : "Description 1",
    "url_success" : "http://www.example.com/success.html",
    "url_pending" : "http://www.example.com/pending.html",
    "url_failure" : "http://www.example.com/failed.html",
    "url_callback" : "http://www.example.com/control.html",
    "country_id" : "NL",
    "language_id" : "nl",
    "ip" : "1.2.3.4",
    "consumer" : {
        "firstname" : "John",
        "lastname" : "Doe",
        "email" : "[email protected]",
        "address" : "nowhereroad 12",
        "city" : "NonVille",
        "zipcode" : "12345",
        "country_id" : "NL",
        "phone" : "0612345678",
        "dob" : "10-07-1970",
        "gender" : "M"
    },
    "cartitems" : [
        {
            "quantity" : 1,
            "sku" : "hamer_01",
            "name" : "Hamer",
            "price" : 150,
            "vat" : 21,
            "vat_inc" : true,
            "type" : 1
        },
        {
            "quantity" : 1,
            "sku" : "Discount",
            "name" : "Discount total",
            "price" : -50,
            "vat" : 21,
            "vat_inc" : true,
            "type" : 4
        }
    ]
}

Response for a request without all required data:

See the Riverty Payment response elements.

HTTP/1.1 200 OK
Content-Type: application/json
{
  "success": true,
  "warning": "missing consumer data: dob",
  "payment": {
    "action": "redirect",
    "external": false,
    "url": "redirect_url",
    "testmode": 0,
    "transaction_id": "T26123456789"
  }
}

Response for correct request:

HTTP/1.1 200 OK
Content-Type: application/json
{
  "success": true,
  "payment": {
    "action": "redirect",
    "external": true,
    "url": "redirect_url",
    "testmode": 0,
    "transaction_id": "T26123456789"
  }
}

Riverty Cancel

As long as Riverty transactions are not captured, they can be cancelled manually in the back-office or by using this entry point.

Entry point: See the Cancel section of the CURO API reference.

Riverty Refund

The Refund operation must be done using the Transaction ID of a successfully completed transaction.

The amount collected can be refunded in total or partially. You cannot refund amounts bigger than the one sent in the original transaction.

📘

Note

  • You can perform multiple refunds until you reach the total amount of the original Payment and your balance in the system is sufficient.
  • Refunds must be done within 30 days after the capture.

Entry point: See the Refund section of the CURO API reference.


Did this page help you?