Approve or decline an installment plan.

POST {{baseUrl}}/approvals?sync=true

This API will be used by the provider to approve or decline a plan. This endpoint uses JWE payload encryption. Please refer to the Securing Sensitive Data Using Payload Encryption sections for implementation details.

Request Params

KeyDatatypeRequiredDescription
syncbooleanIndicates whether the request is synchronous (the default value is false) or asynchronous.

Request Body

{"planId"=>"3d56f5a7-db48-41f0-875e-30920e8465f3", "status"=>"APPROVED", "approvedAmount"=>300, "approvedCurrency"=>"USD", "paymentAuthorization"=>{"primaryAccountNumber"=>"5555111122223333", "panExpirationMonth"=>"08", "panExpirationYear"=>"2022", "cardSecurityCode"=>"123", "cardholderFullName"=>"John Doe", "cardholderFirstName"=>"John", "cardholderLastName"=>"Doe", "billingAddress"=>{"line1"=>"5 Street Drive", "line2"=>"Apartment 123", "line3"=>"Southampton", "city"=>"O'Fallon", "state"=>"MO", "countryCode"=>"US", "zip"=>"123456"}}}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: OK

{"callbackUrl":"https://src.mastercard.com#%7B%22action%22%3A%22COMPLETED%22%2C%22checkoutResponse%22%3AEncryptedData%7D"}