Skip to main content

Purse - XCO API (v1)

Download OpenAPI specification:Download

License: Purse

Merchants

Merchants related endpoints

Check if a user exists

Check if a user exists

Authorizations:
purse_oauth2
query Parameters
email
string <email>

Email of the user to check existence

phone_number
string
Example: phone_number=+331234567890

Phone number of the user to check existence

caller_id
string
Example: caller_id=123e4567-e89b-12d3-a456-426614174000

Identifier of the caller for rate limiting purposes (for example, the browser IP address or any unique identifier). If not provided, rate limiting will block requests only based on the clientId, which may lead to blocking legitimate requests from the same client. Providing a caller_id allows for more granular rate limiting and helps prevent blocking legitimate requests.

Responses

Response samples

Content type
application/json
Example
{
  • "exists": true,
  • "token_count": 2
}

Create a user and its consent

Create a user and its consent

Authorizations:
purse_oauth2
path Parameters
merchantId
required
string <uuid>
Example: 123e4567-e89b-12d3-a456-426614174000

Merchant identifier

Request Body schema: application/json
required
customer_reference
string
Example: "customer_12345"

Merchant customer reference

object (UserApplication)

User application

Responses

Request samples

Content type
application/json
Example
{
  • "customer_reference": "customer_12345",
  • "user": {
    }
}

Response samples

Content type
application/json
Example
{
  • "customer_reference": "customer_12345",
  • "user": {
    }
}

Start passwordless authentication

Start passwordless authentication on specified phone number or email address

Authorizations:
purse_oauth2
path Parameters
merchantId
required
string <uuid>
Example: 8a08aed3-c7cf-4622-b9ff-22da517a8739

Merchant identifier

Request Body schema: application/json
phone_number
string <phone>
Example: "+33623456789"

Phone number

email
string <email>
Example: "[email protected]"

Email address

caller_id
string
Example: "192.168.1.100"

Identifier of the caller for rate limiting purposes (for example, the browser IP address or any unique identifier. If not provided, rate limiting will block requests only based on the clientId, which may lead to blocking legitimate requests from the same client. Providing a callerId allows for more granular rate limiting and helps prevent blocking legitimate requests.

Responses

Request samples

Content type
application/json
Example
{
  • "phone_number": "+33623456789"
}

Response samples

Content type
application/problem+json
{
  • "title": "Validation Error",
  • "status": 400,
  • "detail": "The request body contains invalid fields.",
  • "instance": "/v1/merchants/123e4567-e89b-12d3-a456-426614174000/users",
  • "error": "Invalid email format",
  • "errors": [
    ]
}

Verify passwordless authentication

Verify passwordless authentication on specified phone number or email address

Authorizations:
purse_oauth2
path Parameters
merchantId
required
string <uuid>
Example: 8a08aed3-c7cf-4622-b9ff-22da517a8739

Merchant identifier

Request Body schema: application/json
phone_number
string <phone>
Example: "+33623456789"

Phone number

email
string <email>
Example: "[email protected]"

Email address

verification_code
required
string
Example: "123456"

Verification code

caller_id
string
Example: "192.168.1.100"

Identifier of the caller for rate limiting purposes (for example, the browser IP address or any unique identifier). If not provided, rate limiting will block requests only based on the clientId, which may lead to blocking legitimate requests from the same client. Providing a callerId allows for more granular rate limiting and helps prevent blocking legitimate requests.

Responses

Request samples

Content type
application/json
Example
{
  • "phone_number": "+33623456789",
  • "verification_code": "123456"
}

Response samples

Content type
application/json
{
  • "consent_challenge_id": "ae900e3c-91df-4e71-ba49-60985827c258",
  • "user": {
    }
}

Create a consent for a user and its merchant using consent challenge

Create a consent for a user and its merchant using consent challenge

Authorizations:
purse_oauth2
path Parameters
merchantId
required
string <uuid>
Example: 8a08aed3-c7cf-4622-b9ff-22da517a8739

Merchant identifier

customerReference
required
string
Example: customer_12345

Merchant customer reference

Request Body schema: application/json
consent_challenge_id
required
string <uuid>
Example: "bdc87c71-3a82-4757-91b2-559b1a888766"

Consent challenge identifier

Responses

Request samples

Content type
application/json
{
  • "consent_challenge_id": "bdc87c71-3a82-4757-91b2-559b1a888766"
}

Response samples

Content type
application/problem+json
{
  • "title": "Validation Error",
  • "status": 400,
  • "detail": "The request body contains invalid fields.",
  • "instance": "/v1/merchants/123e4567-e89b-12d3-a456-426614174000/users",
  • "error": "Invalid email format",
  • "errors": [
    ]
}

Get user by merchant customer reference

Retrieve user information based on merchant customer reference

Authorizations:
purse_oauth2
path Parameters
merchantId
required
string <uuid>
Example: 123e4567-e89b-12d3-a456-426614174000

Merchant identifier

customer_reference
required
string
Example: customer_12345

Merchant customer reference

Responses

Response samples

Content type
application/json
Example
{
  • "email": "[email protected]",
  • "phone_number": "+33612345678",
  • "first_name": "John",
  • "last_name": "Doe",
  • "gender": "male",
  • "birthdate": "1990-01-15",
  • "addresses": [
    ]
}