# Cash Pickup Locations API
source: https://developer.mastercard.com/cross-border-services/documentation/api-ref/value-added-services/cashpickup-api/index.md

The Cash Pickup API is an optional service that allows customers to access a directory of eligible cash pickup locations visible to the sender. This API allows data filtering as per various parameters that include location types, country, city, and currency, offering customization for various program preferences and needs.   
Note: Customers must opt-in to access the Cash Pickup API.

The Cash Pickup API has three cash pickup location types:

* **Pickup Anywhere (PANY)** : This option allows cash pickup from any location of all available Receiving Service Providers (RSP) within the destination country. When the sender selects Pickup Anywhere option, the recipient has the flexibility to choose any convenient location for cash collection.  

* **Within Network** : This option allows the recipient to pick up cash from any location of a particular RSP within the destination country. When the Sender selects to deliver cash to an Within Network RSP, the recipient has the flexibility to choose any of the cash pickup locations within the selected RSP network boundaries.   

* **Directed**: This option provides a targeted solution for recipients who want to select a specific pickup location. Recipients collect their cash from one designated branch or retail site of a particular RSP in the destination country.

Alert:   

If you are a Customer contracted with MTS EU or MTS UK, refer to the corresponding EU and UK specification inside the swagger file to ensure compliance with the relevant jurisdiction based Regulatory Technical Standards (either EU or UK) derived from the Revised Payment Services Directive (PSD2).
Note: For **Cash Pickup Type** , include the request parameters as specified:  

* Pickup Anywhere : `PANY`
* Within Network : `IN_NETWORK`
* Directed: `DIRECT`

## Environment Domains {#environment-domains}

* Sandbox/MTF
* Sandbox-EU
* Sandbox-UK
* MTF-EU
* MTF-UK
* Production
* Production-EU
* Production-UK

```Sandbox/MTF
https://sandbox.api.mastercard.com/crossborder/cash-pickup
```

```Sandbox-EU
https://sandbox.api.xbs.mastercard.eu/crossborder/cash-pickup
```

```Sandbox-UK
https://sandbox.api.xbs.mastercard.uk/crossborder/cash-pickup
```

```MTF-EU
https://mtf.api.xbs.mastercard.eu/crossborder/cash-pickup
```

```MTF-UK
https://mtf.api.xbs.mastercard.uk/crossborder/cash-pickup
```

```Production
https://api.mastercard.com/crossborder/cash-pickup
```

```Production-EU
https://api.xbs.mastercard.eu/crossborder/cash-pickup
```

```Production-UK
https://api.xbs.mastercard.uk/crossborder/cash-pickup
```

Note: **Sandbox** and **MTF** environments share the same url but you can differentiate them by the partner ID.

## Catalog APIs {#catalog-apis}

### Countries {#countries}

* Provides information about a list of supported countries where cash pickup is available for recipients.
* This API is useful to retrieve the list of all cash pickup countries based on cash pickup type.


API Reference: `GET /crossborder/cash-pickup/countries`

<br />

<br />

### Cities {#cities}

* Provides information about a list of supported cities where cash pickup service is available. This API is useful to retrieve the list from specific city locations supporting *Branches* type cash pickup.
* The `CityName` available in the response helps to filter the Receiving Service Providers and specific locations.
* The *Directed* cash pickup type is for recipients who prefer to pick up cash from a specific designated locations.


API Reference: `GET /crossborder/cash-pickup/cities`

<br />

<br />

### Receiving Service Providers {#receiving-service-providers}

* Provides information about the list of supported Receiving Service Providers offering cash pickup services.
* This API helps to identify a particular provider for the *Within Network Cash Pickup* type.
* You can use this API for *Within RSP Network* and *Branches* type.


API Reference: `GET /crossborder/cash-pickup/providers`

<br />

<br />

### Branches {#branches}

* Provides information about locations specific to supported Receiving Service Providers that offer cash pickup services.
* The API helps to identify a particular location for *DirectCash Pickup Location* cash pickup type.
* Enter the `branchCode` you get in the response, in the `bankCode` field of the Payment API request.


API Reference: `GET /crossborder/cash-pickup/branches`

For further information on URL and input parameter restrictions, refer to the [API Conventions](https://developer.mastercard.com/cross-border-services/documentation/api-basics/index.md#api-conventions) section.

* **Formats supported**: JSON
* **HTTP version**: 1.0/ 1.1
* **Required HTTP header parameters** :
  * `content-type` : Format of submitting the inbound content. Example: `application/json`
  * `content-length`: Length of the inbound content body in octets.
  * `partner-id`: String of alphanumeric special characters with a max length of 35. Example: `mts_4_006_interfaceid`.

Note: Mastercard recommends that you must update the catalog data once a week using the Catalog APIs.

## API Convention {#api-convention}

Refer to the [API Conventions](https://developer.mastercard.com/cross-border-services/documentation/api-basics/index.md#api-conventions) section for general guidelines.

## Payload Encryption {#payload-encryption}

Encrypt all the request payload before sending them to Mastercard. Similarly, you must decrypt the payload sent by Mastercard.   

For more detailed information, refer to the [Encryption and Decryption](https://developer.mastercard.com/cross-border-services/documentation/api-basics/index.md#transport-encryption) section.

## Next step {#next-step}

Proceed to [Sandbox Testing](https://developer.mastercard.com/cross-border-services/documentation/testing/cashpickup-api/index.md) to test the Cash Pickup API in the Sandbox environment.
