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-08-05T14:57:44+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": "14a34986-5ff8-40f1-9f12-1f1eecfdad63",
"email": "[email protected]",
"name": "Margarett",
"phoneNo": "0812345678801",
"redirectUrl": "https://paydia.id/redirect/",
"scopes": "PUBLIC_ID",
"seamlessData": "%7B%22mobileNumber%22%3A%220812345678801%22%7D",
"seamlessSign": "PHK8ZHXT3HD5ogm21KRh9WZKIycAcKRR%2BVACoP1xyTjRmkPPpszuBoLuRBC17wiSXD1uh%2F5Wo%2BoJLWotjvWar%2Fn3mc%2F5zNRsKPvDJrdL8JVCGJXOSSA8N%2BtgLC4nJvp7UO7bOlEznLvItLtNHITBBUsNk9ghPSZ6U8kBT4KdtCnRJsZnCpw9dQZXOvJDcvGzN0SSm00gv8KbrPahzBT4jaXhIeGPEzL%2F3Tn%2FYceUtF%2FVx81uXOFiR10KZ71rfMSRzp0pQEdAv0%2BiuCRsdKWTJElcie%2FVzOl%2Fs3LToAS3LULnQi2kUjLU%2B%2FXJOE8GKdF624h73pda5R92XTbbU%2Bbe4Q%3D%3D",
"state": "1722844664",
"additionalInfo": {
"identity": {
"type": "1",
"id": "123456789012345",
"name": "Budi Wahyudi",
"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 |
Response Sample
The following script is a response sample of this API:
{
"responseCode": "2000600",
"responseMessage": "Successful",
"referenceNo": "PtLunDV0kE0FN5rm",
"partnerReferenceNo": "14a34986-5ff8-40f1-9f12-1f1eecfdad63",
"state": "1722844664",
"additionalInfo": {
"directUrl": "https://oauth-pwa-snap.paydia.co.id/?partnerId=4abbcb6ce30229994c76169006e0dc9c×tamp=2024-08-05T14%3A57%3A47%2B07%3A00&externalId=Nk4dFNdzrUmyIuks&channelId=12345&scopes=PUBLIC_ID&state=1722844664&redirectUrl=https%3A%2F%2Fpaydia.id%2Fredirect%2F&seamlessData=%7B%22mobileNumber%22%3A%220812345678801%22%7D&seamlessSign=PHK8ZHXT3HD5ogm21KRh9WZKIycAcKRR%252BVACoP1xyTjRmkPPpszuBoLuRBC17wiSXD1uh%252F5Wo%252BoJLWotjvWar%252Fn3mc%252F5zNRsKPvDJrdL8JVCGJXOSSA8N%252BtgLC4nJvp7UO7bOlEznLvItLtNHITBBUsNk9ghPSZ6U8kBT4KdtCnRJsZnCpw9dQZXOvJDcvGzN0SSm00gv8KbrPahzBT4jaXhIeGPEzL%252F3Tn%252FYceUtF%252FVx81uXOFiR10KZ71rfMSRzp0pQEdAv0%252BiuCRsdKWTJElcie%252FVzOl%252Fs3LToAS3LULnQi2kUjLU%252B%252FXJOE8GKdF624h73pda5R92XTbbU%252Bbe4Q%253D%253D"
}
}
Response Code and Message
The following table is the list response code and message of Account Inquiry 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 |