Payment Gateway APIs (1.0.0)

Download OpenAPI specification:Download

Payment Connector Microservice for all payment related APIs

payment

Make Payment

creates payment

SecurityApiKeyAuth
Request
Request Body schema: application/json

payments's details

gateway
required
string
Enum: "stripe" "checkout" "easypaisa" "splitit" "klarna" "bitpay" "affirm" "nift" "paypro" "bykeacash" "cardpointe" "coinify" "paypal" "square" "meezan" "hbl" "braintree" "bigcommerce" "amazon_pay"
required
object
source
string
tokenized_card
string
Enum: "true" "false"
card_id
string
prev_charge_id
string
card_holder_name
string
account_number
string
card_number
string
expiry_month
string
expiry_year
string
cvv
string
customer_name
string
customer_email
string
customer_gender
string
customer_date_of_birth
string
amount
number
tax_amount
number
currency
string
country
string
locale
string
three_ds
string
Enum: "true" "false"
installments
integer
store_id
string
order_id
string
transaction_id
string
tracking_id
string
reference_order_id
string
refund_under_cancel
string
refund_strategy
string
object
object
object (addressObject)
object (addressObject)
object (merchantURL)
Array of objects (orderItems)
object (niftOtpObj)
object (doNiftTranactionObj)
object
Responses
200

payment successfully charged

201

payment successfully accepted

202

payment accepted for processing

400

bad request

401

unauthorized

500

internal server error

post/payment
Request samples
application/json
{
  • "gateway": "stripe",
  • "gateway_credentials": {
    },
  • "source": "card",
  • "tokenized_card": "true",
  • "card_id": "src_4567fghj",
  • "prev_charge_id": "pay_rdfhgjgfd345",
  • "card_holder_name": "Bruce Wayne",
  • "account_number": "4242424242424242",
  • "card_number": "4242424242424242",
  • "expiry_month": "12",
  • "expiry_year": "2022",
  • "cvv": "314",
  • "customer_name": "Bruce Wayne",
  • "customer_email": "bruce@test.com",
  • "customer_gender": "bruce@test.com",
  • "customer_date_of_birth": "bruce@test.com",
  • "amount": 2000,
  • "tax_amount": 2000,
  • "currency": "usd",
  • "country": "US",
  • "locale": "en-us",
  • "three_ds": "true",
  • "installments": 4,
  • "store_id": "5678",
  • "order_id": "1234",
  • "transaction_id": "ABC-1234",
  • "tracking_id": "ABC-1234-2345",
  • "reference_order_id": "ABC-1234",
  • "refund_under_cancel": "refund policy under cancel",
  • "refund_strategy": "refund strategy under refund",
  • "payment_metadata": {
    },
  • "customer_metadata": {
    },
  • "shipping_address": {
    },
  • "billing_address": {
    },
  • "merchant_urls": {
    },
  • "order_items": [
    ],
  • "nift_otp": {
    },
  • "nift_transaction": {
    },
  • "source_metadata": {
    }
}
Response samples
application/json
{
  • "gateway_response": {
    },
  • "success": true,
  • "service_message": "payment successfully",
  • "further_action": true,
  • "html_snippet": "<div id=\"klarna-checkout-container\"................."
}

Get Payment

return payment object based on paymentID

SecurityApiKeyAuth
Request
path Parameters
ID
required
string

id of the payment

query Parameters
gateway
required
string

gateway type

Enum: "stripe" "checkout" "easypaisa" "splitit" "klarna" "bitpay" "affirm" "nift" "paypro" "bykeacash" "cardpointe" "coinify" "paypal" "square" "meezan" "hbl" "braintree" "bigcommerce" "amazon_pay"
store_id
string

id of store

account_num
string

account number

date
string

payment date

Responses
200

payment response

400

bad request

401

unauthorized

500

internal server error

get/payment/{ID}
Request samples
Response samples
application/json
{
  • "gateway_response": {
    },
  • "success": true,
  • "service_message": "payment successfully",
  • "further_action": true,
  • "html_snippet": "<div id=\"klarna-checkout-container\"................."
}

Get Payment Status

3DS payment status

SecurityApiKeyAuth
Request
Request Body schema: application/json

event's details

gateway
required
string
webhook_request
required
object
Responses
200

payment successfully charged

201

payment successfully accepted

202

payment accepted for processing

400

bad request

401

unauthorized

500

internal server error

501

gateway not implemented

post/payment/status
Request samples
application/json
{
  • "gateway": "string",
  • "webhook_request": { }
}
Response samples
application/json
{
  • "gateway_response": {
    },
  • "success": true,
  • "service_message": "payment successfully",
  • "further_action": true,
  • "html_snippet": "<div id=\"klarna-checkout-container\"................."
}

Redirect URL

return redirect url or access token

SecurityApiKeyAuth
Request
query Parameters
gateway
required
string

gateway type

Enum: "stripe" "checkout" "easypaisa" "splitit" "klarna" "bitpay" "affirm" "nift" "paypro" "bykeacash" "cardpointe" "coinify" "paypal" "square" "braintree" "bigcommerce"
type
required
string

type of oauth request

code
string

authorization code

response_type
string

authorization code

state
string

state id

merchant_id
required
string

merchant id

client_id
string

id of client

secret_id
string

secret id of client

access_token
string

access_token

refresh_token
string

refresh_token

Responses
200

oauth response

401

unauthorized

500

internal server error

get/oauth
Request samples
Response samples
application/json
{
  • "gateway_response": {
    },
  • "success": true,
  • "service_message": "payment successfully",
  • "further_action": true,
  • "html_snippet": "<div id=\"klarna-checkout-container\"................."
}

Refund Payment

refund payment

SecurityApiKeyAuth
Request
Request Body schema: application/json

refund's details

id
required
string
object (payment)
Responses
200

payment successfully refunded

201

refund successfully accepted

202

refund accepted for processing

400

bad request

401

unauthorized

500

internal server error

post/refund
Request samples
application/json
{
  • "id": "ch_3K4J7wBNxEvFARuJ1srJDt40",
  • "metadata": {
    }
}
Response samples
application/json
{
  • "gateway_response": {
    },
  • "success": true,
  • "service_message": "payment successfully",
  • "further_action": true,
  • "html_snippet": "<div id=\"klarna-checkout-container\"................."
}

Capture Payment

capture payment

SecurityApiKeyAuth
Request
Request Body schema: application/json

capture's details

id
required
string
object (payment)
Responses
200

payment successfully refunded

201

refund successfully accepted

202

refund accepted for processing

400

bad request

401

unauthorized

500

internal server error

post/capture
Request samples
application/json
{
  • "id": "ch_3K4J7wBNxEvFARuJ1srJDt40",
  • "metadata": {
    }
}
Response samples
application/json
{
  • "gateway_response": {
    },
  • "success": true,
  • "service_message": "payment successfully",
  • "further_action": true,
  • "html_snippet": "<div id=\"klarna-checkout-container\"................."
}

Void Payment

void payment

SecurityApiKeyAuth
Request
Request Body schema: application/json

void's details

id
required
string
object (payment)
Responses
200

payment successfully refunded

201

refund successfully accepted

202

refund accepted for processing

400

bad request

401

unauthorized

500

internal server error

post/void
Request samples
application/json
{
  • "id": "ch_3K4J7wBNxEvFARuJ1srJDt40",
  • "metadata": {
    }
}
Response samples
application/json
{
  • "gateway_response": {
    },
  • "success": true,
  • "service_message": "payment successfully",
  • "further_action": true,
  • "html_snippet": "<div id=\"klarna-checkout-container\"................."
}

Get Bank List

get bank list

SecurityApiKeyAuth
Responses
200

bank list response

401

key is missing or invalid

500

internal server error

get/banklist
Request samples
Response samples
application/json
{
  • "values": [
    ],
  • "pageNumber": "string",
  • "pageSize": "string",
  • "totalNumberOfPages": "string",
  • "totalNumberOfRecords": "string"
}

card

Create Card

create card

SecurityApiKeyAuth
Request
Request Body schema: application/json

card's details

gateway
required
string
Enum: "stripe" "checkout" "easypaisa" "splitit" "klarna" "bitpay" "affirm" "nift" "paypro" "bykeacash" "cardpointe" "coinify" "paypal" "square" "meezan" "hbl" "braintree" "bigcommerce" "amazon_pay"
required
object
source
string
tokenized_card
string
Enum: "true" "false"
card_id
string
prev_charge_id
string
card_holder_name
string
account_number
string
card_number
string
expiry_month
string
expiry_year
string
cvv
string
customer_name
string
customer_email
string
customer_gender
string
customer_date_of_birth
string
amount
number
tax_amount
number
currency
string
country
string
locale
string
three_ds
string
Enum: "true" "false"
installments
integer
store_id
string
order_id
string
transaction_id
string
tracking_id
string
reference_order_id
string
refund_under_cancel
string
refund_strategy
string
object
object
object (addressObject)
object (addressObject)
object (merchantURL)
Array of objects (orderItems)
object (niftOtpObj)
object (doNiftTranactionObj)
object
Responses
200

card successfully created

201

card successfully accepted

202

card accepted for processing

400

bad request error

500

internal server error

post/card
Request samples
application/json
{
  • "gateway": "stripe",
  • "gateway_credentials": {
    },
  • "source": "card",
  • "tokenized_card": "true",
  • "card_id": "src_4567fghj",
  • "prev_charge_id": "pay_rdfhgjgfd345",
  • "card_holder_name": "Bruce Wayne",
  • "account_number": "4242424242424242",
  • "card_number": "4242424242424242",
  • "expiry_month": "12",
  • "expiry_year": "2022",
  • "cvv": "314",
  • "customer_name": "Bruce Wayne",
  • "customer_email": "bruce@test.com",
  • "customer_gender": "bruce@test.com",
  • "customer_date_of_birth": "bruce@test.com",
  • "amount": 2000,
  • "tax_amount": 2000,
  • "currency": "usd",
  • "country": "US",
  • "locale": "en-us",
  • "three_ds": "true",
  • "installments": 4,
  • "store_id": "5678",
  • "order_id": "1234",
  • "transaction_id": "ABC-1234",
  • "tracking_id": "ABC-1234-2345",
  • "reference_order_id": "ABC-1234",
  • "refund_under_cancel": "refund policy under cancel",
  • "refund_strategy": "refund strategy under refund",
  • "payment_metadata": {
    },
  • "customer_metadata": {
    },
  • "shipping_address": {
    },
  • "billing_address": {
    },
  • "merchant_urls": {
    },
  • "order_items": [
    ],
  • "nift_otp": {
    },
  • "nift_transaction": {
    },
  • "source_metadata": {
    }
}
Response samples
application/json
{
  • "token": "abc",
  • "gateway": "checkout",
  • "brand": "Visa",
  • "fingerprint": "fghjgfrdXFYTBJguVXF",
  • "last4": "2006-01-02 15:04:05",
  • "type": "credit",
  • "success": "201-Accepted",
  • "gateway_message": "card not valid",
  • "gateway_code": "Accepted"
}

Get Card By ID

get card with id

SecurityApiKeyAuth
Request
path Parameters
ID
required
string

id of the card

query Parameters
gateway
required
string
Enum: "stripe" "checkout" "easypaisa" "splitit" "klarna" "bitpay" "affirm" "cardpointe" "meezan" "hbl" "braintree" "bigcommerce"
Responses
200

cards retrieved

401

key is missing or invalid

404

card not found

500

internal server error

get/card/{ID}
Request samples
Response samples
application/json
{
  • "token": "abc",
  • "gateway": "checkout",
  • "brand": "Visa",
  • "fingerprint": "fghjgfrdXFYTBJguVXF",
  • "last4": "2006-01-02 15:04:05",
  • "type": "credit",
  • "success": "201-Accepted",
  • "gateway_message": "card not valid",
  • "gateway_code": "Accepted"
}