Overview

A simple guide to manually integrate with Super Payments API.

Here's how to start taking payment and issuing refunds for your customers.

Payments

Integrating with the Payments API is simple.

  • Create a unique offer based on your customer basket contents and the cash reward set you have set
  • Initiate a payment, and redirect your customer to pay with Super Payments.
  • Handle the payment response via a webhook to create an order, or return your customer back to checkout.
  • Expire the offer after you've created our order

You'll find details for Super Payments authentication here.

Simply follow the Payments API instructions to directly integration with Super Payments public API.

878

Here's a shell command example of the offer/ and payments/ requests you can try out yourself...

❗️

Code snippets

Please treat the following code snippets as illustrative examples rather than working code.

curl --request POST \
     --url https://api.superpayments.com/v2/offers \
     --header 'accept: application/json' \
     --header 'checkout-api-key: your key' \
     --header 'content-type: application/json' \
     --header 'referer: www.yourwebsite.com' \
     --data '
{
     "cart": {
          "items": [
               {
                    "name": "toothbrush",
                    "url": "www.toothbrush.com",
                    "quantity": 1,
                    "minorUnitAmount": 10000
               }
          ],
          "id": "34567"
     },
     "minorUnitAmount": 10000,
     "page": "Checkout",
     "output": "both",
     "test": true
}
'

The response from the offers request will provide you with the cashbackOfferId that you must pass in the request to the payments api.

curl --request POST \
     --url https://api.superpayments.com/v2/payments \
     --header 'accept: application/json' \
     --header 'checkout-api-key: your key' \
     --header 'content-type: application/json' \
     --header 'referer: www.yourwebsite.com' \
     --data '
{
     "currency": "GBP",
     "cashbackOfferId": INSERT OFFER ID,
     "successUrl": "https://www.yourwebsite.com/success.html",
     "cancelUrl": "https://www.yourwebsite.com/cancel.html",
     "failureUrl": "https://www.yourwebsite.com/fail.html",
     "minorUnitAmount": 10000,
     "externalReference": "order101",
     "test": true
}
'

Refunds

Processing an instant full or partial refunds with Refunds API is simple.

  • Initiate a refund
  • Handle the refund response via a webhook to process the refund. You must provide this webhook to receive these updates from Super Payments.

You'll find details for Super Payments authentication here.

Simply follow the Refunds API instructions to directly integration with Super Payments public API.

601

Here's a shell command example of the refunds/ requests you can try out yourself...

curl --request POST \
     --url https://api.superpayments.com/v2/refunds \
     --header 'accept: application/json' \
     --header 'checkout-api-key: your key' \
     --header 'content-type: application/json' \
     --data '
{
     "currency": "GBP",
     "transactionId": "27b2ae04-cb8e-4bcb-a976-d14a40518db1",
     "minorUnitAmount": 10000,
     "externalReference": "refund101",
     "test": true
}
'