REST API | Visa Platform Connect

REST Example: Authorizing a Mastercard Bill Payment

This example shows a successful authorization request for a Mastercard bill payment.

Endpoint

Production:
POST
https://api.cybersource.com
/pts/v2/payments
Test:
POST
https://apitest.cybersource.com
/pts/v2/payments
Request
In this example, the cardholder in Brazil is using a Mastercard payment card (card type code
002
) to pay a utility bill (Mastercard bill payment type value
001
).
{ "orderInformation": { "billTo": { "country": "BR", "lastName": "Doe", "firstName": "John", "address1": "Av Pres Juscelino Kubistchek 1909", "address2": "", "postalCode": "04543907", "locality": "Sao Paulo", "administrativeArea": "SP", "email": "john.doe@company.com" }, "amountDetails": { "totalAmount": "100.00", "currency": "BRL" } }, "paymentInformation": { "card": { "expirationMonth": "12", "expirationYear": "2031", "number": "555555555555xxxx", "securityCode": "123", "type": "002" } }, "processingInformation": { "authorizationOptions": { "billPaymentType": "001" } } }
Response to a Successful Request
{ "_links" : { "authReversal" : { "method" : "POST", "href" : "/pts/v2/payments/6863356803746501803955/reversals" }, "self" : { "method" : "GET", "href" : "/pts/v2/payments/6863356803746501803955" }, "capture" : { "method" : "POST", "href" : "/pts/v2/payments/6863356803746501803955/captures" } }, "clientReferenceInformation" : { "code" : "1686335680358" }, "id" : "6863356803746501803955", "orderInformation" : { "amountDetails" : { "authorizedAmount" : "100.00", "currency" : "brl" } }, "paymentAccountInformation" : { "card" : { "type" : "002" } }, "paymentInformation" : { "tokenizedCard" : { "type" : "002" }, "card" : { "type" : "002" } }, "processorInformation" : { "approvalCode" : "010012", "networkTransactionId" : "999010012", "transactionId" : "72b2900a9f316142b627a21031b48b0c259f08ffba0004172a04450c5d212345", "responseCode" : "400", "avs" : { "code" : "2" } }, "reconciliationId" : "NHRRGOVtUxkb", "status" : "AUTHORIZED", "submitTimeUtc" : "2023-06-09T18:34:40Z" }
Response to a Successful Request
{ "_links" : { "authReversal" : { "method" : "POST", "href" : "/pts/v2/payments/6863354737666316003955/reversals" }, "self" : { "method" : "GET", "href" : "/pts/v2/payments/6863354737666316003955" }, "capture" : { "method" : "POST", "href" : "/pts/v2/payments/6863354737666316003955/captures" } }, "clientReferenceInformation" : { "code" : "1686335473749", "partner" : { "solutionId" : "89012345" } }, "id" : "6863354737666316003955", "orderInformation" : { "amountDetails" : { "authorizedAmount" : "100.00", "currency" : "brl" } }, "paymentAccountInformation" : { "card" : { "type" : "002" } }, "paymentInformation" : { "tokenizedCard" : { "type" : "002" }, "card" : { "type" : "002" } }, "processorInformation" : { "approvalCode" : "010012", "networkTransactionId" : "999010012", "transactionId" : "72b2900a9f316142b627a21031b48b0c259f08ffba0004172a04450c5d212345", "responseCode" : "400", "avs" : { "code" : "2" } }, "reconciliationId" : "q1bqrBcLeuTB", "status" : "AUTHORIZED", "submitTimeUtc" : "2023-06-09T18:31:13Z" }