Overviewβ
The account identifier is a system-generated unique identifier used to distinguish different account entities and their respective fund pools. The account_id field represents this identifier.
To use the parent-child account structure, please contact your Oceanpayment Account Manager to submit an application. After approval and enabling the relevant permissions, you will be able to create and manage sub-accounts. When creating a card, you can also specify whether the card belongs to a parent account or a sub-account.
Create Sub-accountβ
Create a sub-account under the parent account {account_id}:
- Request
cURL -X POST /v1/account/{account_id}
-H 'Content-Type: application/json'
-H 'Authorization: {token}'
-d '{
"program_value": 2,
"primary_person": {
"first_name": "Joe",
"last_name": "Bauer",
"middle_name": "Joe",
"last_name2": "Bauer",
"dob": "19820301",
"nick_name": "Chuck",
"title": "Dr",
"suffix": "Jr"
},
"addresses": [{
"line1": "123 Main St.",
"postal_code": "12345",
"type": "home",
"line2": "123 Main St.",
"line3": "123 Main St.",
"neighborhood": "Sunfield",
"city": "Austin",
"state": "TX",
"country": "US"
}],
"phones": [{
"type": "contact",
"country_code": "USA",
"phone_number": "178549645256"
}],
"emails": [{
"type": "personal",
"email": "user@example.com",
"state": "verified"
}]
}
| Parameter | Type | Length | Required | Description | Example |
|---|---|---|---|---|---|
program_value | int | 1-10 | Required | Card type for program account | 2 |
+primary_person | object | - | Required | Primary cardholder information | { "primary_person":[{ "first_name":"firstname", "last_name":"lastname", }] } |
+addresses | object | - | Optional | Address list | { "addresses":[{ "line1":"contact", "postal_code":"518000", "type":"home", "country":"USA" }] } |
+phones | object | - | Optional | Phone number list | { "phones":[{ "type":"contact", "country_code":"+86", "phone_number":"178549645256" }] } |
+emails | object | - | Optional | Email list | { "emails":[{ "type":"personal", "email":"user@example.com", "state":"verified" }] } |
- Response
{
"code": "200",
"msg": "SUCCESS",
"data": {
"account_id": "1016X10007530070724",
"parent_account_id": "1016X10007422220312",
"creation_time": 1782367203137,
"modified_time": 1782367203137
}
}
| Parameter | Type | Description | Example |
|---|---|---|---|
account_id | string | Unique identifier of the sub-merchant account. | 1016X10007530070724 |
parent_account_id | string | Unique identifier of the parent merchant account. | 1016X10007422220312 |
creation_time | long | Creation time (Unix timestamp in milliseconds). | 1782367203137 |
modified_time | long | Last modified time (Unix timestamp in milliseconds). | 1782367203137 |
Query Accountβ
Merchants can query all account_id (including both parent and child accounts) under the current account by specifying the program_value. This returns all Customer Numbers associated with the current merchant under the specified Program.
- Request
cURL -X POST /v1/account/list
-H 'Content-Type: application/json'
-H 'Authorization: {token}'
-d '{
"program_value": 2,
"limit": 1,
"cursor": ""
}
| Parameter | Type | Length | Required | Description | Example |
|---|---|---|---|---|---|
limit | long | 0-100 | Optional | Number of records returned per page, maximum 100 records | 1 |
cursor | string | 0-10 | Optional | The next_cursor returned from the previous page. Not required for the first request. | 1 |
program_value | int | 1-10 | Required | Card type for program account. | 2 |
- Response
{
"code": "200",
"msg": "SUCCESS",
"trace_id": "a8b1345bf2604746aff0cb1f890ab911",
"data": {
"next_cursor": null,
"has_more": false,
"account_id": "1016X10035353230174",
"child_accounts": [
{
"child_account_id": "1016X10035972320620"
},
{
"child_account_id": "1016X10035972290385"
}
]
}
}
| Parameter | Type | Length | Required | Description | Example |
|---|---|---|---|---|---|
next_cursor | string | - | - | The cursor for the next page. Returns null when has_more is false | 1 |
has_more | boolean | - | - | Whether there is a next page
| 1 |
account_id | string | - | - | Parent account ID | 1016X10035353230174 |
+child_accounts | object | - | - | - | - |