GET /api/v1/vendors/:vendor_api_token/users/:user_id/remittances
VENDORS: Show all remittances belonging to the given user

Returns a hash with a single key 'remittance_ids', containing an array of integers corresponding to the IDs of the remittance records belonging to the specified user

Supported Formats

json

Examples

https://rebit.ph/api/v1/vendors/ZBK3rKuzfsyaQt9spJmEu4Vw7_sqbyzT/users/1/remittances
{
  "remittance_ids": [
    1,
    2,
    3
  ]
}

POST /api/v1/vendors/:vendor_api_token/users/:user_id/remittances
VENDORS: Initiate a new money transfer by providing a recipient_id and a remittance hash. (VENDOR partner version)

Supported Formats

json

Errors

Code Description
404 Couldn't find a recipient record with that ID
500 Please check your provided rebittance attributes carefully

Examples

{
  "id": 38,
  "status": "completed",
  "status_in_words": "completed",
  "processing_fee": 0.0,
  "processing_fee_in_btc": 0.0,
  "service_fee": 0.0,
  "service_fee_in_btc": 0.0,
  "invoice_address_with_amount": "bitcoin:3MGXng4B6DrbnCYunmxCs5ayHxUrEsjt3S?amount=0.08112778",
  "completed_at": "2018-03-13T16:10:31.663+08:00",
  "created_at": "2018-03-06T13:47:44.324+08:00",
  "succeeded_at": null,
  "remittance_details": {
    "pickup": "HQ"
  },
  "amount": 523.0,
  "currency": "USD",
  "amount_in_btc": 0.08112778,
  "total": 523.0,
  "total_in_btc": 0.08112778,
  "effective_rate": "329680.0",
  "effective_rates": {
    "PHP": 329680.0,
    "USD": 6446.62
  },
  "destination_amount": "523.0",
  "destination_currency": "USD",
  "source_amount": "0.08112778",
  "source_currency": "BTC",
  "destination": "$523.00",
  "source": "B⃦0.08112778",
  "recipient": {
    "id": 64,
    "first_name": "Juan",
    "middle_name": null,
    "last_name": "dela Cruz",
    "email": "juan@delacruz.com",
    "mobile": "+63 (123) 123-1231",
    "created_at": "2018-03-06T13:47:44.229+08:00"
  },
  "user": {
    "id": 1,
    "first_name": "Test",
    "last_name": "User",
    "email": "test@user.com"
  },
  "manual_transaction": false
}

Params

Param name Description
recipient_id
required

Recipient ID

Validations:

  • Must be a String

remittance
required

Remittance instructions

Validations:

  • Must be a Hash

remittance[amount]
required

Remittance amount (Ex. 1000.00)

Validations:

  • Must be a String

remittance[currency]
required

Remittance amount currency code (Ex. 'USD', 'PHP', 'BTC', 'JPY')

Validations:

  • Must be one of: PHP, USD, CAD, JPY, AUD, SGD, HKD, KRW, CNY, EUR, VND, SAR, TWD, QAR, KWD, AED, GBP, MYR, INR, IDR, LKR, BTC.

remittance[strategy]
required

Remittance strategy slug

Validations:

  • Must be one of: pickup, bank, bills, eload.

remittance[callback_url]
optional

URL to post updates to when remittance status changes

Validations:

  • Must be a String

remittance[remittance_details]
required

Remittance details

Validations:

  • Must be a Hash

remittance[remittance_details][bank]
optional

Bank Name, if strategy is 'bank'. See the /delivery_methods call for list of Code-Name mappings

Validations:

  • Must be one of: ABC, ASB, AUB, BDO, BPI, BFS, BOA, BOC, CBS, CBC, CCB, CTS, CIT, CIS, EWB, EWR, EQC, HBP, HSB, LBP, MSB, MAY, MET, PBC, PNB, PNS, PSB, PAC, PVB, PTC, PPB, RCB, RSB, RBN, SBS, SEC, SCB, SBA, USB, UCP, UBP, YSB.

remittance[remittance_details][bank_account_type]
optional

Bank Account Type, if strategy is 'bank'

Validations:

  • Must be one of: PHP Savings, PHP Checking.

remittance[remittance_details][bank_account_name]
optional

Bank Account Name, if strategy is 'bank'

Validations:

  • Must be a String

remittance[remittance_details][bank_account_number]
optional

Bank Account No., if strategy is 'bank'

Validations:

  • Must be a String

remittance[remittance_details][delivery]
optional

Delivery provider name, if strategy is 'delivery'. See the /delivery_methods for list Code-Name mappings

Validations:

  • Must be one of: LBCPP.

remittance[remittance_details][pickup]
optional

Pickup provider name, if strategy is 'pickup'. See the /delivery_methods for list of Code-Name mappings

Validations:

  • Must be one of: CLH, MLH, PAL.

remittance[remittance_details][bills]
optional

Merchant or Provider name, if strategy is 'bills'. See the /providers call for more information.

Validations:

  • Must be one of: aig, acc, allied, ateneo, axa, banco, bankard, bayantel, british, cdc, cebupac, chinatrust, latter, citicard, citiloan, citifin, city, cosmo, dbtc, dlsg, dlsz, destiny, digitel, direc, eastern, eastwest, easy, equi, febc, fgf, first, fortcare, fortlife, globe, great, grepa, hsbc, , info, innove, ios, ipm, manilamem, manilawater, manuchina, manufin, manuphil, maynilad, meralco, metro, miriam, mmo, mydestiny, nation, nso, opsmile, pagibighl, pagibigmp2, pagibigreg, papf, paramount, philam, pioneer, piso, planet, pldt, pnb, pncc, prime, prude, psloan, pt, redcross, blind, rockwell, sbdiner, sbmc, sbcash, sky, smart, sssff, sssnw, sssofw, sssself, sssvol, scloan, sccard, subic, union, usjr, ue, veco, world.

remittance[remittance_details][bill_due_date]
optional

Bill's due date, if strategy is 'bills

Validations:

  • Must be a String

remittance[remittance_details][bill_period_from]
optional

Bill's starting period, if strategy is 'bills

Validations:

  • Must be a String

remittance[remittance_details][bill_period_to]
optional

Bill's ending period, if strategy is 'bills

Validations:

  • Must be a String


GET /api/v1/vendors/:vendor_api_token/users/:user_id/remittances/:id
VENDORS: Show information about a given recipient along with their associated remittance. (VENDOR partner version)

All information about the given remittance and recipient are returned with this call. Important fields to note include status_in_words and payment_details.

Status_in_words changes from its initial value of pending to successful when we have confirmed blockchain payment. It changes to completed when we have handed off the local currency to the chosen fulfillment partner. It could in very rare occasions also be marked partial if the sender only sends partial payment and thus leaves the invoice address unpaid. (If the sender eventually adds the remaining balance, we will change the status to successful accordingly.)

Vendors using the API can also trigger a change of status to cancelled by using the /delete method. This safely removes the transaction from our processing queue.

Lastly, it could be rejected if we detect abuse or are otherwise unable to complete the rebittance. In this case, we will include an explanation in the 'rejection_message' field.

With every status change, we will POST an updated JSON object of the remittance record to your provided callback_url, if any. This JSON object will usually contain a payment_details which lists network confirmations and relevant addresses, if these are available.

Supported Formats

json

Examples

{
  "id": 38,
  "status": "completed",
  "status_in_words": "completed",
  "processing_fee": 0.0,
  "processing_fee_in_btc": 0.0,
  "service_fee": 0.0,
  "service_fee_in_btc": 0.0,
  "invoice_address_with_amount": "bitcoin:3MGXng4B6DrbnCYunmxCs5ayHxUrEsjt3S?amount=0.08112778",
  "completed_at": "2018-03-13T16:10:31.663+08:00",
  "created_at": "2018-03-06T13:47:44.324+08:00",
  "succeeded_at": null,
  "remittance_details": {
    "pickup": "HQ"
  },
  "amount": 523.0,
  "currency": "USD",
  "amount_in_btc": 0.08112778,
  "total": 523.0,
  "total_in_btc": 0.08112778,
  "effective_rate": "329680.0",
  "effective_rates": {
    "PHP": 329680.0,
    "USD": 6446.62
  },
  "destination_amount": "523.0",
  "destination_currency": "USD",
  "source_amount": "0.08112778",
  "source_currency": "BTC",
  "destination": "$523.00",
  "source": "B⃦0.08112778",
  "recipient": {
    "id": 64,
    "first_name": "Juan",
    "middle_name": null,
    "last_name": "dela Cruz",
    "email": "juan@delacruz.com",
    "mobile": "+63 (123) 123-1231",
    "created_at": "2018-03-06T13:47:44.229+08:00"
  },
  "user": {
    "id": 1,
    "first_name": "Test",
    "last_name": "User",
    "email": "test@user.com"
  }
}

Params

Param name Description
id
required

Remittance ID (Integer > 0)

Validations:

  • Must be a String


DELETE /api/v1/vendors/:vendor_api_token/users/:user_id/remittances/:id
VENDORS: Cancel a remittance. Note that this only changes the status of the remittance but does not delete it from the database. (VENDOR partner version)

Cancel a remittance. We never delete records so you will still be able to retrieve any cancelled rebittances. (Internally, we set the literal status to 'cancelled' and the integer value of 'status' to 3.)

Params

Param name Description
id
required

Remittance ID (Integer > 0)

Validations:

  • Must be a String


POST /api/v1/vendors/:vendor_api_token/users/:user_id/remittances/calculate
VENDORS: Returns the processing fee and service fee for a given remittance amount, strategy, and province, scoped by user and vendor.

In order to calculate the cost of a given rebittance, you will need to provide the amount, strategy, and location of the recipient. This is due to the fact that different fulfillment partners will charge different rates in different zones. Additionally, the remittance needs to be scoped to a given user, as in some situations, we could extend an overriding discount to a user that needs to be factored in to the calculation.

Supported Formats

json

Examples

{
  "response": {
    "fees": {
      "amount_in_php": 1000,
      "amount_in_btc": 0.048196,
      "amount_in_user_fiat": 1000,
      "service_fee_in_php": 0,
      "service_fee_in_btc": 0,
      "service_fee_in_user_fiat": 0,
      "processing_fee_in_php": 0,
      "processing_fee_in_btc": 0,
      "processing_fee_in_user_fiat": 0,
      "total_in_php": 1000,
      "total_in_btc": 0.048196,
      "total_in_user_fiat": 1000
    }
  }
}

Params

Param name Description
amount
required

Remittance amount (Ex. 1000.00 or 10000)

Validations:

  • Must be a String

currency
required

Remittance amount currency code

Validations:

  • Must be one of: PHP, USD, CAD, JPY, AUD, SGD, HKD, KRW, CNY, EUR, VND, SAR, TWD, QAR, KWD, AED, GBP, MYR, INR, IDR, LKR, BTC.

strategy
required

Remittance strategy slug

Validations:

  • Must be one of: pickup, bank, bills, eload.

provider
required

Remittance provider slug

Validations:

  • Must be one of: ABC, ASB, AUB, BDO, BPI, BFS, BOA, BOC, CBS, CBC, CCB, CTS, CIT, CIS, EWB, EWR, EQC, HBP, HSB, LBP, MSB, MAY, MET, PBC, PNB, PNS, PSB, PAC, PVB, PTC, PPB, RCB, RSB, RBN, SBS, SEC, SCB, SBA, USB, UCP, UBP, YSB, CLH, MLH, PAL, LOADGMX150, LOADGMX300, LOADGMX500, LOADGMX1000, LOADSMB100, LOADSMB200, LOADSMB300, LOADSMB500, SM100, SM115, SM200, SM300, SM500, SM1000, LOADSUN100, LOADSUN150, LOADSUN300, LOADSUN500, LOADSUNIDD30, LOADSUNIDD60, aig, acc, allied, ateneo, axa, banco, bankard, bayantel, british, cdc, cebupac, chinatrust, latter, citicard, citiloan, citifin, city, cosmo, dbtc, dlsg, dlsz, destiny, digitel, direc, eastern, eastwest, easy, equi, febc, fgf, first, fortcare, fortlife, globe, great, grepa, hsbc, , info, innove, ios, ipm, manilamem, manilawater, manuchina, manufin, manuphil, maynilad, meralco, metro, miriam, mmo, mydestiny, nation, nso, opsmile, pagibighl, pagibigmp2, pagibigreg, papf, paramount, philam, pioneer, piso, planet, pldt, pnb, pncc, prime, prude, psloan, pt, redcross, blind, rockwell, sbdiner, sbmc, sbcash, sky, smart, sssff, sssnw, sssofw, sssself, sssvol, scloan, sccard, subic, union, usjr, ue, veco, world, GMX10, GMX100, GMX350, GMX450, GMX550, GMX600, GMX700, GMX900, SMLT20, SMLT30, SMGT10, SMGTP10, SMBRO15, SMBRO30, SMBRO50, SMBRO60, SMBRO100, SMBRO115, SMBRO200, SMBRO300, SMBRO500, SMAT10, SMAT20, SMAT30MMS, SMAT40, SMAT50, SMGT20, SMUP20, SMUP35, SMUP70, SMUP130, SMAC20, SMAC100, SMGAIO15, SMGAIO20, SMGAIO30, SMGAIO55, SMGAIO99, SMLU20, SMLU35, SMLU70, SMLU130, SMHELLOW15, SMHELLOW30, SMHELLOW50, SMHELLOW60, SMHELLOW100, SMHELLOW115, SMHELLOW200, SMHELLOW300, SMHELLOW500, SMHELLOW1000, SNX10, SNX15, SNX20, SNX25, SNX30, SNX50, SNX75, SNX100, SNX150, SNX300, SNX500, RED10, RED20, RED30, RED50, RED100, RED200, RED300, RED500, TMX50, TMX100, LBCPP.

province
required

Province name of final destination ('Metro Manila', 'Davao', 'Cebu', etc.)

Validations:

  • Must be one of: Abra, Agusan del Norte, Agusan del Sur, Aklan, Albay, Angeles, Antique, Apayao, Aurora, Baguio, Basilan, Bataan, Batanes, Batangas, Benguet, Biliran, Bohol, Bukidnon, Bulacan, Cagayan, Camarines Norte, Camarines Sur, Camiguin, Capiz, Catanduanes, Cavite, Cebu, Compostela Valley, Cotabato, Dagupan, Davao Occidental, Davao Oriental, Davao del Norte, Davao del Sur, Dinagat Islands, Eastern Samar, Guimaras, Ifugao, Ilocos Norte, Ilocos Sur, Iloilo, Isabela, Kalinga, La Union, Laguna, Lanao del Norte, Lanao del Sur, Leyte, Lucena, Maguindanao, Marinduque, Masbate, Metro Manila, Mindoro Occidental, Mindoro Oriental, Misamis Occidental, Misamis Oriental, Mountain Province, Naga, Negros Occidental, Negros Oriental, Northern Samar, Nueva Ecija, Nueva Vizcaya, Olongapo, Palawan, Pampanga, Pangasinan, Puerto Princesa, Quezon, Quirino, Rizal, Romblon, Samar, Santiago, Sarangani, Siquijor, Sorsogon, South Cotabato, Southern Leyte, Sultan Kudarat, Sulu, Surigao del Norte, Surigao del Sur, Tarlac, Tawi-Tawi, Zambales, Zamboanga, Zamboanga del Norte, Zamboanga del Sur.