REST Example: Authorizing a Mastercard Bill Payment

Request
{ "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" }