Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[New Product] fix api biller additional data info #309

Merged
merged 2 commits into from
Oct 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions source/includes/_biller_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ POST https://partner.oyindonesia.com/api/v2/bill \
-H 'x-api-key:987654' \
-d '{
"customer_id": "12345678910",
"product_id": "plnprepaid",
"product_id": "plnpre",
"partner_tx_id": "DEV123456789",
"amount": null,
"additional_data": null
Expand All @@ -30,7 +30,7 @@ var headers = {
var request = http.Request('POST', Uri.parse('{{base_url}}/api/v2/bill'));
request.body = json.encode({
"customer_id": "12345678910",
"product_id": "plnprepaid",
"product_id": "plnpre",
"partner_tx_id": "DEV123456789",
"amount": null,
"additional_data": null
Expand Down Expand Up @@ -64,7 +64,7 @@ func main() {

payload := strings.NewReader(`{
"customer_id": "12345678910",
"product_id": "plnprepaid",
"product_id": "plnpre",
"partner_tx_id": "DEV123456789",
"amount": null,
"additional_data": null
Expand Down Expand Up @@ -103,7 +103,7 @@ func main() {
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n\t\"customer_id\": \"12345678910\",\n\t\"product_id\": \"plnprepaid\",\n\t\"partner_tx_id\": \"DEV123456789\",\n\t\"amount\": null,\n\t\"additional_data\": null\n}");
RequestBody body = RequestBody.create(mediaType, "{\n\t\"customer_id\": \"12345678910\",\n\t\"product_id\": \"plnpre\",\n\t\"partner_tx_id\": \"DEV123456789\",\n\t\"amount\": null,\n\t\"additional_data\": null\n}");
Request request = new Request.Builder()
.url("{{base_url}}/api/v2/bill")
.method("POST", body)
Expand All @@ -118,7 +118,7 @@ Response response = client.newCall(request).execute();
```javascript
var data = JSON.stringify({
"customer_id": "12345678910",
"product_id": "plnprepaid",
"product_id": "plnpre",
"partner_tx_id": "DEV123456789",
"amount": null,
"additional_data": null
Expand Down Expand Up @@ -157,7 +157,7 @@ $request->setHeader(array(
'x-oy-username' => '{{username}}',
'x-api-key' => '{{api-key}}'
));
$request->setBody('{\n "customer_id": "12345678910",\n "product_id": "plnprepaid",\n "partner_tx_id": "DEV123456789",\n "amount": null,\n "additional_data": null\n}');
$request->setBody('{\n "customer_id": "12345678910",\n "product_id": "plnpre",\n "partner_tx_id": "DEV123456789",\n "amount": null,\n "additional_data": null\n}');
try {
$response = $request->send();
if ($response->getStatus() == 200) {
Expand All @@ -180,7 +180,7 @@ import json
conn = http.client.HTTPSConnection("{{base_url}}")
payload = json.dumps({
"customer_id": "12345678910",
"product_id": "plnprepaid",
"product_id": "plnpre",
"partner_tx_id": "DEV123456789",
"amount": null,
"additional_data": null
Expand Down Expand Up @@ -208,12 +208,12 @@ print(data.decode("utf-8"))
"data": {
"tx_id": "12345-12345-12345-12345",
"partner_tx_id": "DEV123456789",
"product_id": "BPFI",
"product_id": "plnpre",
"customer_id": "000372190053",
"customer_name": "FIRDAUS",
"amount": 832500,
"admin_fee": 2500,
"additional_data": "{\"customer_id\":\"000372190053\",\"customer_name\":\"FIRDAUS\",\"total_amount\":835000}"
"additional_data": "{\"electric_power\":\"R1M/900 VA\",\"customer_id\":\"000372190053\",\"customer_name\":\"FIRDAUS\",\"total_amount\":835000}"
},
}
```
Expand All @@ -232,7 +232,7 @@ customer_id | String(255) | TRUE | Customer ID for specific biller product
product_id | String(255) | TRUE | OY's Biller ID, see [Biller Products List](#biller-products-list-biller-api)
partner_tx_id | String(255) | TRUE | Unique Payout ID for a specific request, generated by partner
amount | BigInteger | FALSE | Product denom/amount, only for PLN Prepaid 20.000, 50.000, 100.000, 200.000, 500.000, 1.000.000
additional_data | String(255) | FALSE | Additonal data for BPJS (number of months) or PBB (tax year)
additional_data | String(255) | FALSE | Required for BPJS and PBB, <br>BPJS (number of months, ex : `3` is for 3 months), <br>PBB (tax year, ex `2023` is for tax 2023)

### Response Parameters

Expand Down
Loading