Account Creation
Specification
The Following tabel is spesification for this API :
API Name | Account Creation |
---|---|
Function | This API is used for merchant to register user account in Paydia Apps |
Service Code | 06 |
Method | POST |
URL | /snap/v1.0/registration-account-creation |
Accept | application/json |
Content Type | application/json |
Related Service | Account Binding & Unbinding |
Request
The following part will be describe about parameter of request in this API:
Request Parameter
The following table is a list of request parameter in this API:
Header
The following table is Header of Request Parameters :
No | Name | Type | Length | Required | Condition | Remarks |
---|---|---|---|---|---|---|
1 | Content-Type | String | Variable, 127 max | Mandatory | - | Content type, value always application/json |
2 | Authorization | String | Variable | Mandatory | - | Contains B2B Bearer JWT Token, you've got it from Access Token B2B |
3 | X-TIMESTAMP | String | Fixed, 25 max | Mandatory | - | Transaction date time, in format YYYY-MM-DDTHH:mm:ss+07:00. Time must be in GMT+7 (Jakarta time) |
4 | X-PARTNER-ID | String | Variable, 36 max | Mandatory | - | ID for partner was generated by Paydia. Unique ID for a partner |
5 | X-EXTERNAL-ID | String | Variable, 36 max | Mandatory | - | Unique messaging reference ID generated by merchant. Numeric String. Reference number that should be unique in the same day |
6 | CHANNEL-ID | String | Variable, 5 max | Mandatory | - | Device identification on which the API services is currently being accessed by the end user (customer) |
7 | X-SIGNATURE | String | Variable | Mandatory | - | Signature need to be generated with Symmetric Signature method |
Body
The following table is a body of request parameter:
No | Name | Type | Length | Required | Condition | Remarks |
---|---|---|---|---|---|---|
1 | partnerReferenceNo | String | Variable, 64 max | Mandatory | - | Unique transaction identifier on partner system which assigned to each transaction |
2 | String | Variable, 254 max | Mandatory | - | User email | |
3 | name | String | Variable, 128 max | Mandatory | - | User name |
4 | phoneNo | String | Variable, 16 max | Mandatory | - | User phone number. Example: 08XXXXXXXXXX |
5 | redirectUrl | String | Variable, 256 max | Mandatory | - | When user authorization is success, the user will be redirected to this URL |
6 | scopes | String | Variable, 256 max | Mandatory | - | The scopes of the authorization |
7 | seamlessData | String | Variable, 512 max | Optional | - | Option for binding process.Please refer sample below to know how to include seamlessData |
8 | seamlessData.mobileNumber | String | Variable, 18 max | Optional | - | User's phone number. If this field is filled in, the user must log in with the number that has been included |
9 | seamlessSign | String | Variable, 512 max | Conditional | If the seamlessData is filled | Please refer sample below to know how to include seamlessSign. The steps to generate seamlessSign are:
|
10 | state | String | Variable, 32 max | Mandatory | - | Random string for CSRF protection purposes |
11 | additionalInfo | JSON Object | Variable | Mandatory | - | Additional information |
12 | additionalInfo.identity | JSON Object | Variable | Mandatory | - | Additional information of product code |
Request Sample
The following script is a request sample of this API:
POST /snap/v1.0/registration-account-creation
X-TIMESTAMP: 2024-12-19T13:20:13+07:00
X-PARTNER-ID: 4abbcb6ce30229994c76169006e0dc9c
X-SIGNATURE: mmpCJ+NptQaT2SNlKpi/RCHFwPEbSGnN2UDGv0SRwaeo+Hz+A9y3lUvkbaVj3fC9q7pVJeJ/5MryCgNzX+LdWA==
X-EXTERNAL-ID: 1722844844
CHANNEL-ID: 12345
Content-Type: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJQYXlkaWEiLCJpYXQiOjE3MjI4MzEyODcsImV4cCI6MTcyMjkxNzY4NywiZGF0YSI6eyJlbnYiOiJwcm9kdWN0aW9uIn19.wFndHWrtUMYIdbTqOtXN1EQR1y2HgafWvu-wti8IIgk
{
"partnerReferenceNo": "bea17075-4163-44ad-9fff-3ca8c80809cb",
"email": "[email protected]",
"name": "Davonte",
"phoneNo": "089912340003",
"redirectUrl": "https://paydia.id/redirect/",
"scopes": "PUBLIC_ID",
"seamlessData": "%7B%22mobileNumber%22%3A%22089912340003%22%7D",
"seamlessSign": "JsjEQvp9B0ZhPfr3LBnrGBGOsapQfMSq6yQSFqgrGfOS4Gqu2PmcnBJ8wnK8P1WEjfPQjWZI3sWh4EFb173l%2BwJyz5IeMfVuiFd3kZn7ysc54dXWVM1RoOq%2FjKJXJ1SGzUcaZD9ZiquG9V9uZx0VvqAZLLaXpfazRWYZQlvXnr11muyxKra8avyXqZBrDTA%2BZBPhupYT2KQmuodj3Xc54r4lvTXyfDdHYENawZqQCsZdxy2r13IO6%2BwbzcapXb%2FAiTtIlvNKnWl%2FhoRApI4ewKiHDTu0xywrLU8DHTZu4jziVT%2ByooUn0onYwwKF6x4JmOrUkxj92JOOESFbkYJzBg%3D%3D",
"state": "1734589213",
"additionalInfo": {
"identity": {
"type": "1",
"id": "123456789012345",
"name": "Davonte",
"address": "Jl Pintu Air",
"placeOfBirth": "Jakarta",
"dateOfBirth": "2000-01-01",
"occupation": "10",
"gender": "0",
"citizenship": "0",
"selfie": "https://i.pinimg.com/564x/97/48/94/974894c52777ad59f48560c846e58726.jpg",
"frontIdPhoto": "https://i.pinimg.com/564x/97/48/94/974894c52777ad59f48560c846e58726.jpg",
"backIdPhoto": "https://i.pinimg.com/564x/97/48/94/974894c52777ad59f48560c846e58726.jpg"
}
}
}
Response
The following part will be describe about parameter of response in this API:
Response Parameter
The following table is a list of response parameter in this API:
Body
The following table is a body of response parameter:
No | Name | Type | Length | Required | Condition | Remarks |
---|---|---|---|---|---|---|
1 | responseCode | String | Fixed, 7 max | Mandatory | - | Refer to response code list |
2 | responseMessage | String | Variable, 150 max | Mandatory | - | Refer to response code list |
3 | referenceNo | String | Variable, 64 max | Optional | - | Transaction identifier on Paydia |
4 | partnerReferenceNo | String | Variable, 64 max | Mandatory | - | Unique transaction identifier on partner system which assigned to each transaction |
5 | state | String | Variable, 32 max | Mandatory | - | Random string for CSRF protection purposes |
6 | additionalInfo | JSON Object | Variable | Mandatory | - | Additional information |
7 | additionalInfo.directUrl | String | Variable, 2048 max | Mandatory | - | Paydia checkout URL |
8 | authCode | String | 256 | Mandatory | - | For access token B2B2C |
Response Sample
The following script is a response sample of this API:
{
"responseCode": "2000600",
"responseMessage": "Successful",
"referenceNo": "DKdZETZtwlZ8xm6E",
"partnerReferenceNo": "bea17075-4163-44ad-9fff-3ca8c80809cb",
"state": "1734589213",
"additionalInfo": {
"directUrl": "https://dev-oauth-pwa-snap.paydia.co.id/?partnerId=35d1a1127182a65e4fe0256242a40a6d×tamp=2024-12-19T13%3A20%3A22%2B07%3A00&externalId=IFhMOa6xKOMZJ75b&channelId=12345&scopes=PUBLIC_ID&state=1734589213&redirectUrl=https%3A%2F%2Fpaydia.id%2Fredirect%2F&seamlessData=%7B%22mobileNumber%22%3A%22089912340003%22%7D&seamlessSign=JsjEQvp9B0ZhPfr3LBnrGBGOsapQfMSq6yQSFqgrGfOS4Gqu2PmcnBJ8wnK8P1WEjfPQjWZI3sWh4EFb173l%252BwJyz5IeMfVuiFd3kZn7ysc54dXWVM1RoOq%252FjKJXJ1SGzUcaZD9ZiquG9V9uZx0VvqAZLLaXpfazRWYZQlvXnr11muyxKra8avyXqZBrDTA%252BZBPhupYT2KQmuodj3Xc54r4lvTXyfDdHYENawZqQCsZdxy2r13IO6%252BwbzcapXb%252FAiTtIlvNKnWl%252FhoRApI4ewKiHDTu0xywrLU8DHTZu4jziVT%252ByooUn0onYwwKF6x4JmOrUkxj92JOOESFbkYJzBg%253D%253D",
"authCode": "b0b15fc45b34588d1455cd23ba31f4bd72c6b68272ccbf7aeb773f31c5d2d955"
}
}
Response Code and Message
The following table is the list response code and message of Account Creation API:
No | Response Code | Response Message | Remarks |
---|---|---|---|
1 | 2000600 | Successful | Success to be processed |
2 | 4000601 | Invalid Field Format | Invalid format for certain field |
3 | 4000602 | Invalid Mandatory Field | Missing or invalid format on mandatory field |
4 | 4010600 | Unauthorized. [reason] | General unauthorized error |
5 | 4010601 | Invalid Token (B2B) | Invalid or Expired Access Token |
6 | 4030605 | Exceeds Transaction Amount Limit | Minimum or maximum amount limit |
7 | 4090600 | Conflict | Cannot use same X-EXTERNAL-ID in same day |
8 | 4090601 | Duplicate partnerReferenceNo | Duplicate partnerReferenceNo |
9 | 5000602 | Backend system failure | 500 internal server error |