Follow-on Services
MonerisREST API
This section provides information about and procedures for requesting these follow-on
services:
- Authorization Reversal:A follow-on service that uses the request ID returned from the previous authorization. An authorization reversal releases the hold that the authorization placed on the customer’s credit card funds. Use this service to reverse an unnecessary or undesired authorization.
- Capture:A follow-on service that uses the request ID returned from the previous authorization. The request ID links the capture to the authorization. This service transfers funds from the customer’s account to your bank and usually takes two to four days to complete.
- Sale:A sale is a bundled authorization and capture. Request the authorization and capture services at the same time.Cybersourceprocesses the capture immediately.
Required Fields for Processing an Authorization Reversal
Use these required fields for processing an authorization reversal.
- idid
- Set theidURL parameter to the transaction ID that was included in the authorization response message.
- orderInformation.amountDetails.currencyorderInformation.amountDetails.currency
- reversalInformation.amountDetails.totalAmountreversalInformation.amountDetails.totalAmount
- The amount of the reversal must be the same as the authorization amount that was included in the authorization response message. Do not use the amount that was requested in the authorization request message.
Related Information
REST Example: Processing an Authorization Reversal
Endpoint
Production:
POST
https://api.cybersource.com
/pts/v2/payments/{id}/reversalsTest:
POST
https://apitest.cybersource.com
/pts/v2/payments/{id}/reversalsFor this example, the
{id}
portion of the URL is set to the transaction ID included in the authorization you want to void:
6869458685866438003955
Request
{ "orderInformation" : { "amountDetails" : { "currency" : "USD" } }, "reversalInformation" : { "amountDetails" : { "totalAmount" : "100.00" } } }
Response for a Successful Request
{ "_links" : { "self" : { "method" : "GET", "href" : "/pts/v2/reversals/6869460219566537303955" } }, "clientReferenceInformation" : { "code" : "RTS-Auth-Reversal" }, "id" : "6869460219566537303955", "orderInformation" : { "amountDetails" : { "currency" : "USD" } }, "processorInformation" : { "responseCode" : "200" }, "reconciliationId" : "82kBK3qDNtls", "reversalAmountDetails" : { "reversedAmount" : "100.00", "currency" : "USD" }, "status" : "REVERSED", "submitTimeUtc" : "2023-06-16T20:07:02Z" }=
Captures
This section provides the information you need in order to capture an authorized
transaction.
Endpoint
Production:
POST
https://api.cybersource.com
/pts/v2/payments/{id}
/capturesTest:
POST
https://apitest.cybersource.com
/pts/v2/payments/{id}
/capturesThe
{id}
is the transaction
ID returned in the authorization response.REST Example: Capturing an Authorization
Endpoint:
- Production:POSThttps://api.cybersource.com/pts/v2/payments/{id}/captures
- Test:POSThttps://apitest.cybersource.com/pts/v2/payments/{id}/captures
Request
{ "clientReferenceInformation": { "code": "1662997399711" }, "orderInformation": { "amountDetails": { "totalAmount": 100, "currency": "USD" } }, "paymentAccountInformation": { "card": { "number": "4111111111111111", "type": "001" } } }
Response for a Successful Request
{ "_links": { "authReversal": { "method": "POST", "href": "/pts/v2/payments/6629976031336699803954/reversals" }, "self": { "method": "GET", "href": "/pts/v2/payments/6629976031336699803954" }, "capture": { "method": "POST", "href": "/pts/v2/payments/6629976031336699803954/captures" } }, "clientReferenceInformation": { "code": "1662997399711" }, "id": "6629976031336699803954", "orderInformation": { "amountDetails": { "authorizedAmount": "100.00", "currency": "USD" } }, "paymentAccountInformation": { "card": { "type": "001" } }, "paymentInformation": { "tokenizedCard": { "type": "001" }, "card": { "type": "001" } }, "pointOfSaleInformation": { "terminalId": "111111" }, "processorInformation": { "approvalCode": "888888", "networkTransactionId": "123456789619999", "transactionId": "123456789619999", "responseCode": "100", "avs": { "code": "1" } }, "reconciliationId": "61117545B7TY1MP6", "status": "AUTHORIZED", "submitTimeUtc": "2022-09-12T15:46:43Z" }
Required Fields for Capturing an Authorization
Use these required fields for capturing an authorization.
- This field value maps from the original authorization, sale, or credit transaction.
- Cybersourceprovides the value for this field.
REST Example: Capturing an Authorization
Sales
This section provides the information you need in order to process a sale
transactions.
A sale combines an authorization and a capture into a single transaction.
Endpoint
Production:
POST
https://api.cybersource.com
/pts/v2/paymentsTest:
POST
https://apitest.cybersource.com
/pts/v2/paymentsRequired Fields for Processing a Sale
Use these required fields for processing a sale.
- Set the value totrue.
Related Information
REST Example: Processing a Sale
Request
1234567891011{"clientReferenceInformation": { "code": "ABC123", "partner": { "thirdPartyCertificationNumber": "123456789012" } }, "orderInformation": { "amountDetails": { "totalAmount": "100.00", "currency": "EUR" }}
Response to a Successful Request
1234567891011121314151617181920212223{"_links": { "void": { "method": "POST", "href": "/pts/v2/captures/6662994431376681303954/voids" }, "self": { "method": "GET", "href": "/pts/v2/captures/6662994431376681303954" } }, "clientReferenceInformation": { "code": "1666299443215" }, "id": "6662994431376681303954", "orderInformation": { "amountDetails": { "totalAmount": "100.00", "currency": "EUR" } }, "reconciliationId": "66535942B9CGT52U", "status": "PENDING", "submitTimeUtc": "2022-10-20T20:57:23Z"}
Request
12345678910111213141516171819202122232425262728{"processingInformation": { "capture": true }, "orderInformation" : { "billTo" : { "country" : "US", "lastName" : "VDP", "address1" : "201 S. Division St.", "postalCode" : "48104-2201", "locality" : "Ann Arbor", "administrativeArea" : "MI", "firstName" : "RTS", "email" : "test@cybs.com" }, "amountDetails" : { "totalAmount" : "100.00", "currency" : "usd" } }, "paymentInformation" : { "card" : { "expirationYear" : "2031", "number" : "4111111111111111", "expirationMonth" : "12", "type" :"001 } } }
Response to a Successful Request
Most processors do not return all of the fields that are shown
in this example.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758{"_links" : { "void" : { "method" : "POST", "href" : "/pts/v2/payments/6485004068966546103093/voids" }, "self" : { "method" : "GET", "href" : "/pts/v2/payments/6485004068966546103093" } }, "clientReferenceInformation" : { "code" : "RTS-Auth" }, "id" : "6485004068966546103093", "orderInformation" : { "amountDetails" : { "totalAmount" : "100.00", "authorizedAmount" : "100.00", "currency" : "usd" } }, "paymentAccountInformation" : { "card" : { "type" : "001" } }, "paymentInformation" : { "tokenizedCard" : { "type" : "001" }, "card" : { "type" : "001" } }, "processorInformation" : { "systemTraceAuditNumber" : "841109", "approvalCode" : "831000", "merchantAdvice" : { "code" : "01", "codeRaw" : "M001" }, "responseDetails" : "ABC", "networkTransactionId" : "016153570198200", "retrievalReferenceNumber" : "208720841109", "consumerAuthenticationResponse" : { "code" : "2", "codeRaw" : "2" }, "transactionId" : "016153570198200", "responseCode" : "00", "avs" : { "code" : "Y", "codeRaw" : "Y" } }, "reconciliationId" : "6485004068966546103093", "status" : "AUTHORIZED", "submitTimeUtc" : "2022-03-28T20:46:47Z"}