# Call the APIs
source: https://developer.mastercard.com/mastercard-checkout-solutions/tutorial/integrate_apis/step7/index.md

## Step 7: Call the APIs {#step-7-call-the-apis}

* If you are a merchant directly integrating with Mastercard Checkout Solutions, call [POST transaction/credentials](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/api-reference/apis/index.md#checkout) API to perform checkout.

* If you need to onboard merchants, you must register your merchants as DPAs using [DPA Registration](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/api-reference/apis/index.md#reigstration) API. Ensure you provide the `programType` as `SRC`.

After a successful checkout call using [checkout()](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/sdk-reference/checkout-method/index.md) method, the `srcCorrelationId` returned in the `checkoutResponse` links the JavaScript calls and API calls for a specific transaction. This `srcCorrelationId` will then be used in the Checkout API call for the same transaction.

1. Call the [POST transaction/credentials](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/api-reference/apis/index.md#checkout) endpoint to retrieve the transaction credentials from Click to Pay. The response from Click to Pay will be a JWS which in turn includes an encrypted object - `encryptedPayload`.

2. Extract the `encryptedPayload` value from the `checkoutResponseJWSPayload`. This value contains a JWE in compact serializable form. The JWE content is signed or encrypted using the public Payload Encryption key (which is a part of the public/private payload encryption key pair) provided by you at the time of onboarding.   

*Example of an encryptedPayload object:*

```Javascript
"eyJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwiYWxnIjoiUlNBLU9BRVAtMjU2In0.MIq_v15_eowvwX8MRgrb_H1EevZKB9CZSMMD8-lcbTjQvPFwAyx1USZbZRDB3RGfA_of6aDggnbmQmgsUStPQEpzYMma5mxlv5-VT6ry94xyttBFuCjBV0hudmcOEHiQeIiwS5xBb1iBPFaXTEmMpgDv8lvAm_ncbJ0V5FFDUYYVhK0-SbaODY5OKMdP2N3Y9bCkqjLCAcmkkN3mkrJ6WbzJURmNdfPyL344Cxc14NLZW3fk_yHkmjXybIXJWnUUsdxwFWS5ImwaZGEhbeLGGdpsPTkTkwD86uZCYJlx_dsZi02Vbm9AI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