Skrape Standard

This guide will demonstrate how to integrate Skrape Standard

Roadmap

  1. On your server, use our create payment endpoint to submit payment details.

  2. We'll return a link to a payment page.

  3. Your customer will be redirected to this link to complete the payment.

  4. After the transaction is completed, the customer will be redirected back to your website.

API Payload

Key
Type
Required
Description

api_key

string

Yes

API key provided by Skrape to identify the merchant.

amount

string

Yes

Amount to be paid

tx_ref

string

No

A unique reference number for the transaction.

token_name

string

Yes

The name of the token or currency to be used for the transaction.

customer

object

Yes

It holds the customer email, first name, last name

customer.email

string

Yes

The email of the customer.

customer.first_name

string

No

The first name of the customer.

customer.last_name

string

No

The last name of the customer.

customization

object

Yes

It holds the transaction title, description

customization.title

string

Yes

Customization title

customization.description

string

No

Customization description

Integration Guide

This is a command-line cURL command for making a POST request to the Skrape payment API.

curl --location --request POST 'https://api.skrape.io/standard/payment' \
--header 'Authorization: Bearer ${SECRET}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "api_key": "sk_live_ffknsdksndse2233233232"
    "tx_ref": "randomuniqueid",
    "amount": 100,
    "redirect_url": "https://redirect.com",
    "customer": {
        "first_name":"user",
        "last_name":"test",
        "email":"user@mail.com",
        "phone_number":"08111111111"

    },
    "customization": {
        "title":"test 001",
        "description":"testing"
    },
    "callback_url": "https://callback.com"
}'

Sample Response

{
    "message": "Transaction created successfully",
    "data": {
        "link": "https://skrape.io/transaction/initialize/QTYPPDU9L1ghr0b29cO",
        "link_id": "QTYPPDU9L1ghr0b29cO"
    }
}

The command does the following:

  1. It uses the curl command to make a POST request to the https://api.skrape.io/standard/payment endpoint.

  2. It sends a Authorization header with the request, containing an access token that authenticates the request. The token is stored in the SECRET environment variable.

  3. It sends a Content-Type header with the request, set to application/json, indicating that the body of the request contains JSON-encoded data.

  4. It sends a JSON-encoded payload in the body of the request, containing the following fields:

    • api_key: API key for the Skrape service, which authenticates the website to interact with the Skrape service

    • tx_ref: A unique reference for the transaction

    • amount: The amount of the payment

    • redirect_url : A redirect url for the user after successfull payment

    • customer : An object that contains the customer's first name, last name, email, phone_number

    • customization : An object that contains title and description of the checkout page

    • callback_url : A callback URL that will be called after successful payment

  5. After successful execution of the request , the API will process the payment and returns the response accordingly.

Please note that the command is given is just an example and you would need to replace the url, headers, and body contents with your own information accordingly.

Last updated