GET /api/v1/vendors/:vendor_api_token/users
VENDORS: Show a list of users belonging to this Vendor account

Return a list of users created by this vendor, sorted by newest first.

Supported Formats

json

Examples

https://rebit.ph/api/v1/vendors/ZBK3rKuzfsyaQt9spJmEu4Vw7_sqbyzT/users
[
  {
    "user": {
      "id": 1,
      "first_name": "Juan",
      "last_name": "dela Cruz",
      "email": "juan@example.com",
      "external_source_id": null,
      "avatar": null,
      "birthday": null,
      "created_at": "2016-05-02T10:28:54.040+08:00",
      "updated_at": "2016-05-03T10:33:01.577+08:00",
      "provider": null,
      "uid": null,
      "name": null,
      "gender": null,
      "access_token": null,
      "refresh_token": null,
      "mobile": null,
      "minimum_amount_in_php": 5,
      "maximum_amount_in_php": 15000,
      "referror_id": null,
      "referror_name": null,
      "accepted_referral_agreement": false,
      "wallet_address": null,
      "referral_earnings": 0,
      "lifetime_referral_earnings": 0,
      "institutional": false,
      "enabled_referral_on": null,
      "address": null,
      "city": null,
      "country": null,
      "postal_code": null,
      "encrypted_api_token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
      "maximum_sends_per_day": 10,
      "enable_ip_whitelist": false,
      "whitelisted_ips": null,
      "banned": false,
      "banned_at": null,
      "processing_fee_override": 1,
      "vendor_id": 107,
      "deleted": false,
      "deleted_at": null,
      "last_accessed_via_api_at": "2016-05-03T10:33:01.575+08:00",
      "latitude": null,
      "longitude": null,
      "mobile_confirmed": true,
      "mobile_confirmed_at": "2016-05-02T10:28:53.959+08:00",
      "mobile_confirmation_code": "",
      "kyc_level": 0,
      "identification": {
        "url": null,
        "thumb": {
          "url": null
        }
      },
      "identification_confirmed": false,
      "proof_of_address": {
        "url": null,
        "thumb": {
          "url": null
        }
      },
      "proof_of_address_confirmed": false,
      "enabled_credit": false,
      "credit_in_php": 0,
      "is_business_user": false,
      "is_test": false,
      "business_name": null,
      "business_registration_number": null,
      "business_address": null,
      "business_registration": {
        "url": null,
        "thumb": {
          "url": null
        }
      },
      "business_registration_confirmed": false,
      "external_source": null,
      "spread": null
    }
  }
]

GET /api/v1/vendors/:vendor_api_token/users/:id
VENDORS: Show a user belonging to this Vendor account

Supported Formats

json

Errors

Code Description
404 We couldn't find that user

Examples

https://rebit.ph/api/v1/vendors/ZBK3rKuzfsyaQt9spJmEu4Vw7_sqbyzT/users/:id
{
  "user": {
    "id": 1,
    "first_name": "Juan",
    "last_name": "dela Cruz",
    "email": "juan@example.com",
    "birthday": null,
    "mobile": null,
    "wallet_address": null,
    "institutional": false,
    "address": null,
    "city": null,
    "country": null,
    "postal_code": null,
    "maximum_sends_per_day": 10,
    "mobile_confirmed": true,
    "kyc_level": 0,
    "identification": {
      "url": null,
      "thumb": {
        "url": null
      }
    },
    "identification_confirmed": false,
    "proof_of_address": {
      "url": null,
      "thumb": {
        "url": null
      }
    },
    "proof_of_address_confirmed": false,
    "recipient_ids": [
      1,
      2,
      3
    ],
    "remittance_ids": [
      1,
      2
    ],
    "total_remittances_today": 1000,
    "vendor_uploaded_identification": null,
    "vendor_uploaded_proof_of_address": null
  }
}

GET /api/v1/vendors/:vendor_api_token/users/find_by_email
VENDORS: Show a user belonging to this Vendor account by supplying their email address

Supported Formats

json

Errors

Code Description
404 We couldn't find that user

Examples

https://rebit.ph/api/v1/vendors/ZBK3rKuzfsyaQt9spJmEu4Vw7_sqbyzT/users/find_by_email?email=helloluis%40me.com
(Don't forget to escape the email string!)
{
  "user": {
    "id": 1,
    "first_name": "Juan",
    "last_name": "dela Cruz",
    "email": "juan@example.com",
    "birthday": null,
    "mobile": null,
    "wallet_address": null,
    "institutional": false,
    "address": null,
    "city": null,
    "country": null,
    "postal_code": null,
    "maximum_sends_per_day": 10,
    "mobile_confirmed": true,
    "kyc_level": 0,
    "identification": {
      "url": null,
      "thumb": {
        "url": null
      }
    },
    "identification_confirmed": false,
    "proof_of_address": {
      "url": null,
      "thumb": {
        "url": null
      }
    },
    "proof_of_address_confirmed": false,
    "recipient_ids": [
      1,
      2,
      3
    ],
    "remittance_ids": [
      1,
      2
    ],
    "total_remittances_today": 1000,
    "vendor_uploaded_identification": null,
    "vendor_uploaded_proof_of_address": null
  }
}

POST /api/v1/vendors/:vendor_api_token/users
VENDORS: Create a new user under your Vendor account

Create a new user account under this Vendor account. This returns a 8-character randomly-generated password that you may pass on to your user or store for later use. (The password is not required in order to send remittances.)

Take note of the ID parameter in the returned User hash, it is how you will access this same user later on.

Supported Formats

json

Examples

https://rebit.ph/api/v1/vendors/ZBK3rKuzfsyaQt9spJmEu4Vw7_sqbyzT/users
{
  "user": {
    "id": 1,
    "first_name": "Juan",
    "last_name": "dela Cruz",
    "email": "juan@example.com",
    "birthday": null,
    "mobile": null,
    "wallet_address": null,
    "institutional": false,
    "address": null,
    "city": null,
    "country": null,
    "postal_code": null,
    "maximum_sends_per_day": 10,
    "mobile_confirmed": true,
    "kyc_level": 0,
    "identification": {
      "url": null,
      "thumb": {
        "url": null
      }
    },
    "identification_confirmed": false,
    "proof_of_address": {
      "url": null,
      "thumb": {
        "url": null
      }
    },
    "proof_of_address_confirmed": false,
    "recipient_ids": [
      1,
      2,
      3
    ],
    "remittance_ids": [
      1,
      2
    ],
    "total_remittances_today": 1000,
    "vendor_uploaded_identification": null,
    "vendor_uploaded_proof_of_address": null
  },
  "password": "yourpassword",
  "api_token": "AAAAAAAAAA-t_-DCsC-sssss-xxxxx"
}

Params

Param name Description
user
required

User Information

Validations:

  • Must be a Hash

user[first_name]
required

First name; defaults to 'Guest'

Validations:

  • Must be a String

user[last_name]
required

Last name; defaults to 'Customer'

Validations:

  • Must be a String

user[email]
required

Validations:

  • Must be a String

user[mobile]
optional

Mobile number

Validations:

  • Must be a String

user[address]
optional

Residential address

Validations:

  • Must be a String

user[city]
optional

City

Validations:

  • Must be a String

user[country]
optional

Country

Validations:

  • Must be a String

user[postal_code]
optional

Validations:

  • Must be a String

user[identification]
optional

Validations:

  • Must be a Hash

user[identification][url]
optional

URL string pointing to a static image of the user's passport, driver's license, or other government-issued ID. This is required for sending limits above PhP50,000.00 (Ex. http ://aws.amazon.com/image.jpg)

Validations:

  • Must be a String

user[proof_of_address]
optional

Validations:

  • Must be a Hash

user[proof_of_address][url]
optional

URL string pointing to a static image of the user's utility bill, bank statement, or other third-party-issued document with residential address prominently indicated. This is required for sending limits above PhP150,000.00 (Ex. http ://aws.amazon.com/image.jpg)

Validations:

  • Must be a String

user[birthday]
optional

Birthdate. This is required for sending limits above PhP150,000.00.

Validations:

  • Must be a String


POST /api/v1/vendors/:vendor_api_token/users/instant_remit
VENDORS: Quick rebittance from an existing user

Special workflow for ATMs with small screens.

Send the email address of the sender and the recipient, along with the total amount of the remittance in BTC. If the email address of the sender doesn't exist for this vendor, a new user record will be created. Otherwise, the email address will be matched to an existing user belonging to this vendor. The recipient email will likewise be either by created as a new record or matched to an existing recipient belonging to the user.

Processing and delivery fees will be deducted from this total amount when the user proceeds to the Rebit website to complete their remittance information and enter the recipient details.

The user will receive an email with a link that will automatically log them in to Rebit and display the pending remittance record for their perusal and update.

On successful remittance creation, the API will return 3 hashes – a user object, a remittance object, and an invoice_address string. The vendor must transfer the stated amount to the invoice_address immediately to ensure that the remittance will have received a confirmation by the time the user actually arrives at the Rebit.ph website to enter the rest of their details.

Examples

{
  email:  'luis@sci.ph',
  amount: 1.5
}

Params

Param name Description
email
required

Valid email address of sender

Validations:

  • Must be a String

amount
required

Floating point amount in BTC

Validations:

  • Must be a String

first_name
optional

First name; defaults to 'Guest'

Validations:

  • Must be a String

last_name
optional

Last name; defaults to 'Customer'

Validations:

  • Must be a String

password
optional

Password; provide this if you are creating a user and you don't want a password to be automatically generated for you

Validations:

  • Must be a String


PUT /api/v1/vendors/:vendor_api_token/users/:id
VENDORS: Update the attributes of a user belonging to your Vendor account

Update user profile information. Note that a user's email address is not editable. When changing a user's password, use the /users/:id/update_password call.

Supported Formats

json

Errors

Code Description
404 We couldn't find that user

Examples

{
  "user": {
    "id": 1,
    "first_name": "Juan",
    "last_name": "dela Cruz",
    "email": "juan@example.com",
    "birthday": null,
    "mobile": null,
    "wallet_address": null,
    "institutional": false,
    "address": null,
    "city": null,
    "country": null,
    "postal_code": null,
    "maximum_sends_per_day": 10,
    "mobile_confirmed": true,
    "kyc_level": 0,
    "identification": {
      "url": null,
      "thumb": {
        "url": null
      }
    },
    "identification_confirmed": false,
    "proof_of_address": {
      "url": null,
      "thumb": {
        "url": null
      }
    },
    "proof_of_address_confirmed": false,
    "recipient_ids": [
      1,
      2,
      3
    ],
    "remittance_ids": [
      1,
      2
    ],
    "total_remittances_today": 1000,
    "vendor_uploaded_identification": null,
    "vendor_uploaded_proof_of_address": null
  }
}

Params

Param name Description
user
required

User Information

Validations:

  • Must be a Hash

user[first_name]
optional

First name; defaults to 'Guest'

Validations:

  • Must be a String

user[last_name]
optional

Last name; defaults to 'Customer'

Validations:

  • Must be a String

user[email]
optional

Email

Validations:

  • Must be a String

user[mobile]
optional

Mobile number

Validations:

  • Must be a String

user[address]
optional

Residential address

Validations:

  • Must be a String

user[city]
optional

City

Validations:

  • Must be a String

user[country]
optional

Country

Validations:

  • Must be a String

user[postal_code]
optional

Validations:

  • Must be a String

user[identification]
optional

Validations:

  • Must be a Hash

user[identification][url]
optional

URL string pointing to a static image of the user's passport, driver's license, or other government-issued ID. This is required for sending limits above PhP50,000.00 (Ex. )

Validations:

  • Must be a String

user[proof_of_address]
optional

Validations:

  • Must be a Hash

user[proof_of_address][url]
optional

URL string pointing to a static image of the user's utility bill, bank statement, or other third-party-issued document with residential address prominently indicated. This is required for sending limits above PhP150,000.00 (Ex. )

Validations:

  • Must be a String

user[birthday]
optional

Birthdate. This is required for sending limits above PhP150,000.00 (Ex. )

Validations:

  • Must be a String


PUT /api/v1/vendors/:vendor_api_token/users/:id/update_password
VENDORS: Change the password of a user belonging to your Vendor account

Change a user's password with 3 parameters – old_password, password, password_confirmation. Password and password_confirmation should match.

Errors

Code Description
404 We couldn't find that user.

Examples

https://rebit.ph/api/v1/vendors/ZBK3rKuzfsyaQt9spJmEu4Vw7_sqbyzT/users/1/update_password
{
  user: {
    old_password:           'rebit1234',
    password:               'R3b1t1234!',
    password_confirmation:  'R3b1t1234!'
  }
}

DELETE /api/v1/vendors/:vendor_api_token/users/:id
VENDORS: Delete a user belonging to this VENDOR partner

Safely delete a user. This will also cascade down to the user's recipients.

Errors

Code Description
404 We couldn't find that user.