Create a Charge

This endpoint initiates a charge request to charge a credit card or any other payment source.

Log in to see full request history

If your API key is in test mode, the provided payment source (e.g., test card) will not be charged, although all other operations will be treated as if in live mode (Tap assumes that the charge would have been completed successfully.)

Body Params
float
required
Defaults to 1

The amount to be collected by this payment, in ISO standard decimal places. A positive decimal representing how much to charge in the currency unit (e.g: 100 to charge $100 and 100.5 to charge $100.50). The minimum amount is $0.100 for any charge currency.

string
required
Defaults to KWD

Three-letter ISO currency code, in uppercase. Must be a supported currency.

boolean
Defaults to true

This parameter determines whether the charge was initiated by customer or not

boolean
Defaults to true

The 3D Secure request status for a particular charge. Values can be either true or false.

boolean
Defaults to false

Payer can save credit cards for future purpose but a customer phone number is required to save the card. Values can be either be True or False. In order to use this feature, save card feature needs to be activated on the Merchant Account.

payment_agreement
object

Serves as a unique identifier for referencing and managing the payment agreement

string
Defaults to Test Description

An arbitrary string which you can attach to a Charge request with more details, if needed.

order
object

The object represents a specific order information such as order ID of the related transaction.

metadata
object

The set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

receipt
object

Note: this feature is no longer supported

reference
object

The reference numbers related to the charge.

customer
object
required

The details about the customer who will be performing the transaction.

merchant
object

The ID of the Merchant Account. Available on the Tap Dashboard (goSell > API Credentials > Merchant ID)

source
object
required

The details about the payment method at the time of the transaction. Possible values: for local payment methods, use the respective source_id. Example: For KNET, use src_kw.knet; for capturing a token, use the token_id; to authorize an existing authorized transaction use the authorize_id; to display all payment methods in a Tap hosted page, use src_all; to display only the card payment methods in a Tap hosted page, use src_card; for capturing from saved card for customer, create a token by using Create a Token API (make sure to pass customer_id in the customer object); . Refer to Payment Methods guide for more information.

post
object

The Webhook URL. After payment is completed, Tap will POST the response payload as a raw data to this URL.

redirect
object
required

After payment is completed, payer will be redirected to this URL (KNET, mada and 3D secure charge requests requires Redirect URL)

payment_provider
object

Information about the payment provider associated with this charge

platform
object

The Platform parameter identifies the platform under which the merchant is operating, linking the transaction to the appropriate platform.

Responses

Language
Credentials
Click Try It! to start a request and see the response here! Or choose an example:
application/json