Skip to main content

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.

Note

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}:

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"
}]
}

ParameterTypeLengthRequiredDescriptionExample
program_value
int1-10RequiredCard type for program account2
+primary_person
object-RequiredPrimary cardholder information{ "primary_person":[{ "first_name":"firstname", "last_name":"lastname", }] }
+addresses
object-OptionalAddress list{ "addresses":[{ "line1":"contact", "postal_code":"518000", "type":"home", "country":"USA" }] }
+phones
object-OptionalPhone number list{ "phones":[{ "type":"contact", "country_code":"+86", "phone_number":"178549645256" }] }
+emails
object-OptionalEmail list{ "emails":[{ "type":"personal", "email":"user@example.com", "state":"verified" }] }
{
"code": "200",
"msg": "SUCCESS",
"data": {
"account_id": "1016X10007530070724",
"parent_account_id": "1016X10007422220312",
"creation_time": 1782367203137,
"modified_time": 1782367203137
}
}
ParameterTypeDescriptionExample
account_idstringUnique identifier of the sub-merchant account.1016X10007530070724
parent_account_idstringUnique identifier of the parent merchant account.1016X10007422220312
creation_timelongCreation time (Unix timestamp in milliseconds).1782367203137
modified_timelongLast 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.

cURL -X POST /v1/account/list
-H 'Content-Type: application/json'
-H 'Authorization: {token}'
-d '{
"program_value": 2,
"limit": 1,
"cursor": ""
}
ParameterTypeLengthRequiredDescriptionExample
limitlong0-100OptionalNumber of records returned per page, maximum 100 records1
cursorstring0-10OptionalThe next_cursor returned from the previous page. Not required for the first request.1
program_valueint1-10RequiredCard type for program account.2
{
"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"
}
]
}
}
ParameterTypeLengthRequiredDescriptionExample
next_cursor
string--The cursor for the next page. Returns null when has_more is false1
has_more
boolean--Whether there is a next page
  • ture
  • false
1
account_id
string--Parent account ID1016X10035353230174
+child_accounts
object----