Account

Create recipient

POST
/account.recipient.create

Request Body

application/jsonRequired
metadataRequiredobject
preferencesobject

Response Body

Successful response

TypeScript Definitions

Use the response body type in TypeScript.

dataRequiredobject

Error response

TypeScript Definitions

Use the response body type in TypeScript.

errorRequiredobject
curl -X POST "/v1/account.recipient.create" \
  -H "Content-Type: application/json" \
  -d '{
    "metadata": {
      "name": "string",
      "email": "string",
      "secondary_email": "string",
      "phone_number": {
        "country_code": "string",
        "number": "string"
      },
      "business_info": {
        "address": {
          "line1": "string",
          "city": "string",
          "state": "string",
          "postal_code": "string",
          "country": "AF",
          "line2": "string",
          "countryISO3166_1": "string"
        },
        "entity_name": "string",
        "registration_number": "string"
      }
    },
    "preferences": {
      "notifications": {
        "transactions": true
      }
    }
  }'
const body = JSON.stringify({
  "metadata": {
    "name": "string",
    "email": "string",
    "secondary_email": "string",
    "phone_number": {
      "country_code": "string",
      "number": "string"
    },
    "business_info": {
      "address": {
        "line1": "string",
        "city": "string",
        "state": "string",
        "postal_code": "string",
        "country": "AF",
        "line2": "string",
        "countryISO3166_1": "string"
      },
      "entity_name": "string",
      "registration_number": "string"
    }
  },
  "preferences": {
    "notifications": {
      "transactions": true
    }
  }
})

fetch("/v1/account.recipient.create", {
  body
})
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
  "strings"
)

func main() {
  url := "/v1/account.recipient.create"
  body := strings.NewReader(`{
    "metadata": {
      "name": "string",
      "email": "string",
      "secondary_email": "string",
      "phone_number": {
        "country_code": "string",
        "number": "string"
      },
      "business_info": {
        "address": {
          "line1": "string",
          "city": "string",
          "state": "string",
          "postal_code": "string",
          "country": "AF",
          "line2": "string",
          "countryISO3166_1": "string"
        },
        "entity_name": "string",
        "registration_number": "string"
      }
    },
    "preferences": {
      "notifications": {
        "transactions": true
      }
    }
  }`)
  req, _ := http.NewRequest("POST", url, body)
  req.Header.Add("Content-Type", "application/json")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "/v1/account.recipient.create"
body = {
  "metadata": {
    "name": "string",
    "email": "string",
    "secondary_email": "string",
    "phone_number": {
      "country_code": "string",
      "number": "string"
    },
    "business_info": {
      "address": {
        "line1": "string",
        "city": "string",
        "state": "string",
        "postal_code": "string",
        "country": "AF",
        "line2": "string",
        "countryISO3166_1": "string"
      },
      "entity_name": "string",
      "registration_number": "string"
    }
  },
  "preferences": {
    "notifications": {
      "transactions": true
    }
  }
}
response = requests.request("POST", url, json = body, headers = {
  "Content-Type": "application/json"
})

print(response.text)
{
  "data": {
    "id": "string",
    "metadata": {
      "name": "string",
      "email": "string",
      "secondary_email": "string",
      "phone_number": {
        "country_code": "string",
        "number": "string"
      },
      "business_info": {
        "address": {
          "line1": "string",
          "city": "string",
          "state": "string",
          "postal_code": "string",
          "country": "AF",
          "line2": "string",
          "countryISO3166_1": "string"
        },
        "entity_name": "string",
        "registration_number": "string"
      },
      "is_hidden": true
    },
    "preferences": {
      "notifications": {
        "transactions": true
      }
    },
    "created_at": "string"
  }
}
{
  "error": {
    "code": "PARSE_ERROR",
    "message": "string"
  }
}