transaction.create
transaction.create
transaction.create
Note: command is supported by all CC and mobile processors (RG, AR, NB, PO, RG, IO, GP).
Description
Initialize and finish transaction in one command
Input Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| pp_type | (string) | yes | Payment processor type |
| tracking_order | (int) | no | Order ID to be tracked on client app. |
| tracking_user | (int) | yes | User ID to be tracked on client app. |
| tracking_tag | (int) | yes | Tag ID to be tracked on client app. |
| first_name | (string) | no | First Name |
| last_name | (string) | no | Last Name |
| zipcode | (string) | no | User ZIP code |
| country | (string) | no | Country abbr. |
| (string) | yes | User email address | |
| ip | (string) | yes | IP address from which user is making the transaction |
| host | (string) | yes | Host form which user is making the transaction |
| currency | (string) | yes | Currency abbr. |
| order_type | (string) | no | Allowed values '' (empty string) and xsale. Determine if order is Cross Sale or not. |
| initial_order_hash | (string) | no | Use only in case of order_type = 'xsale'. Put hash from transation.init response of initial/basic order |
| return_url | (string) | no | Return URL (used for PayPal like PP's) |
| cancel_url | (string) | no | Cancel URL (used for PayPal like PP's) |
| items | (array) | yes | Array of items |
| pp_config | (array) | no | Merchand data params to override |
| card_number | (string) | yes | Credit Card Number |
| transaction_id | (string) | no | Can be used instead of Credit Card for repeated billing transactions |
| card_cvv2 | (string) | yes | Credit Card CVV2 |
| card_expire | (string) | yes | Credit Card Expiration date |
| xsale-descriptor | (string) | no | Force descriptor value (XS only) |
| step_down | (int) | no | Force step down procedure (start immediately with stepped down price) |
| allow_step_down | (int) | no | Allow step down procedure (start immediately when 1st attempt fails - if possible) |
| merchant_order_number | (string) | *yes(GP) | GP only param |
| package_name | (string) | *yes(GP) | GP only param |
| purchase_token | (string) | *yes(GP) | GP only param |
| purchase_id | (string) | *yes(GP/IO) | GP and IO only param |
| receipt-data | (string) | *yes(IO) | IO only param |
| fingerprint | (string) | *no(RG 3DS 2) | **RocketGate only param. Required in step 2, device fingerpring |
| user_agent | (string) | *no(RG 3DS 2) | **RocketGate only param. Required in step 2, user's user agent |
| user_accept | (string) | *no(RG 3DS 2) | **RocketGate only param. Required in step 2, user's user_accept |
| browser_fields | (string) | *no(RG 3DS 2) | **RocketGate only param. Required in step 2, JSON containing browser dada (details below) |
| md | (string) | *no(RG 3DS 2) | **RocketGate only param. Required in step 3, returned transaction id (md, guid) |
items
| Name | Type | Required | Description |
|---|---|---|---|
| trial_amount | float | no | Trial Amount |
| trial_unit | string (day|week|month|year) | no | Trial unit |
| trial_period | int | no | Trial period |
| amount | float | yes | rebill amount |
| rebill_unit | string (day|week|month|year) | yes | rebill unit |
| rebill_period | int | yes | rebill period |
| max_rebill_count | int | yes | max rebill count (-1 unlimited) |
| description | string | yes | Item description |
pp_config
| Name | Type | Required | Description |
|---|---|---|---|
| ppac_id | int | no | Merchant account id (defined for partner in payment app) |
| force_acc | int | no | Rocket Gate specific, if set it will set appropriate merchantAccount parameter for API call to Rocket Gate |
| force_mid | int | no | Rocket Gate specific, if set it will set appropriate merchantSiteID parameter for API call to Rocket Gate |
| force_3ds | int | no | Rocket Gate specific, Experimental/temporary, when set to true/1 it will allow to make 3ds 2.0 transaction |
browser_fields (*json containing optioinal fields listed below)
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| java_enabled | bool | no | Java enabled | true |
| language | string | no | Java enabled | en-US |
| color_depth | numeric | no | Java enabled | 32 |
| screen_height | numeric | no | Java enabled | 864 |
| screen_width | numeric | no | Java enabled | 1536 |
| time_zone | numeric | no | Java enabled | 480 |
Return
| Name | Type | Description |
|---|---|---|
| result | array | Result array with data |
Usage Example
{
"result": {
"code": 700,
"status": "Action completed successfully",
"command": "transaction.create",
"result": {
"hash": "1554909890217532c2fe3c75da8275e3",
"redirect": "",
"success": true,
"rg_avs_response": "",
"rg_cvv2_code": "",
"authNo": "422144",
"merchantInvoiceID": "M1_4153916_49356",
"merchantAccount": "2",
"approvedAmount": "1.0",
"cardLastFour": "1881",
"version": "1.0",
"merchantCustomerID": "M1_4153916",
"reasonCode": "0",
"retrievalNo": "100016a07da07af",
"payType": "CREDIT",
"cardHash": "3RPN+a+d07r0bOlq7NcWPKvzgcyyHmPxXw+hCxxmP6k=",
"cardDebitCredit": "1",
"cardDescription": "UNKNOWN",
"cardCountry": "CA",
"cardType": "VISA",
"bankResponseCode": "0",
"approvedCurrency": "PLN",
"guidNo": "100016A07DA07AF",
"cardExpiration": "0621",
"responseCode": "0",
"remote_tran_id": "100016A07DA07AF",
"payment_tran_id": 298906,
"rg_merchant_id": "1358984622",
"rg_customer_id": "M1_4153916",
"rg_reason_code": "0",
"rg_guid_no": "100016A07DA07AF",
"rg_cc_hash": "3RPN+a+d07r0bOlq7NcWPKvzgcyyHmPxXw+hCxxmP6k=",
"items_data": [
{
"item_id": "69312",
"tracking_item": "0"
}
],
"sub_ids": [
36214
],
"ppac_id": "74"
},
"request": {
"cmd": "transaction.create",
"data": {
"tracking_user": "4153916",
"tracking_tag": "14",
"tracking_item": "13084",
"first_name": "Jeremiah",
"last_name": "Hawn",
"street": "",
"city": "",
"state": "",
"zipcode": "92691",
"country": "US",
"email": "xstest426@xstest426.net",
"ip": "68.5.187.46",
"host": "68.5.187.46",
"currency": "PLN",
"items": [
{
"amount": "1",
"description": "$1.00USD - 1 Month Premium Membership Access||13084",
"max_rebill_count": "1",
"rebill_unit": "day",
"rebill_period": "30",
"trial_period": "30",
"trial_amount": "1.00",
"trial_unit": "day"
}
],
"pp_type": "RG",
"transaction_id": "297634"
},
"token": "dating-frontend-m1@staging",
"pass": "***"
},
"ts": 1554909890,
"origin_ip": "69.61.68.253",
"errors": null
}
}Usage Example 3DSv2 - full workflow example
Step 1
{
"code": 631,
"status": "Transaction was declined because 3-D Secure 2.0 fingerprint is required",
"command": "transaction.create",
"result": {
"hash": "160501994931331a6a4eec14438345dc",
"success": false,
"rg_avs_response": "",
"rg_cvv2_code": "",
"needs_resubmission": true,
"cardType": "VISA",
"_3DSECURE_DEVICE_COLLECTION_JWT": "eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiI3MjA1OTE5OTA1ODI1NTkwOSIsImlhdCI6MTYwNTAyMDMyNywiaXNzIjoiNWNmYTVhMDFhZmE4MGQyMjUwZmQzMTc5IiwiT3JnVW5pdElkIjoiNWNmNzA2OWRiYjg3NjgxOTZjMTBhNGU5In0.9EFTeyIQI75ohgmgqfXqGTCA0j7R65IK9GPzzwTzaFU",
"reasonCode": "225",
"merchantInvoiceID": "M1_1_234736",
"merchantAccount": "3",
"version": "1.0",
"cardLastFour": "1091",
"cardHash": "lDeyafqiaLIdgqxNYUJ5FjMvWESYoA3r49aauQoNdEw=",
"guidNo": "1000175B2AAA025",
"responseCode": "2",
"_3DSECURE_DEVICE_COLLECTION_URL": "https:\/\/centinelapistag.cardinalcommerce.com\/V1\/Cruise\/Collect",
"cardExpiration": "1123",
"merchantCustomerID": "M1_1",
"payType": "CREDIT",
"remote_tran_id": "1000175B2AAA025",
"payment_tran_id": 979396,
"rg_merchant_id": "1358984622",
"rg_customer_id": "M1_1",
"rg_reason_code": "2",
"rg_guid_no": "1000175B2AAA025",
"rg_cc_hash": "lDeyafqiaLIdgqxNYUJ5FjMvWESYoA3r49aauQoNdEw=",
"partial_billing": 0,
"partial_billing_factor": 1,
"items_data": [
{
"item_id": "254696",
"tracking_item": "13808"
}
],
"ppac_id": "74"
},
"request": {
"cmd": "transaction.create",
"data": {
"pp_type": "RG",
"card_number": "400000xxxxxx1091",
"card_cvv2": "xxx",
"card_expire": "1123",
"first_name": "tester",
"last_name": "tester",
"zipcode": "10001",
"items": [
{
"amount": "2.96",
"description": "3 months - $15.99GBP\/month^^ENV=staging||13808",
"max_rebill_count": "10",
"rebill_unit": "day",
"rebill_period": "90",
"trial_period": "0",
"trial_amount": "0",
"trial_unit": "day",
"tracking_item": "13808"
}
],
"tracking_company": "1",
"tracking_tag": "1",
"tracking_user": "1",
"email": "tester@tester.com",
"country": "DE",
"state": "1",
"city": "berlin",
"street": "hohestrasee 1",
"ip": "83.30.69.51",
"currency": "EUR",
"return_url": "https:\/\/payment.dvipdev.com\/emulate\/rg3ds",
"cancel_url": "https:\/\/payment.dvipdev.com\/emulate\/rg3ds",
"order_type": "basic",
"pp_config": {
"ppac_id": "74",
"force_3ds": "1"
},
},
"token": "dating-frontend-m1@staging",
"pass": "xxx"
},
"ts": 1605020329,
"origin_ip": "69.61.68.253",
"errors": [
{
"code": 631,
"error_msg": "[225] 3DSecure 2.0 fingerprinting required - 3DSecure 2.0 fingerprinting required - JWT returned, fingepring required"
}
]
}Step 2
{
"code": 615,
"status": "Transaction was declined because 3-D Secure authentication is required",
"command": "transaction.create",
"result": {
"hash": "160501994931331a6a4eec14438345dc",
"success": false,
"rg_avs_response": "",
"rg_cvv2_code": "",
"post_params": {
"ACSredirectURL": "https:\/\/dev-secure.rocketgate.com\/hostedpage\/3DSimulator_2_0.jsp",
"ACSJWT": "https:\/\/payment.dvipdev.com\/emulate\/rg3ds",
"ACStermURL": "https:\/\/payment.dvipdev.com\/listener\/RG",
"ACSmd": "1000175B2AAB663"
},
"needs_resubmission": true,
"merchantInvoiceID": "M1_1_234736",
"merchantAccount": "3",
"approvedAmount": "2.96",
"cardLastFour": "1091",
"version": "1.0",
"_3DSECURE_STEP_UP_URL": "https:\/\/dev-secure.rocketgate.com\/hostedpage\/3DSimulator_2_0.jsp",
"merchantCustomerID": "M1_1",
"scrubResults": "NEGDB=0,PROFILE=0,ACTIVITY=0",
"reasonCode": "202",
"transactionTime": "2020-11-10 09:58:53",
"payType": "CREDIT",
"cardHash": "lDeyafqiaLIdgqxNYUJ5FjMvWESYoA3r49aauQoNdEw=",
"_3DSECURE_STEP_UP_JWT": "https:\/\/payment.dvipdev.com\/emulate\/rg3ds",
"cardDebitCredit": "0",
"cardDescription": "UNKNOWN",
"cardType": "VISA",
"approvedCurrency": "EUR",
"_3DSECURE_VERSION": "2.2.0",
"guidNo": "1000175B2AAB663",
"cardExpiration": "1123",
"responseCode": "2",
"remote_tran_id": "1000175B2AAB663",
"payment_tran_id": 979406,
"rg_merchant_id": "1358984622",
"rg_customer_id": "M1_1",
"rg_reason_code": "2",
"rg_guid_no": "1000175B2AAB663",
"rg_cc_hash": "lDeyafqiaLIdgqxNYUJ5FjMvWESYoA3r49aauQoNdEw=",
"partial_billing": 0,
"partial_billing_factor": 1,
"items_data": [
{
"item_id": "254696",
"tracking_item": "13808"
}
],
"ppac_id": "74"
},
"request": {
"cmd": "transaction.create",
"data": {
"pp_type": "RG",
"card_number": "400000xxxxxx1091",
"card_cvv2": "xxx",
"card_expire": "1123",
"first_name": "tester",
"last_name": "tester",
"zipcode": "10001",
"items": [
{
"amount": "2.96",
"description": "3 months - $15.99GBP\/month^^ENV=staging||13808",
"max_rebill_count": "10",
"rebill_unit": "day",
"rebill_period": "90",
"trial_period": "0",
"trial_amount": "0",
"trial_unit": "day",
"tracking_item": "13808"
}
],
"tracking_company": "1",
"tracking_tag": "1",
"tracking_user": "1",
"email": "tester@tester.com",
"country": "DE",
"state": "1",
"city": "berlin",
"street": "hohestrasee 1",
"ip": "83.30.69.51",
"currency": "EUR",
"return_url": "https:\/\/payment.dvipdev.com\/emulate\/rg3ds",
"cancel_url": "https:\/\/payment.dvipdev.com\/emulate\/rg3ds",
"order_type": "basic",
"pp_config": {
"ppac_id": "74",
"force_3ds": "1"
},
"user_agent": "Mozilla\/5.0 (X11; Ubuntu; Linux x86_64; rv:82.0) Gecko\/20100101 Firefox\/82.0",
"user_accept": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,*\/*;q=0.8",
"fingerprint": "0_6248ed13-b695-4ada-821b-02a11ed38591"
},
"token": "dating-frontend-m1@staging",
"pass": "***"
},
"ts": 1605020334,
"origin_ip": "69.61.68.253",
"errors": [
{
"code": 615,
"error_msg": "[202] Declined - 3-DS - Transaction was declined because 3-D Secure authentication is required"
}
]
}Step 3
{
"code": 700,
"status": "Action completed successfully",
"command": "transaction.create",
"result": {
"hash": "160501994931331a6a4eec14438345dc",
"success": true,
"rg_avs_response": "Y",
"rg_cvv2_code": "M",
"authNo": "673033",
"merchantInvoiceID": "M1_1_234736",
"merchantAccount": "3",
"approvedAmount": "2.96",
"cardLastFour": "1091",
"version": "1.0",
"avsResponse": "Y",
"merchantCustomerID": "M1_1",
"scrubResults": "NEGDB=0,PROFILE=0,ACTIVITY=0",
"ECI": "05",
"cvv2Code": "M",
"reasonCode": "0",
"transactionTime": "2020-11-10 09:59:30",
"payType": "CREDIT",
"cardHash": "lDeyafqiaLIdgqxNYUJ5FjMvWESYoA3r49aauQoNdEw=",
"cardDebitCredit": "0",
"cardDescription": "UNKNOWN",
"cardType": "VISA",
"bankResponseCode": "0",
"approvedCurrency": "EUR",
"guidNo": "1000175B2AB474B",
"cardExpiration": "1123",
"responseCode": "0",
"remote_tran_id": "1000175B2AB474B",
"payment_tran_id": 979416,
"rg_merchant_id": "1358984622",
"rg_customer_id": "M1_1",
"rg_reason_code": "0",
"rg_guid_no": "1000175B2AB474B",
"rg_cc_hash": "lDeyafqiaLIdgqxNYUJ5FjMvWESYoA3r49aauQoNdEw=",
"partial_billing": 0,
"partial_billing_factor": 1,
"items_data": [
{
"item_id": "254696",
"tracking_item": "13808"
}
],
"sub_ids": [
189636
],
"ppac_id": "74"
},
"request": {
"cmd": "transaction.create",
"data": {
"pp_type": "RG",
"card_number": "400000xxxxxx1091",
"card_cvv2": "xxx",
"card_expire": "1123",
"first_name": "tester",
"last_name": "tester",
"zipcode": "10001",
"items": [
{
"amount": "2.96",
"description": "3 months - $15.99GBP\/month^^ENV=staging||13808",
"max_rebill_count": "10",
"rebill_unit": "day",
"rebill_period": "90",
"trial_period": "0",
"trial_amount": "0",
"trial_unit": "day",
"tracking_item": "13808"
}
],
"tracking_company": "1",
"tracking_tag": "1",
"tracking_user": "1",
"email": "tester@tester.com",
"country": "DE",
"state": "1",
"city": "berlin",
"street": "hohestrasee 1",
"ip": "83.30.69.51",
"currency": "EUR",
"return_url": "https:\/\/payment.dvipdev.com\/emulate\/rg3ds",
"cancel_url": "https:\/\/payment.dvipdev.com\/emulate\/rg3ds",
"order_type": "basic",
"pp_config": {
"ppac_id": "74",
"force_3ds": "1"
},
"md": "1000175B2AAB663"
},
"token": "dating-frontend-m1@staging",
"pass": "***"
},
"ts": 1605020372,
"origin_ip": "69.61.68.253",
"errors": null
}Referenced Files
None
Subscribers
None
- Last Author
- aplawecki
- Last Edited
- Oct 14 2022, 03:51