Skip to main content
Version: 1.0.0

Transaction

Use this endpoint to submit onetime payments. The merchant account receiving funds is provided in "merchant_account".

Test Cards Information​

Use these following card numbers to test your sandbox integration. P.S: You cannot run live transactions on sandbox environment.

Card BrandCard NumberExpiry DateAmount (in USD)
Visa4111111111111111122950
MasterCard5500000000000004122950
American Express340000000000009122950
JCB3566002020140006122950
Discover6011000000000004122950
Diners Club36438999960016122950
China Union Pay6250941006528599122950

Payload Parameters​

AttributeTypeDescriptionIs Required
fullNamestringname as it appears on the cardrequired
emailstringcustomer (purchaser) email. Receipts will be sent to this emailoptional
cardnumstringcredit card number without spaces or dashesrequired
cardtypestringcredit card type: Visa, Mastercard, Discover, American Expressrequired
cardmonthstringcard expiration monthrequired
cardyearstringcard expiration yearrequired
cardcvcstringcard cvvrequired
promocodestringPromo code(for discounts). Must be stored/defined in the system. Please contact support for more details regarding how to use promo codesoptional
product_idstringProduct ID, if merchant has product on our e-commerce page. If none, please enter 999required, default=999
unit_countstringThe unit price will be multiplied by the value of unit_count. By default, the value should be 1required, default=1
unit_pricestringamount of a unit of transaction. The final amount charged is unit_price * unit_countrequired
zipcodestringzip code of the card or customer zip code.required
descriptionstringTransaction derscriptionrequired
memostringTransaction memo. Some clients use this for tracking purposes on Quickbooksoptional
merchant_accountstringMerchant account to who this transaction will be paid torequired
phone_numberstringcustomer phone number to receive transaction receipts tooptional
api_keystringmerchant's paycruiser API keyrequired
tipstringdollar value to add to the final amountoptional

Request​

curl --request POST \
--url https://sandbox-api.paycruiser.com/pay/ \
--data '{
"fullName":"Jane Doe",
"email":"",
"cardnum":"4111111111111111",
"cardtype":"visa",
"cardmonth":"11",
"cardyear":"22",
"cardcvc":"123",
"promocode":"",
"product_id":999,
"unit_count":1,
"unit_price":"50",
"zipcode":"90802",
"description":"",
"memo":"",
"merchant_account":"PAYCRUISER-TEST",
"phone_number":"",
"tip":""
}'

Response​

You should always display payment_status to UI.

{
"data": {
"fullName": "Ousmane Conde",
"email": "",
"cardnum": "4111111111111111",
"cardtype": "visa",
"cardmonth": "12",
"cardyear": "23",
"cardcvc": "952",
"promocode": "",
"currency_code": "usd",
"product_id": 999,
"unit_count": 1,
"unit_price": "1",
"zipcode": "55116",
"description": "",
"memo": "",
"merchant_account": "PAYCRUISER-SN",
"phone_number": "++15629992511",
"tip": ""
},
"errors": [],
"status_code": 250,
"payment_status": "SUCCESS! Your payment of 1.00 USD was processed",
"success_message": [
"SUCCESS! Your payment of 1.00 USD was processed",
"Your confirmation Number: 171969",
"1 x 1 USD; Memo: mpos id: 1223; Tip: 0.00 USD"
],
"confirmation_code": "171969",
"transaction_tag": "4650684582",
"transaction_id": "ET156323"
}

Transactions Report​

Return the list of all merchant transactions and their status

Request​

curl --request GET \
--url 'https://sandbox-api.paycruiser.com/merchant/transactions/?merchant_id=PAYCRUISER-TEST' \
--header 'Authorization: Token <YOUR_TOKEN>'

Response​

{
"count": 437,
"next": "https://sandbox-api.paycruiser.com/me/transactions/?limit=250&merchant_id=PAYCRUISER-TEST&offset=250",
"previous": null,
"results": [
{
"id": "91a5a764-d84b-459d-bef6-892245d4cb3b",
"is_paid_out": false,
"tag": "6016284342",
"cardholder_name": "Jane Doe",
"card_number": "7234 ***",
"card_type": "MASTERCARD",
"amount": "$69.46",
"transaction_type": "Purchase",
"status": "Approved",
"auth_no": "09310B",
"time": "11/28/2020 19:03:09",
"transaction_datetime": "2020-11-29T03:03:09",
"ref_num": "PAYCRUISER-TEST",
"cust_ref_num": "180715",
"reference_3": null,
"terminal_name": "PAYCRUISER",
"processing_fees": "2.306",
"processing_fees_str": "$ 2.306",
"payout_amount": "67.154",
"payout_amount_str": "$ 67.154",
"payout_status": 2,
"payout_status_str": "Processed",
"payout_record": null
},
{
"id": "a8645983-58e3-48fb-8320-ecb7661ad104",
"is_paid_out": false,
"tag": "6016040314",
"cardholder_name": "JOHN DOE",
"card_number": "7133 ***",
"card_type": "VISA",
"amount": "$104.74",
"transaction_type": "Purchase",
"status": "Approved",
"auth_no": "113082",
"time": "11/28/2020 17:38:08",
"transaction_datetime": "2020-11-29T01:38:08",
"ref_num": "PAYCRUISER-TEST",
"cust_ref_num": "222877",
"reference_3": null,
"terminal_name": "PAYCRUISER",
"processing_fees": "3.223",
"processing_fees_str": "$ 3.223",
"payout_amount": "101.517",
"payout_amount_str": "$ 101.517",
"payout_status": 2,
"payout_status_str": "Processed",
"payout_record": null }, ... ] }

Transaction Detail​

Ruturns a single transaction details

Request​

curl --request GET \
--url 'https://sandbox-api.paycruiser.com/merchant/transactions/dd914aea-720c-4ecb-8200-f8aaf46ce103/?merchant_id=<YOUR-MERCHANT-ID>' \
--header 'Authorization: Token <YOUR_TOKEN>' \
--header 'Content-Type: application/json'

Response​

{
"id": "dd914aea-720c-4ecb-8200-f8aaf46ce103",
"is_paid_out": false,
"tag": "5891626177",
"cardholder_name": "JANE D DOE",
"card_number": "7234 ***",
"card_type": "VISA",
"amount": "$56.23",
"transaction_type": "Purchase",
"status": "Approved",
"auth_no": "134548",
"time": "10/24/2020 16:44:41",
"transaction_datetime": "2020-10-24T23:44:41",
"ref_num": "PAYCRUISER-TEST",
"cust_ref_num": "190232",
"reference_3": null,
"terminal_name": "PAYCRUISER",
"processing_fees": "1.962",
"processing_fees_str": "$ 1.962",
"payout_amount": "54.268",
"payout_amount_str": "$ 54.268",
"payout_status": 2,
"payout_status_str": "Processed",
"payout_record": null
}

Void Or Refund Transaction​

To process refunds, you need to

  1. Have the refund feature enabled on your account. If this is not the case, please contact support at help@paycruiser.com and request activation
  2. Search the transaction you need to refund. Please note, you can only search by transaction_tag and transaction_id

Request​

curl --request GET \
--url 'https://sandbox-api.paycruiser.com/merchant/paycruiser-transactions/?search=4650684582' \
--header 'Authorization: Token <YOUR_TOKEN>'

Response​

{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"id": "c5dd75a3-506f-4b77-b4ec-78497b0cbe0d",
"created_at": "2021-08-27T05:56:13.360412Z",
"updated_on": "2021-08-27T05:56:13.379153Z",
"total_amount_in_cents": "100",
"total_amount_USD": "1.00",
"tip_amount": "0.00",
"tipped_user": null,
"card_type": "visa",
"card_number": "4111 ****",
"card_cvv": "9",
"card_expiry": "12",
"full_name": "Ousmane Conde",
"ref_customer": "163609",
"ref_merchant": "PayCruiser-SN",
"description": "1 x 1 USD; Memo: mpos id: 1223; Tip: 0.00 USD",
"memo": "mpos id: 1223",
"email": "",
"zipcode": "55116",
"unit_count": "1",
"promocode": "NONE",
"phone_number": "",
"resp_correlation_id": "134.3004377289767",
"resp_transaction_status": "approved",
"resp_validation_status": "success",
"resp_transaction_type": "purchase",
"resp_transaction_id": "ET128985",
"resp_transaction_tag": "4650744783",
"resp_method": "credit_card",
"resp_amount": "100",
"resp_currency": "USD",
"resp_cvv2": null,
"resp_card_type": "visa",
"resp_cardholder_name": "Ousmane Conde",
"resp_card_number": "1111",
"resp_exp_date": "1223",
"resp_bank_resp_code": "100",
"resp_bank_message": "Approved",
"resp_gateway_resp_code": "00",
"resp_gateway_message": "Transaction Normal",
"resp_error_msg": null
}
]
}
  1. Grab the values for keys(id,resp_transaction_id and resp_transaction_tag) of the transaction returned
  2. Process the refund

Request​

curl --request POST \
--url http://localhost/merchant/paycruiser-transactions/<id>/refund/ \
--header 'Authorization: Token <YOUR_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"merchant_ref": "<Your merchant name or the merchant-name of your sub-merchant you are processing this transaction for>",
"transaction_id":"ET128985", # This is resp_transaction_id
"transaction_tag": "4650744783", # this is resp_transaction_tag
"transaction_type": "void", # "refund" if you would like to process refund instead. You can only void same day transactions
"method": "credit_card",
"amount": "100",
"currency_code": "USD"
}'

Response​

{
"correlation_id": "134.3004427469539",
"transaction_status": "approved",
"validation_status": "success",
"transaction_type": "refund",
"transaction_id": "RETURN",
"transaction_tag": "4650747768",
"method": "credit_card",
"amount": "100",
"currency": "USD",
"bank_resp_code": "100",
"bank_message": "Approved",
"gateway_resp_code": "00",
"gateway_message": "Transaction Normal",
"retrieval_ref_no": "210826",
"tokenized_card_number": "7818177350131111",
"is_success": 1
}