Add a Payee
Use our API to create and save a payee profile.
This guide shows you how to add a payee to the Payee Vault, creating a unique profile and payee ID. Maast securely stores payment and contact information to the payee's profile. You can use the payee ID to edit the profile and to send an Initiate a Payment to a Payee request. See Add a Payee in API Reference for field definitions.
Please note: This API resource is intended for a specific use case and requires integration through the Maast product team. To use this resource, please contact Maast Customer Support.
Prerequisites
- Contact Maast Customer Support to configure your account for this resource.
- Follow the Get Started guide to open your sandbox and get your test credentials.
- See Authentication to format the credentials and generate your API token. (Alternatively, use the credentials as-is to test this endpoint with our 'Try It!' feature.)
Implement
- Write a POST request to send to the
/platform/vault/payee
endpoint. See the sample code below:
curl --request POST \
--url https://api-test.maast.com/platform/vault/payee \
--header 'accept: application/json' \
--header 'authorization: Basic OjllZGVjMjFhMzFjMHh5ejc4OWUzMGEzNDE2YWJjMTIz' \
--header 'content-type: application/json'
You can now add information to the body of the request.
- Add payee information to the body of the request through the following fields:
- payee_name - This field is required for the request.
- payee_address - You can add one address object.
- payee_email - You can add as many email addresses as you wish.
See the sample code below:
{
"payee_name": "John Doe",
"payee_email": [
"[email protected]",
"[email protected]"
],
"payee_address": {
"address1": "4w 4th Ave",
"address2": "Suite #404",
"city": "San Mateo",
"state": "CA",
"zip": "94404",
"country_code": "840",
"country": "United States"
}
}
- Add payment information to the body of the request with the following fields:
- payee_account - You can add one ACH payment account object for each payee profile.
- merchant_id - If you are making this request on behalf of another merchant, add their merchant ID.
See the sample code below:
{
"payee_account": {
"type_id": "S",
"tr_number": "028000082",
"dda_number": "3456776866",
"accountholder_name": "John Doe"
},
"merchant_id": 210000000289
}
Example Request
Once configured, your request will resemble the following code:
curl --request POST \
--url https://api-test.maast.com/platform/vault/payee \
--header 'accept: application/json' \
--header 'authorization: Basic OjllZGVjMjFhMzFjMHh5ejc4OWUzMGEzNDE2YWJjMTIz' \
--header 'content-type: application/json' \
--data '
{
"payee_name": "John Doe",
"payee_email": [
"[email protected]",
"[email protected]"
],
"payee_address": {
"address1": "4w 4th Ave",
"address2": "Suite #404",
"city": "San Mateo",
"state": "CA",
"zip": "94404",
"country_code": "840",
"country": "United States"
},
"payee_account": {
"type_id": "S",
"tr_number": "028000082",
"dda_number": "3456776866",
"accountholder_name": "John Doe"
},
"merchant_id": 210000000289
}
'
Integrate
Send the request to the /platform/vault/payee
endpoint with your configurations in the body.
Maast will return a response like the code below:
{
"code": 0,
"message": "Success",
"data": {
"payee_id": 999678,
"payee_name": "John Doe",
"payee_phone": "+16500000000",
"payee_email": [
"[email protected]",
"[email protected]"
],
"payee_address": {
"address1": "4w 4th Ave",
"address2": "Suite #404",
"city": "San Mateo",
"state": "CA",
"zip": "94404",
"country_code": "840",
"country": "United States"
},
"payee_account": {
"type_id": "S",
"tr_number": "028000082",
"dda_number": "3456776866",
"accountholder_name": "John Doe",
"verified_date": "2022-02-01T10:28:55.000015-08:00"
}
}
}
Check the code
field in the request response: 0
confirms that you have successfully added the profile to Payee Vault. If the value is something other than 0
, check Platform API Response Codes in Reference.
Check the payee_id
field and save its value to your records. You will need it to interact with the payee's profile using the Payee Vault API.
See Add a Payee in API Reference for response field definitions.
Save the Payee ID
Be sure to save the
payee_id
value that appears in your request response. You will need it to interact with this payee's profile using Maast APIs.
Test and Go Live
See our Test and Go Live guide to test your API integration and to start transacting with an active production account.
Updated 11 months ago