On This Page
Payment Transactions
This section provides endpoints and transaction use cases.
Endpoints and Transaction Types
Create Payment Token Endpoints See Creating a Payment Card Token. | |
Test | https://testsecureacceptance.cybersource.com/token/create
|
Production | https://secureacceptance.cybersource.com/token/create
|
Supported transaction type | create_payment_token |
Iframe Create Payment Token Endpoints See
Iframe Implementation. | |
Test | https://testsecureacceptance.cybersource.com/embedded/token/create
|
Production | https://secureacceptance.cybersource.com/embedded/token/create
|
Supported transaction type | create_payment_token |
Iframe Transaction Endpoints See Iframe Implementation. | |
Test | https://testsecureacceptance.cybersource.com/embedded/pay |
Production | https://secureacceptance.cybersource.com/embedded/pay |
Supported transaction type |
|
Iframe Update Payment Token Endpoints See
Iframe Implementation. | |
Test | https://testsecureacceptance.cybersource.com/embedded/token/update
|
Production | https://secureacceptance.cybersource.com/embedded/token/update
|
Supported transaction type | update_payment_token |
One-Click Endpoints See One-Click Checkout. | |
Test | https://testsecureacceptance.cybersource.com/oneclick/pay
|
Production | https://secureacceptance.cybersource.com/oneclick/pay
|
Supported transaction types |
|
Process Transaction Endpoints | |
Test | https://testsecureacceptance.cybersource.com/pay
|
Production | https://secureacceptance.cybersource.com/pay
|
Supported transaction types |
|
Update Payment Token Endpoints See Payment Token Updates. | |
Test | https://testsecureacceptance.cybersource.com/token/update
|
Production | https://secureacceptance.cybersource.com/token/update
|
Supported transaction type | update_payment_token |
Visa Click to Pay Endpoints | |
Test | https://testsecureacceptance.cybersource.com/pay
|
Production | https://secureacceptance.cybersource.com/pay
|
Supported transaction types |
|
Required Signed Fields
Signing fields protects them from malicious actors adding or changing transaction data
during transmission. To sign fields, include them in a comma-separated string in the
signed_field_names
field in your request. To
prevent data tampering, include all request fields in the
signed_field_names
field with the exception of the
card_number
, card_cvn
, and
signature
.These signed fields are required in all
Secure Acceptance
requests: - access_key
- amount
- currency
- locale
- profile_id
- reference_number
- signed_date_time
- signed_field_names
- transaction_type
- transaction_uuid
For descriptions of these fields, see Request Fields.
Payment Tokens
Creating a Payment Card Token
Include the appropriate endpoint that supports the
create_payment_token
transaction type. See Endpoints and Transaction Types. For descriptions of all request and
response fields. See Hosted Payments Page API Fields.Include all request fields in the
signed_field_names
field with the
exception of the card_number
, card_cvn
, and
signature
fields. The signed_field_names
field is
used to generate a signature that is used to verify the content of the transaction in order
to prevent data tampering.Example: Creating a Standalone Payment Card Token
Request
reference_number=12x456789 // Replace X with 3 transaction_type=create_payment_token currency=usd amount=100.00 locale=en access_key=e2b0c0d0e0f0g0h0i0j0k0l0m0n0o0p3 profile_id=0FFEAFFB-8171-4F34-A22D-1CD38A28A384 transaction_uuid=02815b4f08e56882751a043839b7b481 signed_date_time=2020-07-11T15:16:54Z signed_field_names=reference_number,transaction_type,currency,amount,locale,access_key,profile_id,transaction_uuid,signed_date_time,signed_field_names,etc... signature=WrXOhTzhBjYMZROwiCug2My3jiZHOqATimcz5EBA07M= payment_method=card card_type=001 card_number=411111111111xxxx // Replace x with 1 card_expiry_date=12-2022 card_cvn=005 bill_to_forename=Joe bill_to_surname=Smith [email protected] bill_to_address_line1=1 My Apartment bill_to_address_city=Mountain View bill_to_address_postal_code=94043 bill_to_address_state=CA bill_to_address_country=US
Response
req_reference_number=12x456789 // Replace X with 3 req_transaction_type=create_payment_token req_locale=en req_amount=100.00 req_payment_method=card req_card_type=001 req_card_number=xxxxxxxxxxxx1111 req_card_expiry_date=12-2022 req_bill_to_forename=Joe req_bill_to_surname=Smith [email protected] req_bill_to_address_line1=1 My Apartment req_bill_to_address_city=Mountain View req_bill_to_address_postal_code=94043 req_bill_to_address_state=CA req_bill_to_address_country=US req_access_key=e2b0c0d0e0f0g0h0i0j0k0l0m0n0o0p3 req_profile_id=0FFEAFFB-8171-4F34-A22D-1CD38A28A384 req_transaction_uuid=02815b4f08e56882751a043839b7b481 signed_date_time=2020-07-11T15:16:54Z signed_field_names=reference_number,transaction_type,currency,amount,locale,access_key,profile_id,transaction_uuid,signed_date_time,signed_field_names,etc... signature=WrXOhTzhBjYMZROwiCug2My3jiZHOqATimcz5EBA07M= decision=ACCEPT reason_code=100 transaction_id=3735553783662130706689 req_payment_token=CF2194C8A0F545CDE053AF598E0A20DA
Payment Token Transactions
One-Click
The customer is directed to the Order Review page. Depending on the settings you configured
for
Secure Acceptance
Hosted Payments Page
, the customer can view or update billing, shipping, and
payment details before confirming to pay. See Checkout Configuration.Include the appropriate endpoint that supports the
authorization
or sale
transaction types. See Endpoints and Transaction Types. For descriptions of all request and
response fields, see Hosted Payments Page API Fields.The
payment_token
field identifies the card and retrieves the associated billing, shipping,
and payment information.Example: One-Click Transaction
Request
access_key=a2b0c0d0e0f0g0h0i0j0k0l0m0n0o0p2 profile_id=0FFEAFFB-8171-4F34-A22D-1CD38A28A384 reference_number=1350029885978 payment_token=CF2194C8A0F545CDE053AF598E0A20DA consumer_id=x23987456x // Replace x with 1 transaction_type=authorization amount=100.00 currency=USD locale=en transaction_uuid=fcfc212e92d23be881d1299ef3c3b314 signed_date_time=2020-01-17T10:46:39Z signed_field_names=reference_number,transaction_type,currency,amount,locale,access_key,profile_id,transaction_uuid,signed_date_time,signed_field_names,etc... signature=WrXOhTzhBjYMZROwiCug2My3jiZHOqATimcz5EBA07M=
Response
transaction_id=3500311655560181552946 decision=ACCEPT message=Request was processed successfully. req_access_key=a2b0c0d0e0f0g0h0i0j0k0l0m0n0o0p2 req_transaction_uuid=55d895790bc4c8a0f4464f9426ba3b79 req_transaction_type=authorization req_reference_number=1350029885978 req_amount=100.00 req_profile_id=0FFEAFFB-8171-4F34-A22D-1CD38A28A384 req_tax_amount=15.00 req_currency=USD req_locale=en req_payment_method=card req_consumer_id=x23987456x // Replace x with 1 req_bill_to_forename=Joe req_bill_to_surname=Smith [email protected] req_bill_to_address_line1=1 My Apartment req_bill_to_address_state=CA req_bill_to_address_country=US req_card_number=xxxxxxxxxxxx4242 req_card_type=001 req_card_expiry_date=11-2020 reason_code=100 auth_avs_code=U auth_avs_code_raw=00 auth_response=0 auth_amount=100.00 auth_time==2012-08-14T134608Z req_payment_token=CF2194C8A0F545CDE053AF598E0A20DA signed_field_names=reference_number,transaction_type,currency,amount,locale,access_key,profile_id,transaction_uuid,signed_date_time,signed_field_names,etc... signed_date_time=2012-10-12T08:39:25Z signature=jMeHnWRKwU3xtT02j2ufRibfFpbdjUSiuWGT9hnNm00= req_amount=100.00 req_tax_amount=15.00 req_currency=USD req_locale=en req_payment_method=card req_consumer_id=x23987456x // Replace x with 1 req_bill_to_forename=Joe req_bill_to_surname=Smith [email protected] req_bill_to_address_line1=1 My Apartment req_bill_to_address_state=CA req_bill_to_address_country=US req_card_number=xxxxxxxxxxxx4242 req_card_type=001 req_card_expiry_date=11-2020 reason_code=100 auth_avs_code=U auth_avs_code_raw=00 auth_response=0 auth_amount=100.00 auth_time==2012-08-14T134608Z payment_token=CF2194C8A0F545CDE053AF598E0A20DA payment_token_latest_card_suffix=3283 payment_token_latest_card_expiry_date=07-2024 payment_solution=015 signed_field_names=reference_number,transaction_type,currency,amount,locale,access_key,profile_id,transaction_uuid,signed_date_time,signed_field_names,etc... signed_date_time=2012-10-12T08:39:25Z signature=jMeHnWRKwU3xtT02j2ufRibfFpbdjUSiuWGT9hnNm00=
Payment Token Updates
Updating a Payment Card Token
The
payment_token
field identifies the card and
retrieves the associated billing, shipping, and payment information. The customer is directed to the Order Review page and clicks
Edit Address
or Edit Details
to return
to the relevant checkout page. The customer clicks Pay
to confirm
the transaction.You must configure the billing, shipping, and payment details
so that a customer can edit their details on the Order Review page. See Configuring Order Review Details.
Include the endpoint that supports
update_payment_token
or the endpoint that supports
authorization,update_payment_token
(updates the token and authorizes
the transaction) or sale,update_payment_token
(updates the token and
processes the transaction). See Sample Transaction Process Using JSP.
You must include the allow_payment_token_update
field and set it to
true
.Example: Updating a Payment Card Token
Request
access_key=a2b0c0d0e0f0g0h0i0j0k0l0m0n0o0p2 transaction_type=update_payment_token profile_id=0FFEAFFB-8171-4F34-A22D-1CD38A28A384 reference_number=1350029885978 payment_token=CF2194C8A0F545CDE053AF598E0A20DA amount=100.00 currency=USD payment_method=card card_type=001 card_number=411111111111xxxx // Replace x with 1 card_expiry_date=12-2022 card_cvn=005 bill_to_forename=Joe bill_to_surname=Smith [email protected] bill_to_address_line1=1 My Apartment bill_to_address_state=CA bill_to_address_country=US locale=en transaction_uuid=fcfc212e92d23be881d1299ef3c3b314 signed_date_time=2020-01-17T10:46:39Z consumer_id=x23987456x // Replace x with 1 signed_field_names=reference_number,transaction_type,currency,amount,locale,access_key,profile_id,transaction_uuid,signed_date_time,signed_field_names,etc... signature=WrXOhTzhBjYMZROwiCug2My3jiZHOqATimcz5EBA07M=
Response
transaction_id=3500311655560181552946 decision=ACCEPT message=Request was processed successfully. req_access_key=a2b0c0d0e0f0g0h0i0j0k0l0m0n0o0p2 req_profile_id=0FFEAFFB-8171-4F34-A22D-1CD38A28A384 req_transaction_uuid=55d895790bc4c8a0f4464f9426ba3b79 req_transaction_type=authorization,update_payment_token req_reference_number=1350029885978 req_amount=100.00 req_tax_amount=15.00 req_currency=USD req_locale=en req_payment_method=card req_consumer_id=x23987456x // Replace x with 1 req_bill_to_forename=Joe req_bill_to_surname=Smith [email protected] req_bill_to_address_line1=1 My Apartment req_bill_to_address_state=CA req_bill_to_address_country=US req_card_number=xxxxxxxxxxxx1111 req_card_type=001 req_card_expiry_date=12-2022 reason_code=100 auth_avs_code=U auth_avs_code_raw=00 auth_response=0 auth_amount=100.00 auth_time=2022-08-14T134608Z payment_token=CF2194C8A0F545CDE053AF598E0A20DA signed_field_names=comma separated list of signed fields signed_date_time=2022-10-12T08:39:25Z signature=jMeHnWRKwU3xtT02j2ufRibfFpbdjUSiuWGT9hnNm00=