Charge Card

Processing transaction from the debit/credit card.

Some card required address verification (USA Card), and other card required 3D secure (VISA).

For card required 3D secure use the form which is returned in api response data to enter the OTP from your bank and complete your transaction.

You have to redirect to the link which is returned in respomse data. In addition, you need to store the value of field reference and orderid for using api Verify Transaction.

Create Transaction

POST https://safepayltd.net/api/charge

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer YOUR_SECRET_KEY

Body

Name
Type
Description

firstname *

string

first name

lastname *

string

last name

email *

string

email

phone *

number

phone

country *

string

county code by alpha 2

state *

string

state

city *

string

city

zip_code *

number

portal code

address *

string

address

amount *

number

amount

currency *

string

currency (USD)

cardName *

string

card holder

cardNumber *

number

card number

expMonth *

number

expiry month (MM)

expYear *

number

expiry year (YYYY)

cardCVV *

number

card cvv

reference *

string

transaction reference

ip_address *

string

ip address

callback_url *

string

callback url (GET)

webhook_url

string

webhook url (POST)

Response

Response 3D
{
  "status" : "success",
  "message" : "success",
  "data" : {
      "reference" : "abssjsu222",
      "orderid" : "1282827",
      "link" : "https:/safepayltd.net/checkout/1136/a292929acvvb881272aajakakaka"
  }
}

Response 2D
{
  "status" : "success",
  "message" : "success",
  "data" : {
      "reference" : "abssjsu222",
      "orderid" : "1282827",
      "transaction" : {
          "status" : "success",
          "message": "Transaction is sucessful"
      }
  }
}

Last updated