These examples show successful authorization requests.

Example: Authorizing a Payment with XML

Light Dark
Request
123456789101112131415161718192021222324252627282930313233
<="urn:schemas-cybersource-com:transaction-data-1.213"> <merchantID>test_merchant</merchantID> <merchantReferenceCode>refnum-1234</merchantReferenceCode> <billTo> <firstName>John</firstName> <lastName>Smith</lastName> <street1>123 Happy St</street1> <city>Austin</city> <state>TX</state> <postalCode>78757</postalCode> <country>US</country> <email>test@cybs.com</email> </billTo> <shipTo> <firstName>John</firstName> <lastName>Smith</lastName> <street1>123 Happy</street1> <city>Austin</city> <state>TX</state> <postalCode>78757</postalCode> <country>US</country> </shipTo> <purchaseTotals> <currency>USD</currency> <grandTotalAmount>75.00</grandTotalAmount> </purchaseTotals> <apPaymentType>afp</apPaymentType> <apAuthService run="true"> <cancelURL>https://www.test.com</cancelURL> <successURL>https://www.test.com</successURL> <preapprovalToken>519ff272-d850-4c81-ab65-674f670063c7</preapprovalToken> </apAuthService> </>
Response to a Successful Request
123456789101112131415161718192021
<:c="urn:schemas-cybersource-com:transaction-data-1.213"> <merchantReferenceCode>refnum-1234</merchantReferenceCode> <requestID>6246274241256683803069</requestID> <decision>ACCEPT</decision> <reasonCode>100</reasonCode> <requestToken>AxjnrwSTeaOOe5Ed6nFKAAUZYjWmrWdFqOaFmiojml/qNzSBvUwzPhk0ky9GMFti5JvNHHPciO9TilAA4hjb</requestToken> <purchaseTotals> <currency>USD</currency> </purchaseTotals> <apAuthReply> <reasonCode>100</reasonCode> <status>AUTHORIZED</status> <processorResponse>00003</processorResponse> <amount>75.00</amount> <dateTime>2023-10-06T19:33:21Z</dateTime> <paymentStatus>authorized</paymentStatus> <responseCode>00003</responseCode> <reconciliationID>XFZ55NET9PYQ</reconciliationID> <processorTransactionID>519ff272-d850-4c81-ab65-674f670063c7</processorTransactionID> </apAuthReply> </>
Request with Optional Line Items
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
<="urn:schemas-cybersource-com:transaction-data-1.213"> <merchantID>test_merchant</merchantID> <merchantReferenceCode>refnum-1234</merchantReferenceCode> <billTo> <firstName>John</firstName> <lastName>Smith</lastName> <street1>Peachtree St</street1> <city>Atlanta</city> <state>GA</state> <postalCode>33019</postalCode> <country>US</country> <email>test@cybs.com</email> </billTo> <shipTo> <firstName>John</firstName> <lastName>Smith</lastName> <street1>Peachtree St</street1> <city>Atlanta</city> <state>GA</state> <postalCode>33019</postalCode> <country>US</country> </shipTo> <item id="0"> <unitPrice>1</unitPrice> <quantity>10</quantity> <productCode>4564</productCode> <productName>TV</productName> <productSKU>testI</productSKU> <totalAmount>10</totalAmount> </item> <item id="1"> <unitPrice>15</unitPrice> <quantity>1</quantity> <productCode>65432</productCode> <productName>TV</productName> <productSKU>testJ</productSKU> <totalAmount>15</totalAmount> </item> <purchaseTotals> <currency>USD</currency> </purchaseTotals> <apPaymentType>AFP</apPaymentType> <apAuthService run="true"> <cancelURL>https://www.test.com</cancelURL> <successURL>https://www.test1.com</successURL> <preapprovalToken>0d97aa1b-a9dd-4e9c-b60c-b1157470d034</preapprovalToken> </apAuthService> </>
Response with Optional Line Items
123456789101112131415161718192021
<:c="urn:schemas-cybersource-com:transaction-data-1.213"> <merchantReferenceCode>refnum-1234</merchantReferenceCode> <requestID>6977375233876065503009</requestID> <decision>ACCEPT</decision> <reasonCode>100</reasonCode> <requestToken>AxjnrwSTej6Ib33u98chAAUZYiy69adJpUaUiInkFtpV8ukDJxDNyGTSTL0YwW2Lkm9H0Q3vvd745CAA6Qe8</requestToken> <purchaseTotals> <currency>USD</currency> </purchaseTotals> <apAuthReply> <reasonCode>100</reasonCode> <status>AUTHORIZED</status> <processorResponse>00003</processorResponse> <amount>25.00</amount> <dateTime>2023-10-19T17:45:24Z</dateTime> <paymentStatus>authorized</paymentStatus> <responseCode>00003</responseCode> <reconciliationID>XEKWVNIRQRHD</reconciliationID> <processorTransactionID>0d97aa1b-a9dd-4e9c-b60c-b1157470d034</processorTransactionID> </apAuthReply> </>